From 0eedad665e90cdf898706e75839a8b4a3bd21ec2 Mon Sep 17 00:00:00 2001 From: pozil Date: Fri, 11 Feb 2022 21:24:07 +0100 Subject: [PATCH] Release 1.4.0 --- README.md | 4 +- .../node_modules}/ignore/CHANGELOG.md | 0 .../eslintrc/node_modules/ignore/LICENSE-MIT} | 19 +- .../eslintrc/node_modules/ignore/README.md | 307 + .../eslintrc/node_modules/ignore/index.d.ts | 45 + .../eslintrc/node_modules/ignore/index.js | 463 ++ .../eslintrc/node_modules/ignore/legacy.js | 466 ++ .../eslintrc/node_modules/ignore/package.json | 96 + .../@humanwhocodes/config-array/CHANGELOG.md | 7 + .../@humanwhocodes/config-array/README.md | 32 + .../@humanwhocodes/config-array/api.js | 349 +- .../@humanwhocodes/config-array/package.json | 32 +- node_modules/ansi-colors/README.md | 315 - node_modules/ansi-colors/index.js | 177 - node_modules/ansi-colors/package.json | 152 - node_modules/ansi-colors/symbols.js | 70 - node_modules/ansi-colors/types/index.d.ts | 161 - node_modules/enquirer/CHANGELOG.md | 135 - node_modules/enquirer/LICENSE | 21 - node_modules/enquirer/README.md | 1752 ----- node_modules/enquirer/index.d.ts | 151 - node_modules/enquirer/index.js | 250 - node_modules/enquirer/lib/ansi.js | 116 - node_modules/enquirer/lib/combos.js | 75 - node_modules/enquirer/lib/completer.js | 52 - node_modules/enquirer/lib/interpolate.js | 266 - node_modules/enquirer/lib/keypress.js | 243 - node_modules/enquirer/lib/placeholder.js | 63 - node_modules/enquirer/lib/prompt.js | 485 -- .../enquirer/lib/prompts/autocomplete.js | 113 - .../enquirer/lib/prompts/basicauth.js | 41 - node_modules/enquirer/lib/prompts/confirm.js | 13 - node_modules/enquirer/lib/prompts/editable.js | 136 - node_modules/enquirer/lib/prompts/form.js | 196 - node_modules/enquirer/lib/prompts/index.js | 28 - node_modules/enquirer/lib/prompts/input.js | 55 - .../enquirer/lib/prompts/invisible.js | 11 - node_modules/enquirer/lib/prompts/list.js | 36 - .../enquirer/lib/prompts/multiselect.js | 11 - node_modules/enquirer/lib/prompts/numeral.js | 1 - node_modules/enquirer/lib/prompts/password.js | 18 - node_modules/enquirer/lib/prompts/quiz.js | 37 - node_modules/enquirer/lib/prompts/scale.js | 237 - node_modules/enquirer/lib/prompts/select.js | 139 - node_modules/enquirer/lib/prompts/snippet.js | 185 - node_modules/enquirer/lib/prompts/sort.js | 37 - node_modules/enquirer/lib/prompts/survey.js | 163 - node_modules/enquirer/lib/prompts/text.js | 1 - node_modules/enquirer/lib/prompts/toggle.js | 109 - node_modules/enquirer/lib/render.js | 33 - node_modules/enquirer/lib/roles.js | 46 - node_modules/enquirer/lib/state.js | 69 - node_modules/enquirer/lib/styles.js | 144 - node_modules/enquirer/lib/symbols.js | 66 - node_modules/enquirer/lib/theme.js | 11 - node_modules/enquirer/lib/timer.js | 38 - node_modules/enquirer/lib/types/array.js | 658 -- node_modules/enquirer/lib/types/auth.js | 29 - node_modules/enquirer/lib/types/boolean.js | 88 - node_modules/enquirer/lib/types/index.js | 7 - node_modules/enquirer/lib/types/number.js | 86 - node_modules/enquirer/lib/types/string.js | 185 - node_modules/enquirer/lib/utils.js | 268 - node_modules/enquirer/package.json | 148 - node_modules/eslint-visitor-keys/README.md | 4 +- .../dist/eslint-visitor-keys.cjs | 2 + .../eslint-visitor-keys/lib/visitor-keys.js | 2 + node_modules/eslint-visitor-keys/package.json | 32 +- node_modules/eslint/README.md | 6 +- node_modules/eslint/bin/eslint.js | 8 +- .../eslint/lib/cli-engine/cli-engine.js | 11 +- node_modules/eslint/lib/eslint/eslint.js | 6 + node_modules/eslint/lib/init/autoconfig.js | 351 - node_modules/eslint/lib/init/config-file.js | 144 - .../eslint/lib/init/config-initializer.js | 709 -- node_modules/eslint/lib/init/config-rule.js | 316 - node_modules/eslint/lib/init/npm-utils.js | 179 - .../eslint/lib/init/source-code-utils.js | 110 - .../lib/linter/apply-disable-directives.js | 79 +- node_modules/eslint/lib/linter/linter.js | 107 +- .../eslint/lib/rule-tester/rule-tester.js | 10 +- node_modules/eslint/lib/rules/camelcase.js | 8 +- node_modules/eslint/lib/rules/id-match.js | 2 +- .../eslint/lib/rules/keyword-spacing.js | 32 + .../eslint/lib/rules/no-constant-condition.js | 27 +- .../eslint/lib/rules/no-invalid-this.js | 103 +- .../eslint/lib/rules/no-restricted-exports.js | 12 +- .../eslint/lib/rules/no-restricted-imports.js | 31 +- .../eslint/lib/rules/no-restricted-modules.js | 3 +- .../eslint/lib/rules/no-useless-rename.js | 12 +- node_modules/eslint/lib/rules/quotes.js | 13 +- .../eslint/lib/rules/utils/ast-utils.js | 22 +- node_modules/eslint/lib/shared/types.js | 15 + .../eslint/messages/no-config-found.js | 2 +- node_modules/eslint/package.json | 39 +- node_modules/flatted/README.md | 8 +- node_modules/flatted/package.json | 39 +- node_modules/ignore/LICENSE-MIT | 0 node_modules/ignore/README.md | 165 +- node_modules/ignore/index.d.ts | 40 +- node_modules/ignore/index.js | 476 +- node_modules/ignore/legacy.js | 602 +- node_modules/ignore/package.json | 77 +- node_modules/lint-staged/README.md | 80 +- node_modules/lint-staged/bin/lint-staged.js | 14 +- node_modules/lint-staged/lib/dynamicImport.js | 3 + node_modules/lint-staged/lib/generateTasks.js | 5 +- .../lint-staged/lib/getConfigGroups.js | 112 + .../lint-staged/lib/getStagedFiles.js | 26 +- node_modules/lint-staged/lib/index.js | 36 +- node_modules/lint-staged/lib/loadConfig.js | 20 +- .../lint-staged/lib/resolveGitRepo.js | 3 +- node_modules/lint-staged/lib/runAll.js | 149 +- .../lint-staged/lib/validateConfig.js | 16 +- .../lint-staged/lib/validateOptions.js | 13 + node_modules/lint-staged/package.json | 49 +- .../constants/clearline-regex.constants.d.ts | 2 - .../constants/clearline-regex.constants.js | 6 - .../dist/constants/event.constants.d.ts | 9 - .../listr2/dist/constants/event.constants.js | 13 - node_modules/listr2/dist/constants/index.d.ts | 2 - node_modules/listr2/dist/constants/index.js | 14 - .../dist/constants/state.constants.d.ts | 10 - .../listr2/dist/constants/state.constants.js | 14 - node_modules/listr2/dist/index.cjs | 1336 ++++ node_modules/listr2/dist/index.d.ts | 957 ++- node_modules/listr2/dist/index.js | 1336 +++- .../listr2/dist/interfaces/index.d.ts | 4 - node_modules/listr2/dist/interfaces/index.js | 16 - .../interfaces/listr-error.interface.d.ts | 29 - .../dist/interfaces/listr-error.interface.js | 40 - .../dist/interfaces/listr.interface.d.ts | 170 - .../listr2/dist/interfaces/listr.interface.js | 2 - .../dist/interfaces/renderer.interface.d.ts | 92 - .../dist/interfaces/renderer.interface.js | 2 - .../dist/interfaces/task.interface.d.ts | 4 - .../listr2/dist/interfaces/task.interface.js | 2 - .../listr2/dist/lib/task-wrapper.d.ts | 51 - node_modules/listr2/dist/lib/task-wrapper.js | 101 - node_modules/listr2/dist/lib/task.d.ts | 98 - node_modules/listr2/dist/lib/task.js | 281 - node_modules/listr2/dist/listr.d.ts | 24 - node_modules/listr2/dist/listr.js | 122 - node_modules/listr2/dist/manager.d.ts | 22 - node_modules/listr2/dist/manager.js | 67 - .../dist/renderer/default.renderer.d.ts | 160 - .../listr2/dist/renderer/default.renderer.js | 363 - .../listr2/dist/renderer/silent.renderer.d.ts | 15 - .../listr2/dist/renderer/silent.renderer.js | 14 - .../listr2/dist/renderer/simple.renderer.d.ts | 48 - .../listr2/dist/renderer/simple.renderer.js | 119 - .../dist/renderer/verbose.renderer.d.ts | 47 - .../listr2/dist/renderer/verbose.renderer.js | 94 - node_modules/listr2/dist/utils/assert.d.ts | 6 - node_modules/listr2/dist/utils/assert.js | 17 - node_modules/listr2/dist/utils/colorette.d.ts | 3 - node_modules/listr2/dist/utils/colorette.js | 5 - node_modules/listr2/dist/utils/figures.d.ts | 12 - node_modules/listr2/dist/utils/figures.js | 26 - node_modules/listr2/dist/utils/general.d.ts | 4 - node_modules/listr2/dist/utils/general.js | 12 - .../listr2/dist/utils/indent-string.d.ts | 1 - .../listr2/dist/utils/indent-string.js | 7 - .../dist/utils/is-unicode-supported.d.ts | 1 - .../listr2/dist/utils/is-unicode-supported.js | 11 - .../listr2/dist/utils/logger.constants.d.ts | 12 - .../listr2/dist/utils/logger.constants.js | 16 - node_modules/listr2/dist/utils/logger.d.ts | 23 - .../listr2/dist/utils/logger.interface.d.ts | 6 - .../listr2/dist/utils/logger.interface.js | 2 - node_modules/listr2/dist/utils/logger.js | 159 - .../listr2/dist/utils/parse-time.d.ts | 1 - node_modules/listr2/dist/utils/parse-time.js | 19 - node_modules/listr2/dist/utils/prompt.d.ts | 12 - .../listr2/dist/utils/prompt.interface.d.ts | 129 - .../listr2/dist/utils/prompt.interface.js | 2 - node_modules/listr2/dist/utils/prompt.js | 110 - node_modules/listr2/dist/utils/renderer.d.ts | 3 - node_modules/listr2/dist/utils/renderer.js | 40 - node_modules/listr2/dist/utils/uuid.d.ts | 2 - node_modules/listr2/dist/utils/uuid.js | 12 - node_modules/listr2/package.json | 94 +- node_modules/node-fetch/CHANGELOG.md | 272 - node_modules/node-fetch/lib/index.es.js | 58 +- node_modules/node-fetch/lib/index.js | 58 +- node_modules/node-fetch/lib/index.mjs | 58 +- .../node-fetch/node_modules/tr46/.npmignore | 4 + .../node-fetch/node_modules/tr46/index.js | 193 + .../node-fetch/node_modules/tr46/lib/.gitkeep | 0 .../node_modules/tr46/lib/mappingTable.json | 1 + .../node-fetch/node_modules/tr46/package.json | 62 + .../webidl-conversions/LICENSE.md | 12 + .../node_modules/webidl-conversions/README.md | 53 + .../webidl-conversions/lib/index.js | 189 + .../webidl-conversions/package.json | 62 + .../node_modules/whatwg-url/LICENSE.txt} | 2 +- .../node_modules/whatwg-url/README.md | 67 + .../node_modules/whatwg-url/lib/URL-impl.js | 200 + .../node_modules/whatwg-url/lib/URL.js | 196 + .../node_modules/whatwg-url/lib/public-api.js | 11 + .../whatwg-url/lib/url-state-machine.js | 1297 ++++ .../node_modules/whatwg-url/lib/utils.js | 20 + .../node_modules/whatwg-url/package.json | 70 + node_modules/node-fetch/package.json | 42 +- node_modules/progress/CHANGELOG.md | 115 - node_modules/progress/Makefile | 8 - node_modules/progress/Readme.md | 146 - node_modules/progress/index.js | 1 - node_modules/progress/lib/node-progress.js | 236 - node_modules/progress/package.json | 70 - node_modules/rxjs/dist/bundles/rxjs.umd.js | 6740 ++++++++++++----- .../rxjs/dist/bundles/rxjs.umd.min.js | 6678 +++++++++++++++- .../rxjs/dist/cjs/internal/Subscriber.js | 208 +- .../observable/ConnectableObservable.js | 97 +- .../cjs/internal/observable/combineLatest.js | 129 +- .../observable/dom/WebSocketSubject.js | 234 +- .../dist/cjs/internal/observable/dom/fetch.js | 112 +- .../dist/cjs/internal/observable/forkJoin.js | 71 +- .../rxjs/dist/cjs/internal/observable/race.js | 49 +- .../rxjs/dist/cjs/internal/observable/zip.js | 154 +- .../internal/operators/OperatorSubscriber.js | 121 +- .../rxjs/dist/cjs/internal/operators/audit.js | 54 +- .../dist/cjs/internal/operators/buffer.js | 44 +- .../cjs/internal/operators/bufferCount.js | 198 +- .../dist/cjs/internal/operators/bufferTime.js | 151 +- .../cjs/internal/operators/bufferToggle.js | 140 +- .../dist/cjs/internal/operators/bufferWhen.js | 51 +- .../dist/cjs/internal/operators/catchError.js | 42 +- .../dist/cjs/internal/operators/debounce.js | 59 +- .../cjs/internal/operators/debounceTime.js | 50 +- .../cjs/internal/operators/defaultIfEmpty.js | 34 +- .../cjs/internal/operators/dematerialize.js | 23 +- .../dist/cjs/internal/operators/distinct.js | 42 +- .../operators/distinctUntilChanged.js | 41 +- .../rxjs/dist/cjs/internal/operators/every.js | 34 +- .../dist/cjs/internal/operators/exhaustAll.js | 46 +- .../dist/cjs/internal/operators/exhaustMap.js | 60 +- .../dist/cjs/internal/operators/filter.js | 21 +- .../rxjs/dist/cjs/internal/operators/find.js | 36 +- .../dist/cjs/internal/operators/groupBy.js | 156 +- .../cjs/internal/operators/ignoreElements.js | 16 +- .../dist/cjs/internal/operators/isEmpty.js | 30 +- .../rxjs/dist/cjs/internal/operators/map.js | 20 +- .../cjs/internal/operators/materialize.js | 43 +- .../cjs/internal/operators/mergeInternals.js | 118 +- .../dist/cjs/internal/operators/observeOn.js | 52 +- .../internal/operators/onErrorResumeNext.js | 76 +- .../dist/cjs/internal/operators/pairwise.js | 26 +- .../dist/cjs/internal/operators/refCount.js | 42 +- .../dist/cjs/internal/operators/repeat.js | 115 +- .../dist/cjs/internal/operators/repeatWhen.js | 61 +- .../rxjs/dist/cjs/internal/operators/retry.js | 139 +- .../dist/cjs/internal/operators/retryWhen.js | 48 +- .../dist/cjs/internal/operators/sample.js | 32 +- .../cjs/internal/operators/scanInternals.js | 46 +- .../cjs/internal/operators/sequenceEqual.js | 55 +- .../dist/cjs/internal/operators/single.js | 64 +- .../dist/cjs/internal/operators/skipLast.js | 55 +- .../dist/cjs/internal/operators/skipUntil.js | 36 +- .../dist/cjs/internal/operators/skipWhile.js | 21 +- .../dist/cjs/internal/operators/switchMap.js | 66 +- .../rxjs/dist/cjs/internal/operators/take.js | 42 +- .../dist/cjs/internal/operators/takeLast.js | 110 +- .../dist/cjs/internal/operators/takeUntil.js | 24 +- .../dist/cjs/internal/operators/takeWhile.js | 28 +- .../rxjs/dist/cjs/internal/operators/tap.js | 96 +- .../dist/cjs/internal/operators/throttle.js | 59 +- .../cjs/internal/operators/throwIfEmpty.js | 34 +- .../cjs/internal/operators/timeInterval.js | 54 +- .../dist/cjs/internal/operators/timeout.js | 127 +- .../dist/cjs/internal/operators/window.js | 52 +- .../cjs/internal/operators/windowCount.js | 136 +- .../dist/cjs/internal/operators/windowTime.js | 86 +- .../cjs/internal/operators/windowToggle.js | 172 +- .../dist/cjs/internal/operators/windowWhen.js | 57 +- .../cjs/internal/operators/withLatestFrom.js | 113 +- .../cjs/internal/testing/TestScheduler.js | 599 +- .../rxjs/dist/esm/internal/Subscriber.js | 67 +- .../observable/ConnectableObservable.js | 30 +- .../esm/internal/observable/combineLatest.js | 95 +- .../observable/dom/WebSocketSubject.js | 124 +- .../dist/esm/internal/observable/dom/fetch.js | 44 +- .../dist/esm/internal/observable/forkJoin.js | 42 +- .../rxjs/dist/esm/internal/observable/race.js | 34 +- .../rxjs/dist/esm/internal/observable/zip.js | 72 +- .../internal/operators/OperatorSubscriber.js | 56 +- .../rxjs/dist/esm/internal/operators/audit.js | 41 +- .../dist/esm/internal/operators/buffer.js | 32 +- .../esm/internal/operators/bufferCount.js | 68 +- .../dist/esm/internal/operators/bufferTime.js | 72 +- .../esm/internal/operators/bufferToggle.js | 60 +- .../dist/esm/internal/operators/bufferWhen.js | 33 +- .../dist/esm/internal/operators/catchError.js | 27 +- .../dist/esm/internal/operators/debounce.js | 46 +- .../esm/internal/operators/debounceTime.js | 36 +- .../esm/internal/operators/defaultIfEmpty.js | 26 +- .../esm/internal/operators/dematerialize.js | 8 +- .../dist/esm/internal/operators/distinct.js | 28 +- .../operators/distinctUntilChanged.js | 25 +- .../rxjs/dist/esm/internal/operators/every.js | 26 +- .../dist/esm/internal/operators/exhaustAll.js | 36 +- .../dist/esm/internal/operators/exhaustMap.js | 47 +- .../dist/esm/internal/operators/filter.js | 11 +- .../rxjs/dist/esm/internal/operators/find.js | 28 +- .../dist/esm/internal/operators/groupBy.js | 66 +- .../esm/internal/operators/ignoreElements.js | 2 +- .../dist/esm/internal/operators/isEmpty.js | 22 +- .../rxjs/dist/esm/internal/operators/map.js | 10 +- .../esm/internal/operators/materialize.js | 27 +- .../esm/internal/operators/mergeInternals.js | 95 +- .../dist/esm/internal/operators/observeOn.js | 29 +- .../internal/operators/onErrorResumeNext.js | 15 +- .../dist/esm/internal/operators/pairwise.js | 16 +- .../dist/esm/internal/operators/refCount.js | 34 +- .../dist/esm/internal/operators/repeat.js | 88 +- .../dist/esm/internal/operators/repeatWhen.js | 44 +- .../rxjs/dist/esm/internal/operators/retry.js | 119 +- .../dist/esm/internal/operators/retryWhen.js | 33 +- .../dist/esm/internal/operators/sample.js | 12 +- .../esm/internal/operators/scanInternals.js | 40 +- .../esm/internal/operators/sequenceEqual.js | 36 +- .../dist/esm/internal/operators/single.js | 46 +- .../dist/esm/internal/operators/skipLast.js | 42 +- .../dist/esm/internal/operators/skipUntil.js | 23 +- .../dist/esm/internal/operators/skipWhile.js | 11 +- .../dist/esm/internal/operators/switchMap.js | 53 +- .../rxjs/dist/esm/internal/operators/take.js | 27 +- .../dist/esm/internal/operators/takeLast.js | 36 +- .../dist/esm/internal/operators/takeUntil.js | 10 +- .../dist/esm/internal/operators/takeWhile.js | 14 +- .../rxjs/dist/esm/internal/operators/tap.js | 84 +- .../dist/esm/internal/operators/throttle.js | 41 +- .../esm/internal/operators/throwIfEmpty.js | 19 +- .../esm/internal/operators/timeInterval.js | 30 +- .../dist/esm/internal/operators/timeout.js | 111 +- .../dist/esm/internal/operators/window.js | 39 +- .../esm/internal/operators/windowCount.js | 64 +- .../dist/esm/internal/operators/windowTime.js | 49 +- .../esm/internal/operators/windowToggle.js | 94 +- .../dist/esm/internal/operators/windowWhen.js | 42 +- .../esm/internal/operators/withLatestFrom.js | 37 +- .../esm/internal/testing/TestScheduler.js | 307 +- .../rxjs/dist/esm5/internal/Subscriber.js | 83 +- .../observable/ConnectableObservable.js | 36 +- .../esm5/internal/observable/combineLatest.js | 107 +- .../observable/dom/WebSocketSubject.js | 148 +- .../esm5/internal/observable/dom/fetch.js | 51 +- .../dist/esm5/internal/observable/forkJoin.js | 48 +- .../dist/esm5/internal/observable/race.js | 34 +- .../rxjs/dist/esm5/internal/observable/zip.js | 93 +- .../internal/operators/OperatorSubscriber.js | 68 +- .../dist/esm5/internal/operators/audit.js | 41 +- .../dist/esm5/internal/operators/buffer.js | 34 +- .../esm5/internal/operators/bufferCount.js | 163 +- .../esm5/internal/operators/bufferTime.js | 108 +- .../esm5/internal/operators/bufferToggle.js | 93 +- .../esm5/internal/operators/bufferWhen.js | 36 +- .../esm5/internal/operators/catchError.js | 29 +- .../dist/esm5/internal/operators/debounce.js | 46 +- .../esm5/internal/operators/debounceTime.js | 40 +- .../esm5/internal/operators/defaultIfEmpty.js | 26 +- .../esm5/internal/operators/dematerialize.js | 8 +- .../dist/esm5/internal/operators/distinct.js | 30 +- .../operators/distinctUntilChanged.js | 29 +- .../dist/esm5/internal/operators/every.js | 26 +- .../esm5/internal/operators/exhaustAll.js | 36 +- .../esm5/internal/operators/exhaustMap.js | 48 +- .../dist/esm5/internal/operators/filter.js | 11 +- .../rxjs/dist/esm5/internal/operators/find.js | 28 +- .../dist/esm5/internal/operators/groupBy.js | 88 +- .../esm5/internal/operators/ignoreElements.js | 2 +- .../dist/esm5/internal/operators/isEmpty.js | 22 +- .../rxjs/dist/esm5/internal/operators/map.js | 10 +- .../esm5/internal/operators/materialize.js | 27 +- .../esm5/internal/operators/mergeInternals.js | 104 +- .../dist/esm5/internal/operators/observeOn.js | 42 +- .../internal/operators/onErrorResumeNext.js | 17 +- .../dist/esm5/internal/operators/pairwise.js | 16 +- .../dist/esm5/internal/operators/refCount.js | 34 +- .../dist/esm5/internal/operators/repeat.js | 100 +- .../esm5/internal/operators/repeatWhen.js | 47 +- .../dist/esm5/internal/operators/retry.js | 123 +- .../dist/esm5/internal/operators/retryWhen.js | 35 +- .../dist/esm5/internal/operators/sample.js | 12 +- .../esm5/internal/operators/scanInternals.js | 40 +- .../esm5/internal/operators/sequenceEqual.js | 44 +- .../dist/esm5/internal/operators/single.js | 46 +- .../dist/esm5/internal/operators/skipLast.js | 42 +- .../dist/esm5/internal/operators/skipUntil.js | 22 +- .../dist/esm5/internal/operators/skipWhile.js | 11 +- .../dist/esm5/internal/operators/switchMap.js | 55 +- .../rxjs/dist/esm5/internal/operators/take.js | 29 +- .../dist/esm5/internal/operators/takeLast.js | 75 +- .../dist/esm5/internal/operators/takeUntil.js | 12 +- .../dist/esm5/internal/operators/takeWhile.js | 18 +- .../rxjs/dist/esm5/internal/operators/tap.js | 84 +- .../dist/esm5/internal/operators/throttle.js | 47 +- .../esm5/internal/operators/throwIfEmpty.js | 24 +- .../esm5/internal/operators/timeInterval.js | 42 +- .../dist/esm5/internal/operators/timeout.js | 107 +- .../dist/esm5/internal/operators/window.js | 40 +- .../esm5/internal/operators/windowCount.js | 101 +- .../esm5/internal/operators/windowTime.js | 66 +- .../esm5/internal/operators/windowToggle.js | 127 +- .../esm5/internal/operators/windowWhen.js | 44 +- .../esm5/internal/operators/withLatestFrom.js | 50 +- .../esm5/internal/testing/TestScheduler.js | 414 +- package-lock.json | 2 +- package.json | 2 +- 409 files changed, 28625 insertions(+), 21017 deletions(-) rename node_modules/{ => @eslint/eslintrc/node_modules}/ignore/CHANGELOG.md (100%) rename node_modules/{progress/LICENSE => @eslint/eslintrc/node_modules/ignore/LICENSE-MIT} (51%) mode change 100644 => 100755 create mode 100755 node_modules/@eslint/eslintrc/node_modules/ignore/README.md create mode 100644 node_modules/@eslint/eslintrc/node_modules/ignore/index.d.ts create mode 100755 node_modules/@eslint/eslintrc/node_modules/ignore/index.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/ignore/legacy.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/ignore/package.json delete mode 100644 node_modules/ansi-colors/README.md delete mode 100644 node_modules/ansi-colors/index.js delete mode 100644 node_modules/ansi-colors/package.json delete mode 100644 node_modules/ansi-colors/symbols.js delete mode 100644 node_modules/ansi-colors/types/index.d.ts delete mode 100644 node_modules/enquirer/CHANGELOG.md delete mode 100644 node_modules/enquirer/LICENSE delete mode 100644 node_modules/enquirer/README.md delete mode 100644 node_modules/enquirer/index.d.ts delete mode 100644 node_modules/enquirer/index.js delete mode 100644 node_modules/enquirer/lib/ansi.js delete mode 100644 node_modules/enquirer/lib/combos.js delete mode 100644 node_modules/enquirer/lib/completer.js delete mode 100644 node_modules/enquirer/lib/interpolate.js delete mode 100644 node_modules/enquirer/lib/keypress.js delete mode 100644 node_modules/enquirer/lib/placeholder.js delete mode 100644 node_modules/enquirer/lib/prompt.js delete mode 100644 node_modules/enquirer/lib/prompts/autocomplete.js delete mode 100644 node_modules/enquirer/lib/prompts/basicauth.js delete mode 100644 node_modules/enquirer/lib/prompts/confirm.js delete mode 100644 node_modules/enquirer/lib/prompts/editable.js delete mode 100644 node_modules/enquirer/lib/prompts/form.js delete mode 100644 node_modules/enquirer/lib/prompts/index.js delete mode 100644 node_modules/enquirer/lib/prompts/input.js delete mode 100644 node_modules/enquirer/lib/prompts/invisible.js delete mode 100644 node_modules/enquirer/lib/prompts/list.js delete mode 100644 node_modules/enquirer/lib/prompts/multiselect.js delete mode 100644 node_modules/enquirer/lib/prompts/numeral.js delete mode 100644 node_modules/enquirer/lib/prompts/password.js delete mode 100644 node_modules/enquirer/lib/prompts/quiz.js delete mode 100644 node_modules/enquirer/lib/prompts/scale.js delete mode 100644 node_modules/enquirer/lib/prompts/select.js delete mode 100644 node_modules/enquirer/lib/prompts/snippet.js delete mode 100644 node_modules/enquirer/lib/prompts/sort.js delete mode 100644 node_modules/enquirer/lib/prompts/survey.js delete mode 100644 node_modules/enquirer/lib/prompts/text.js delete mode 100644 node_modules/enquirer/lib/prompts/toggle.js delete mode 100644 node_modules/enquirer/lib/render.js delete mode 100644 node_modules/enquirer/lib/roles.js delete mode 100644 node_modules/enquirer/lib/state.js delete mode 100644 node_modules/enquirer/lib/styles.js delete mode 100644 node_modules/enquirer/lib/symbols.js delete mode 100644 node_modules/enquirer/lib/theme.js delete mode 100644 node_modules/enquirer/lib/timer.js delete mode 100644 node_modules/enquirer/lib/types/array.js delete mode 100644 node_modules/enquirer/lib/types/auth.js delete mode 100644 node_modules/enquirer/lib/types/boolean.js delete mode 100644 node_modules/enquirer/lib/types/index.js delete mode 100644 node_modules/enquirer/lib/types/number.js delete mode 100644 node_modules/enquirer/lib/types/string.js delete mode 100644 node_modules/enquirer/lib/utils.js delete mode 100644 node_modules/enquirer/package.json delete mode 100644 node_modules/eslint/lib/init/autoconfig.js delete mode 100644 node_modules/eslint/lib/init/config-file.js delete mode 100644 node_modules/eslint/lib/init/config-initializer.js delete mode 100644 node_modules/eslint/lib/init/config-rule.js delete mode 100644 node_modules/eslint/lib/init/npm-utils.js delete mode 100644 node_modules/eslint/lib/init/source-code-utils.js mode change 100755 => 100644 node_modules/ignore/LICENSE-MIT mode change 100755 => 100644 node_modules/ignore/README.md mode change 100755 => 100644 node_modules/ignore/index.js create mode 100644 node_modules/lint-staged/lib/dynamicImport.js create mode 100644 node_modules/lint-staged/lib/getConfigGroups.js delete mode 100644 node_modules/listr2/dist/constants/clearline-regex.constants.d.ts delete mode 100644 node_modules/listr2/dist/constants/clearline-regex.constants.js delete mode 100644 node_modules/listr2/dist/constants/event.constants.d.ts delete mode 100644 node_modules/listr2/dist/constants/event.constants.js delete mode 100644 node_modules/listr2/dist/constants/index.d.ts delete mode 100644 node_modules/listr2/dist/constants/index.js delete mode 100644 node_modules/listr2/dist/constants/state.constants.d.ts delete mode 100644 node_modules/listr2/dist/constants/state.constants.js create mode 100644 node_modules/listr2/dist/index.cjs delete mode 100644 node_modules/listr2/dist/interfaces/index.d.ts delete mode 100644 node_modules/listr2/dist/interfaces/index.js delete mode 100644 node_modules/listr2/dist/interfaces/listr-error.interface.d.ts delete mode 100644 node_modules/listr2/dist/interfaces/listr-error.interface.js delete mode 100644 node_modules/listr2/dist/interfaces/listr.interface.d.ts delete mode 100644 node_modules/listr2/dist/interfaces/listr.interface.js delete mode 100644 node_modules/listr2/dist/interfaces/renderer.interface.d.ts delete mode 100644 node_modules/listr2/dist/interfaces/renderer.interface.js delete mode 100644 node_modules/listr2/dist/interfaces/task.interface.d.ts delete mode 100644 node_modules/listr2/dist/interfaces/task.interface.js delete mode 100644 node_modules/listr2/dist/lib/task-wrapper.d.ts delete mode 100644 node_modules/listr2/dist/lib/task-wrapper.js delete mode 100644 node_modules/listr2/dist/lib/task.d.ts delete mode 100644 node_modules/listr2/dist/lib/task.js delete mode 100644 node_modules/listr2/dist/listr.d.ts delete mode 100644 node_modules/listr2/dist/listr.js delete mode 100644 node_modules/listr2/dist/manager.d.ts delete mode 100644 node_modules/listr2/dist/manager.js delete mode 100644 node_modules/listr2/dist/renderer/default.renderer.d.ts delete mode 100644 node_modules/listr2/dist/renderer/default.renderer.js delete mode 100644 node_modules/listr2/dist/renderer/silent.renderer.d.ts delete mode 100644 node_modules/listr2/dist/renderer/silent.renderer.js delete mode 100644 node_modules/listr2/dist/renderer/simple.renderer.d.ts delete mode 100644 node_modules/listr2/dist/renderer/simple.renderer.js delete mode 100644 node_modules/listr2/dist/renderer/verbose.renderer.d.ts delete mode 100644 node_modules/listr2/dist/renderer/verbose.renderer.js delete mode 100644 node_modules/listr2/dist/utils/assert.d.ts delete mode 100644 node_modules/listr2/dist/utils/assert.js delete mode 100644 node_modules/listr2/dist/utils/colorette.d.ts delete mode 100644 node_modules/listr2/dist/utils/colorette.js delete mode 100644 node_modules/listr2/dist/utils/figures.d.ts delete mode 100644 node_modules/listr2/dist/utils/figures.js delete mode 100644 node_modules/listr2/dist/utils/general.d.ts delete mode 100644 node_modules/listr2/dist/utils/general.js delete mode 100644 node_modules/listr2/dist/utils/indent-string.d.ts delete mode 100644 node_modules/listr2/dist/utils/indent-string.js delete mode 100644 node_modules/listr2/dist/utils/is-unicode-supported.d.ts delete mode 100644 node_modules/listr2/dist/utils/is-unicode-supported.js delete mode 100644 node_modules/listr2/dist/utils/logger.constants.d.ts delete mode 100644 node_modules/listr2/dist/utils/logger.constants.js delete mode 100644 node_modules/listr2/dist/utils/logger.d.ts delete mode 100644 node_modules/listr2/dist/utils/logger.interface.d.ts delete mode 100644 node_modules/listr2/dist/utils/logger.interface.js delete mode 100644 node_modules/listr2/dist/utils/logger.js delete mode 100644 node_modules/listr2/dist/utils/parse-time.d.ts delete mode 100644 node_modules/listr2/dist/utils/parse-time.js delete mode 100644 node_modules/listr2/dist/utils/prompt.d.ts delete mode 100644 node_modules/listr2/dist/utils/prompt.interface.d.ts delete mode 100644 node_modules/listr2/dist/utils/prompt.interface.js delete mode 100644 node_modules/listr2/dist/utils/prompt.js delete mode 100644 node_modules/listr2/dist/utils/renderer.d.ts delete mode 100644 node_modules/listr2/dist/utils/renderer.js delete mode 100644 node_modules/listr2/dist/utils/uuid.d.ts delete mode 100644 node_modules/listr2/dist/utils/uuid.js delete mode 100644 node_modules/node-fetch/CHANGELOG.md create mode 100644 node_modules/node-fetch/node_modules/tr46/.npmignore create mode 100644 node_modules/node-fetch/node_modules/tr46/index.js create mode 100644 node_modules/node-fetch/node_modules/tr46/lib/.gitkeep create mode 100644 node_modules/node-fetch/node_modules/tr46/lib/mappingTable.json create mode 100644 node_modules/node-fetch/node_modules/tr46/package.json create mode 100644 node_modules/node-fetch/node_modules/webidl-conversions/LICENSE.md create mode 100644 node_modules/node-fetch/node_modules/webidl-conversions/README.md create mode 100644 node_modules/node-fetch/node_modules/webidl-conversions/lib/index.js create mode 100644 node_modules/node-fetch/node_modules/webidl-conversions/package.json rename node_modules/{ansi-colors/LICENSE => node-fetch/node_modules/whatwg-url/LICENSE.txt} (95%) create mode 100644 node_modules/node-fetch/node_modules/whatwg-url/README.md create mode 100644 node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js create mode 100644 node_modules/node-fetch/node_modules/whatwg-url/lib/URL.js create mode 100644 node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js create mode 100644 node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js create mode 100644 node_modules/node-fetch/node_modules/whatwg-url/lib/utils.js create mode 100644 node_modules/node-fetch/node_modules/whatwg-url/package.json delete mode 100644 node_modules/progress/CHANGELOG.md delete mode 100644 node_modules/progress/Makefile delete mode 100644 node_modules/progress/Readme.md delete mode 100644 node_modules/progress/index.js delete mode 100644 node_modules/progress/lib/node-progress.js delete mode 100644 node_modules/progress/package.json diff --git a/README.md b/README.md index 15173e871..7d090c191 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Auto-assign issue' - uses: pozil/auto-assign-issue@v1.3.0 + uses: pozil/auto-assign-issue@v1.4.0 with: assignees: octocat,cat,dog numOfAssignee: 2 @@ -36,7 +36,7 @@ This other configuration assigns issues to a random member of the `support` team ```yml - name: 'Auto-assign issue' - uses: pozil/auto-assign-issue@v1.3.0 + uses: pozil/auto-assign-issue@v1.4.0 with: repo-token: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }} teams: support diff --git a/node_modules/ignore/CHANGELOG.md b/node_modules/@eslint/eslintrc/node_modules/ignore/CHANGELOG.md similarity index 100% rename from node_modules/ignore/CHANGELOG.md rename to node_modules/@eslint/eslintrc/node_modules/ignore/CHANGELOG.md diff --git a/node_modules/progress/LICENSE b/node_modules/@eslint/eslintrc/node_modules/ignore/LICENSE-MIT old mode 100644 new mode 100755 similarity index 51% rename from node_modules/progress/LICENSE rename to node_modules/@eslint/eslintrc/node_modules/ignore/LICENSE-MIT index 4608b3947..825533e33 --- a/node_modules/progress/LICENSE +++ b/node_modules/@eslint/eslintrc/node_modules/ignore/LICENSE-MIT @@ -1,10 +1,9 @@ -(The MIT License) - -Copyright (c) 2017 TJ Holowaychuk +Copyright (c) 2013 Kael Zhang , contributors +http://kael.me/ 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 +"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 @@ -13,10 +12,10 @@ 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, +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. +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. \ No newline at end of file diff --git a/node_modules/@eslint/eslintrc/node_modules/ignore/README.md b/node_modules/@eslint/eslintrc/node_modules/ignore/README.md new file mode 100755 index 000000000..c4d8230cc --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/ignore/README.md @@ -0,0 +1,307 @@ + + + + + + + + + + + + + +
LinuxOS XWindowsCoverageDownloads
+ + Build Status + + + Windows Build Status + + + Coverage Status + + + npm module downloads per month +
+ +# ignore + +`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the .gitignore [spec](http://git-scm.com/docs/gitignore). + +Pay attention that [`minimatch`](https://www.npmjs.org/package/minimatch) does not work in the gitignore way. To filter filenames according to .gitignore file, I recommend this module. + +##### Tested on + +- Linux + Node: `0.8` - `7.x` +- Windows + Node: `0.10` - `7.x`, node < `0.10` is not tested due to the lack of support of appveyor. + +Actually, `ignore` does not rely on any versions of node specially. + +Since `4.0.0`, ignore will no longer support `node < 6` by default, to use in node < 6, `require('ignore/legacy')`. For details, see [CHANGELOG](https://github.com/kaelzhang/node-ignore/blob/master/CHANGELOG.md). + +## Table Of Main Contents + +- [Usage](#usage) +- [`Pathname` Conventions](#pathname-conventions) +- [Guide for 2.x -> 3.x](#upgrade-2x---3x) +- [Guide for 3.x -> 4.x](#upgrade-3x---4x) +- See Also: + - [`glob-gitignore`](https://www.npmjs.com/package/glob-gitignore) matches files using patterns and filters them according to gitignore rules. + +## Usage + +```js +import ignore from 'ignore' +const ig = ignore().add(['.abc/*', '!.abc/d/']) +``` + +### Filter the given paths + +```js +const paths = [ + '.abc/a.js', // filtered out + '.abc/d/e.js' // included +] + +ig.filter(paths) // ['.abc/d/e.js'] +ig.ignores('.abc/a.js') // true +``` + +### As the filter function + +```js +paths.filter(ig.createFilter()); // ['.abc/d/e.js'] +``` + +### Win32 paths will be handled + +```js +ig.filter(['.abc\\a.js', '.abc\\d\\e.js']) +// if the code above runs on windows, the result will be +// ['.abc\\d\\e.js'] +``` + +## Why another ignore? + +- `ignore` is a standalone module, and is much simpler so that it could easy work with other programs, unlike [isaacs](https://npmjs.org/~isaacs)'s [fstream-ignore](https://npmjs.org/package/fstream-ignore) which must work with the modules of the fstream family. + +- `ignore` only contains utility methods to filter paths according to the specified ignore rules, so + - `ignore` never try to find out ignore rules by traversing directories or fetching from git configurations. + - `ignore` don't cares about sub-modules of git projects. + +- Exactly according to [gitignore man page](http://git-scm.com/docs/gitignore), fixes some known matching issues of fstream-ignore, such as: + - '`/*.js`' should only match '`a.js`', but not '`abc/a.js`'. + - '`**/foo`' should match '`foo`' anywhere. + - Prevent re-including a file if a parent directory of that file is excluded. + - Handle trailing whitespaces: + - `'a '`(one space) should not match `'a '`(two spaces). + - `'a \ '` matches `'a '` + - All test cases are verified with the result of `git check-ignore`. + +# Methods + +## .add(pattern: string | Ignore): this +## .add(patterns: Array): this + +- **pattern** `String | Ignore` An ignore pattern string, or the `Ignore` instance +- **patterns** `Array` Array of ignore patterns. + +Adds a rule or several rules to the current manager. + +Returns `this` + +Notice that a line starting with `'#'`(hash) is treated as a comment. Put a backslash (`'\'`) in front of the first hash for patterns that begin with a hash, if you want to ignore a file with a hash at the beginning of the filename. + +```js +ignore().add('#abc').ignores('#abc') // false +ignore().add('\#abc').ignores('#abc') // true +``` + +`pattern` could either be a line of ignore pattern or a string of multiple ignore patterns, which means we could just `ignore().add()` the content of a ignore file: + +```js +ignore() +.add(fs.readFileSync(filenameOfGitignore).toString()) +.filter(filenames) +``` + +`pattern` could also be an `ignore` instance, so that we could easily inherit the rules of another `Ignore` instance. + +## .addIgnoreFile(path) + +REMOVED in `3.x` for now. + +To upgrade `ignore@2.x` up to `3.x`, use + +```js +import fs from 'fs' + +if (fs.existsSync(filename)) { + ignore().add(fs.readFileSync(filename).toString()) +} +``` + +instead. + +## .filter(paths: Array): Array + +```ts +type Pathname = string +``` + +Filters the given array of pathnames, and returns the filtered array. + +- **paths** `Array.` The array of `pathname`s to be filtered. + +### `Pathname` Conventions: + +#### 1. `Pathname` should be a `path.relative()`d pathname + +`Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory. + +```js +// WRONG +ig.ignores('./abc') + +// WRONG, for it will never happen. +// If the gitignore rule locates at the root directory, +// `'/abc'` should be changed to `'abc'`. +// ``` +// path.relative('/', '/abc') -> 'abc' +// ``` +ig.ignores('/abc') + +// Right +ig.ignores('abc') + +// Right +ig.ignores(path.join('./abc')) // path.join('./abc') -> 'abc' +``` + +In other words, each `Pathname` here should be a relative path to the directory of the gitignore rules. + +Suppose the dir structure is: + +``` +/path/to/your/repo + |-- a + | |-- a.js + | + |-- .b + | + |-- .c + |-- .DS_store +``` + +Then the `paths` might be like this: + +```js +[ + 'a/a.js' + '.b', + '.c/.DS_store' +] +``` + +Usually, you could use [`glob`](http://npmjs.org/package/glob) with `option.mark = true` to fetch the structure of the current directory: + +```js +import glob from 'glob' + +glob('**', { + // Adds a / character to directory matches. + mark: true +}, (err, files) => { + if (err) { + return console.error(err) + } + + let filtered = ignore().add(patterns).filter(files) + console.log(filtered) +}) +``` + +#### 2. filenames and dirnames + +`node-ignore` does NO `fs.stat` during path matching, so for the example below: + +```js +ig.add('config/') + +// `ig` does NOT know if 'config' is a normal file, directory or something +ig.ignores('config') // And it returns `false` + +ig.ignores('config/') // returns `true` +``` + +Specially for people who develop some library based on `node-ignore`, it is important to understand that. + +## .ignores(pathname: Pathname): boolean + +> new in 3.2.0 + +Returns `Boolean` whether `pathname` should be ignored. + +```js +ig.ignores('.abc/a.js') // true +``` + +## .createFilter() + +Creates a filter function which could filter an array of paths with `Array.prototype.filter`. + +Returns `function(path)` the filter function. + +## `options.ignorecase` since 4.0.0 + +Similar as the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (default value), otherwise case sensitive. + +```js +const ig = ignore({ + ignorecase: false +}) + +ig.add('*.png') + +ig.ignores('*.PNG') // false +``` + +**** + +# Upgrade Guide + +## Upgrade 2.x -> 3.x + +- All `options` of 2.x are unnecessary and removed, so just remove them. +- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed. +- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details. + +## Upgrade 3.x -> 4.x + +Since `4.0.0`, `ignore` will no longer support node < 6, to use `ignore` in node < 6: + +```js +var ignore = require('ignore/legacy') +``` + +**** + +# Collaborators + +- [@whitecolor](https://github.com/whitecolor) *Alex* +- [@SamyPesse](https://github.com/SamyPesse) *Samy Pessé* +- [@azproduction](https://github.com/azproduction) *Mikhail Davydov* +- [@TrySound](https://github.com/TrySound) *Bogdan Chadkin* +- [@JanMattner](https://github.com/JanMattner) *Jan Mattner* +- [@ntwb](https://github.com/ntwb) *Stephen Edgar* +- [@kasperisager](https://github.com/kasperisager) *Kasper Isager* +- [@sandersn](https://github.com/sandersn) *Nathan Shively-Sanders* diff --git a/node_modules/@eslint/eslintrc/node_modules/ignore/index.d.ts b/node_modules/@eslint/eslintrc/node_modules/ignore/index.d.ts new file mode 100644 index 000000000..be9d5f8ea --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/ignore/index.d.ts @@ -0,0 +1,45 @@ +interface Ignore { + /** + * Adds a rule rules to the current manager. + * @param {string | Ignore} pattern + * @returns IgnoreBase + */ + add(pattern: string | Ignore): Ignore + /** + * Adds several rules to the current manager. + * @param {string[]} patterns + * @returns IgnoreBase + */ + add(patterns: (string | Ignore)[]): Ignore + + /** + * Filters the given array of pathnames, and returns the filtered array. + * NOTICE that each path here should be a relative path to the root of your repository. + * @param paths the array of paths to be filtered. + * @returns The filtered array of paths + */ + filter(paths: string[]): string[] + /** + * Creates a filter function which could filter + * an array of paths with Array.prototype.filter. + */ + createFilter(): (path: string) => boolean + + /** + * Returns Boolean whether pathname should be ignored. + * @param {string} pathname a path to check + * @returns boolean + */ + ignores(pathname: string): boolean +} + +interface Options { + ignorecase?: boolean +} + +/** + * Creates new ignore manager. + */ +declare function ignore(options?: Options): Ignore + +export default ignore diff --git a/node_modules/@eslint/eslintrc/node_modules/ignore/index.js b/node_modules/@eslint/eslintrc/node_modules/ignore/index.js new file mode 100755 index 000000000..62c5cf71e --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/ignore/index.js @@ -0,0 +1,463 @@ +// A simple implementation of make-array +function make_array (subject) { + return Array.isArray(subject) + ? subject + : [subject] +} + +const REGEX_BLANK_LINE = /^\s+$/ +const REGEX_LEADING_EXCAPED_EXCLAMATION = /^\\!/ +const REGEX_LEADING_EXCAPED_HASH = /^\\#/ +const SLASH = '/' +const KEY_IGNORE = typeof Symbol !== 'undefined' + ? Symbol.for('node-ignore') + /* istanbul ignore next */ + : 'node-ignore' + +const define = (object, key, value) => + Object.defineProperty(object, key, {value}) + +const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g + +// Sanitize the range of a regular expression +// The cases are complicated, see test cases for details +const sanitizeRange = range => range.replace( + REGEX_REGEXP_RANGE, + (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) + ? match + // Invalid range (out of order) which is ok for gitignore rules but + // fatal for JavaScript regular expression, so eliminate it. + : '' +) + +// > If the pattern ends with a slash, +// > it is removed for the purpose of the following description, +// > but it would only find a match with a directory. +// > In other words, foo/ will match a directory foo and paths underneath it, +// > but will not match a regular file or a symbolic link foo +// > (this is consistent with the way how pathspec works in general in Git). +// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' +// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call +// you could use option `mark: true` with `glob` + +// '`foo/`' should not continue with the '`..`' +const DEFAULT_REPLACER_PREFIX = [ + + // > Trailing spaces are ignored unless they are quoted with backslash ("\") + [ + // (a\ ) -> (a ) + // (a ) -> (a) + // (a \ ) -> (a ) + /\\?\s+$/, + match => match.indexOf('\\') === 0 + ? ' ' + : '' + ], + + // replace (\ ) with ' ' + [ + /\\\s/g, + () => ' ' + ], + + // Escape metacharacters + // which is written down by users but means special for regular expressions. + + // > There are 12 characters with special meanings: + // > - the backslash \, + // > - the caret ^, + // > - the dollar sign $, + // > - the period or dot ., + // > - the vertical bar or pipe symbol |, + // > - the question mark ?, + // > - the asterisk or star *, + // > - the plus sign +, + // > - the opening parenthesis (, + // > - the closing parenthesis ), + // > - and the opening square bracket [, + // > - the opening curly brace {, + // > These special characters are often called "metacharacters". + [ + /[\\^$.|*+(){]/g, + match => `\\${match}` + ], + + [ + // > [abc] matches any character inside the brackets + // > (in this case a, b, or c); + /\[([^\]/]*)($|\])/g, + (match, p1, p2) => p2 === ']' + ? `[${sanitizeRange(p1)}]` + : `\\${match}` + ], + + [ + // > a question mark (?) matches a single character + /(?!\\)\?/g, + () => '[^/]' + ], + + // leading slash + [ + + // > A leading slash matches the beginning of the pathname. + // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". + // A leading slash matches the beginning of the pathname + /^\//, + () => '^' + ], + + // replace special metacharacter slash after the leading slash + [ + /\//g, + () => '\\/' + ], + + [ + // > A leading "**" followed by a slash means match in all directories. + // > For example, "**/foo" matches file or directory "foo" anywhere, + // > the same as pattern "foo". + // > "**/foo/bar" matches file or directory "bar" anywhere that is directly + // > under directory "foo". + // Notice that the '*'s have been replaced as '\\*' + /^\^*\\\*\\\*\\\//, + + // '**/foo' <-> 'foo' + () => '^(?:.*\\/)?' + ] +] + +const DEFAULT_REPLACER_SUFFIX = [ + // starting + [ + // there will be no leading '/' + // (which has been replaced by section "leading slash") + // If starts with '**', adding a '^' to the regular expression also works + /^(?=[^^])/, + function startingReplacer () { + return !/\/(?!$)/.test(this) + // > If the pattern does not contain a slash /, + // > Git treats it as a shell glob pattern + // Actually, if there is only a trailing slash, + // git also treats it as a shell glob pattern + ? '(?:^|\\/)' + + // > Otherwise, Git treats the pattern as a shell glob suitable for + // > consumption by fnmatch(3) + : '^' + } + ], + + // two globstars + [ + // Use lookahead assertions so that we could match more than one `'/**'` + /\\\/\\\*\\\*(?=\\\/|$)/g, + + // Zero, one or several directories + // should not use '*', or it will be replaced by the next replacer + + // Check if it is not the last `'/**'` + (match, index, str) => index + 6 < str.length + + // case: /**/ + // > A slash followed by two consecutive asterisks then a slash matches + // > zero or more directories. + // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. + // '/**/' + ? '(?:\\/[^\\/]+)*' + + // case: /** + // > A trailing `"/**"` matches everything inside. + + // #21: everything inside but it should not include the current folder + : '\\/.+' + ], + + // intermediate wildcards + [ + // Never replace escaped '*' + // ignore rule '\*' will match the path '*' + + // 'abc.*/' -> go + // 'abc.*' -> skip this rule + /(^|[^\\]+)\\\*(?=.+)/g, + + // '*.js' matches '.js' + // '*.js' doesn't match 'abc' + (match, p1) => `${p1}[^\\/]*` + ], + + // trailing wildcard + [ + /(\^|\\\/)?\\\*$/, + (match, p1) => { + const prefix = p1 + // '\^': + // '/*' does not match '' + // '/*' does not match everything + + // '\\\/': + // 'abc/*' does not match 'abc/' + ? `${p1}[^/]+` + + // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*' + + return `${prefix}(?=$|\\/$)` + } + ], + + [ + // unescape + /\\\\\\/g, + () => '\\' + ] +] + +const POSITIVE_REPLACERS = [ + ...DEFAULT_REPLACER_PREFIX, + + // 'f' + // matches + // - /f(end) + // - /f/ + // - (start)f(end) + // - (start)f/ + // doesn't match + // - oof + // - foo + // pseudo: + // -> (^|/)f(/|$) + + // ending + [ + // 'js' will not match 'js.' + // 'ab' will not match 'abc' + /(?:[^*/])$/, + + // 'js*' will not match 'a.js' + // 'js/' will not match 'a.js' + // 'js' will match 'a.js' and 'a.js/' + match => `${match}(?=$|\\/)` + ], + + ...DEFAULT_REPLACER_SUFFIX +] + +const NEGATIVE_REPLACERS = [ + ...DEFAULT_REPLACER_PREFIX, + + // #24, #38 + // The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore) + // A negative pattern without a trailing wildcard should not + // re-include the things inside that directory. + + // eg: + // ['node_modules/*', '!node_modules'] + // should ignore `node_modules/a.js` + [ + /(?:[^*])$/, + match => `${match}(?=$|\\/$)` + ], + + ...DEFAULT_REPLACER_SUFFIX +] + +// A simple cache, because an ignore rule only has only one certain meaning +const cache = Object.create(null) + +// @param {pattern} +const make_regex = (pattern, negative, ignorecase) => { + const r = cache[pattern] + if (r) { + return r + } + + const replacers = negative + ? NEGATIVE_REPLACERS + : POSITIVE_REPLACERS + + const source = replacers.reduce( + (prev, current) => prev.replace(current[0], current[1].bind(pattern)), + pattern + ) + + return cache[pattern] = ignorecase + ? new RegExp(source, 'i') + : new RegExp(source) +} + +// > A blank line matches no files, so it can serve as a separator for readability. +const checkPattern = pattern => pattern + && typeof pattern === 'string' + && !REGEX_BLANK_LINE.test(pattern) + + // > A line starting with # serves as a comment. + && pattern.indexOf('#') !== 0 + +const createRule = (pattern, ignorecase) => { + const origin = pattern + let negative = false + + // > An optional prefix "!" which negates the pattern; + if (pattern.indexOf('!') === 0) { + negative = true + pattern = pattern.substr(1) + } + + pattern = pattern + // > Put a backslash ("\") in front of the first "!" for patterns that + // > begin with a literal "!", for example, `"\!important!.txt"`. + .replace(REGEX_LEADING_EXCAPED_EXCLAMATION, '!') + // > Put a backslash ("\") in front of the first hash for patterns that + // > begin with a hash. + .replace(REGEX_LEADING_EXCAPED_HASH, '#') + + const regex = make_regex(pattern, negative, ignorecase) + + return { + origin, + pattern, + negative, + regex + } +} + +class IgnoreBase { + constructor ({ + ignorecase = true + } = {}) { + this._rules = [] + this._ignorecase = ignorecase + define(this, KEY_IGNORE, true) + this._initCache() + } + + _initCache () { + this._cache = Object.create(null) + } + + // @param {Array.|string|Ignore} pattern + add (pattern) { + this._added = false + + if (typeof pattern === 'string') { + pattern = pattern.split(/\r?\n/g) + } + + make_array(pattern).forEach(this._addPattern, this) + + // Some rules have just added to the ignore, + // making the behavior changed. + if (this._added) { + this._initCache() + } + + return this + } + + // legacy + addPattern (pattern) { + return this.add(pattern) + } + + _addPattern (pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules) + this._added = true + return + } + + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignorecase) + this._added = true + this._rules.push(rule) + } + } + + filter (paths) { + return make_array(paths).filter(path => this._filter(path)) + } + + createFilter () { + return path => this._filter(path) + } + + ignores (path) { + return !this._filter(path) + } + + // @returns `Boolean` true if the `path` is NOT ignored + _filter (path, slices) { + if (!path) { + return false + } + + if (path in this._cache) { + return this._cache[path] + } + + if (!slices) { + // path/to/a.js + // ['path', 'to', 'a.js'] + slices = path.split(SLASH) + } + + slices.pop() + + return this._cache[path] = slices.length + // > It is not possible to re-include a file if a parent directory of + // > that file is excluded. + // If the path contains a parent directory, check the parent first + ? this._filter(slices.join(SLASH) + SLASH, slices) + && this._test(path) + + // Or only test the path + : this._test(path) + } + + // @returns {Boolean} true if a file is NOT ignored + _test (path) { + // Explicitly define variable type by setting matched to `0` + let matched = 0 + + this._rules.forEach(rule => { + // if matched = true, then we only test negative rules + // if matched = false, then we test non-negative rules + if (!(matched ^ rule.negative)) { + matched = rule.negative ^ rule.regex.test(path) + } + }) + + return !matched + } +} + +// Windows +// -------------------------------------------------------------- +/* istanbul ignore if */ +if ( + // Detect `process` so that it can run in browsers. + typeof process !== 'undefined' + && ( + process.env && process.env.IGNORE_TEST_WIN32 + || process.platform === 'win32' + ) +) { + const filter = IgnoreBase.prototype._filter + + /* eslint no-control-regex: "off" */ + const make_posix = str => /^\\\\\?\\/.test(str) + || /[^\x00-\x80]+/.test(str) + ? str + : str.replace(/\\/g, '/') + + IgnoreBase.prototype._filter = function filterWin32 (path, slices) { + path = make_posix(path) + return filter.call(this, path, slices) + } +} + +module.exports = options => new IgnoreBase(options) diff --git a/node_modules/@eslint/eslintrc/node_modules/ignore/legacy.js b/node_modules/@eslint/eslintrc/node_modules/ignore/legacy.js new file mode 100644 index 000000000..14f377d77 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/ignore/legacy.js @@ -0,0 +1,466 @@ +'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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +// A simple implementation of make-array +function make_array(subject) { + return Array.isArray(subject) ? subject : [subject]; +} + +var REGEX_BLANK_LINE = /^\s+$/; +var REGEX_LEADING_EXCAPED_EXCLAMATION = /^\\!/; +var REGEX_LEADING_EXCAPED_HASH = /^\\#/; +var SLASH = '/'; +var KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('node-ignore') +/* istanbul ignore next */ +: 'node-ignore'; + +var define = function define(object, key, value) { + return Object.defineProperty(object, key, { value }); +}; + +var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + +// Sanitize the range of a regular expression +// The cases are complicated, see test cases for details +var sanitizeRange = function sanitizeRange(range) { + return range.replace(REGEX_REGEXP_RANGE, function (match, from, to) { + return from.charCodeAt(0) <= to.charCodeAt(0) ? match + // Invalid range (out of order) which is ok for gitignore rules but + // fatal for JavaScript regular expression, so eliminate it. + : ''; + }); +}; + +// > If the pattern ends with a slash, +// > it is removed for the purpose of the following description, +// > but it would only find a match with a directory. +// > In other words, foo/ will match a directory foo and paths underneath it, +// > but will not match a regular file or a symbolic link foo +// > (this is consistent with the way how pathspec works in general in Git). +// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' +// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call +// you could use option `mark: true` with `glob` + +// '`foo/`' should not continue with the '`..`' +var DEFAULT_REPLACER_PREFIX = [ + +// > Trailing spaces are ignored unless they are quoted with backslash ("\") +[ +// (a\ ) -> (a ) +// (a ) -> (a) +// (a \ ) -> (a ) +/\\?\s+$/, function (match) { + return match.indexOf('\\') === 0 ? ' ' : ''; +}], + +// replace (\ ) with ' ' +[/\\\s/g, function () { + return ' '; +}], + +// Escape metacharacters +// which is written down by users but means special for regular expressions. + +// > There are 12 characters with special meanings: +// > - the backslash \, +// > - the caret ^, +// > - the dollar sign $, +// > - the period or dot ., +// > - the vertical bar or pipe symbol |, +// > - the question mark ?, +// > - the asterisk or star *, +// > - the plus sign +, +// > - the opening parenthesis (, +// > - the closing parenthesis ), +// > - and the opening square bracket [, +// > - the opening curly brace {, +// > These special characters are often called "metacharacters". +[/[\\^$.|*+(){]/g, function (match) { + return `\\${match}`; +}], [ +// > [abc] matches any character inside the brackets +// > (in this case a, b, or c); +/\[([^\]/]*)($|\])/g, function (match, p1, p2) { + return p2 === ']' ? `[${sanitizeRange(p1)}]` : `\\${match}`; +}], [ +// > a question mark (?) matches a single character +/(?!\\)\?/g, function () { + return '[^/]'; +}], + +// leading slash +[ + +// > A leading slash matches the beginning of the pathname. +// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". +// A leading slash matches the beginning of the pathname +/^\//, function () { + return '^'; +}], + +// replace special metacharacter slash after the leading slash +[/\//g, function () { + return '\\/'; +}], [ +// > A leading "**" followed by a slash means match in all directories. +// > For example, "**/foo" matches file or directory "foo" anywhere, +// > the same as pattern "foo". +// > "**/foo/bar" matches file or directory "bar" anywhere that is directly +// > under directory "foo". +// Notice that the '*'s have been replaced as '\\*' +/^\^*\\\*\\\*\\\//, + +// '**/foo' <-> 'foo' +function () { + return '^(?:.*\\/)?'; +}]]; + +var DEFAULT_REPLACER_SUFFIX = [ +// starting +[ +// there will be no leading '/' +// (which has been replaced by section "leading slash") +// If starts with '**', adding a '^' to the regular expression also works +/^(?=[^^])/, function startingReplacer() { + return !/\/(?!$)/.test(this) + // > If the pattern does not contain a slash /, + // > Git treats it as a shell glob pattern + // Actually, if there is only a trailing slash, + // git also treats it as a shell glob pattern + ? '(?:^|\\/)' + + // > Otherwise, Git treats the pattern as a shell glob suitable for + // > consumption by fnmatch(3) + : '^'; +}], + +// two globstars +[ +// Use lookahead assertions so that we could match more than one `'/**'` +/\\\/\\\*\\\*(?=\\\/|$)/g, + +// Zero, one or several directories +// should not use '*', or it will be replaced by the next replacer + +// Check if it is not the last `'/**'` +function (match, index, str) { + return index + 6 < str.length + + // case: /**/ + // > A slash followed by two consecutive asterisks then a slash matches + // > zero or more directories. + // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. + // '/**/' + ? '(?:\\/[^\\/]+)*' + + // case: /** + // > A trailing `"/**"` matches everything inside. + + // #21: everything inside but it should not include the current folder + : '\\/.+'; +}], + +// intermediate wildcards +[ +// Never replace escaped '*' +// ignore rule '\*' will match the path '*' + +// 'abc.*/' -> go +// 'abc.*' -> skip this rule +/(^|[^\\]+)\\\*(?=.+)/g, + +// '*.js' matches '.js' +// '*.js' doesn't match 'abc' +function (match, p1) { + return `${p1}[^\\/]*`; +}], + +// trailing wildcard +[/(\^|\\\/)?\\\*$/, function (match, p1) { + var prefix = p1 + // '\^': + // '/*' does not match '' + // '/*' does not match everything + + // '\\\/': + // 'abc/*' does not match 'abc/' + ? `${p1}[^/]+` + + // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*'; + + return `${prefix}(?=$|\\/$)`; +}], [ +// unescape +/\\\\\\/g, function () { + return '\\'; +}]]; + +var POSITIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [ + +// 'f' +// matches +// - /f(end) +// - /f/ +// - (start)f(end) +// - (start)f/ +// doesn't match +// - oof +// - foo +// pseudo: +// -> (^|/)f(/|$) + +// ending +[ +// 'js' will not match 'js.' +// 'ab' will not match 'abc' +/(?:[^*/])$/, + +// 'js*' will not match 'a.js' +// 'js/' will not match 'a.js' +// 'js' will match 'a.js' and 'a.js/' +function (match) { + return `${match}(?=$|\\/)`; +}]], DEFAULT_REPLACER_SUFFIX); + +var NEGATIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [ + +// #24, #38 +// The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore) +// A negative pattern without a trailing wildcard should not +// re-include the things inside that directory. + +// eg: +// ['node_modules/*', '!node_modules'] +// should ignore `node_modules/a.js` +[/(?:[^*])$/, function (match) { + return `${match}(?=$|\\/$)`; +}]], DEFAULT_REPLACER_SUFFIX); + +// A simple cache, because an ignore rule only has only one certain meaning +var cache = Object.create(null); + +// @param {pattern} +var make_regex = function make_regex(pattern, negative, ignorecase) { + var r = cache[pattern]; + if (r) { + return r; + } + + var replacers = negative ? NEGATIVE_REPLACERS : POSITIVE_REPLACERS; + + var source = replacers.reduce(function (prev, current) { + return prev.replace(current[0], current[1].bind(pattern)); + }, pattern); + + return cache[pattern] = ignorecase ? new RegExp(source, 'i') : new RegExp(source); +}; + +// > A blank line matches no files, so it can serve as a separator for readability. +var checkPattern = function checkPattern(pattern) { + return pattern && typeof pattern === 'string' && !REGEX_BLANK_LINE.test(pattern) + + // > A line starting with # serves as a comment. + && pattern.indexOf('#') !== 0; +}; + +var createRule = function createRule(pattern, ignorecase) { + var origin = pattern; + var negative = false; + + // > An optional prefix "!" which negates the pattern; + if (pattern.indexOf('!') === 0) { + negative = true; + pattern = pattern.substr(1); + } + + pattern = pattern + // > Put a backslash ("\") in front of the first "!" for patterns that + // > begin with a literal "!", for example, `"\!important!.txt"`. + .replace(REGEX_LEADING_EXCAPED_EXCLAMATION, '!') + // > Put a backslash ("\") in front of the first hash for patterns that + // > begin with a hash. + .replace(REGEX_LEADING_EXCAPED_HASH, '#'); + + var regex = make_regex(pattern, negative, ignorecase); + + return { + origin, + pattern, + negative, + regex + }; +}; + +var IgnoreBase = function () { + function IgnoreBase() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$ignorecase = _ref.ignorecase, + ignorecase = _ref$ignorecase === undefined ? true : _ref$ignorecase; + + _classCallCheck(this, IgnoreBase); + + this._rules = []; + this._ignorecase = ignorecase; + define(this, KEY_IGNORE, true); + this._initCache(); + } + + _createClass(IgnoreBase, [{ + key: '_initCache', + value: function _initCache() { + this._cache = Object.create(null); + } + + // @param {Array.|string|Ignore} pattern + + }, { + key: 'add', + value: function add(pattern) { + this._added = false; + + if (typeof pattern === 'string') { + pattern = pattern.split(/\r?\n/g); + } + + make_array(pattern).forEach(this._addPattern, this); + + // Some rules have just added to the ignore, + // making the behavior changed. + if (this._added) { + this._initCache(); + } + + return this; + } + + // legacy + + }, { + key: 'addPattern', + value: function addPattern(pattern) { + return this.add(pattern); + } + }, { + key: '_addPattern', + value: function _addPattern(pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + + if (checkPattern(pattern)) { + var rule = createRule(pattern, this._ignorecase); + this._added = true; + this._rules.push(rule); + } + } + }, { + key: 'filter', + value: function filter(paths) { + var _this = this; + + return make_array(paths).filter(function (path) { + return _this._filter(path); + }); + } + }, { + key: 'createFilter', + value: function createFilter() { + var _this2 = this; + + return function (path) { + return _this2._filter(path); + }; + } + }, { + key: 'ignores', + value: function ignores(path) { + return !this._filter(path); + } + + // @returns `Boolean` true if the `path` is NOT ignored + + }, { + key: '_filter', + value: function _filter(path, slices) { + if (!path) { + return false; + } + + if (path in this._cache) { + return this._cache[path]; + } + + if (!slices) { + // path/to/a.js + // ['path', 'to', 'a.js'] + slices = path.split(SLASH); + } + + slices.pop(); + + return this._cache[path] = slices.length + // > It is not possible to re-include a file if a parent directory of + // > that file is excluded. + // If the path contains a parent directory, check the parent first + ? this._filter(slices.join(SLASH) + SLASH, slices) && this._test(path) + + // Or only test the path + : this._test(path); + } + + // @returns {Boolean} true if a file is NOT ignored + + }, { + key: '_test', + value: function _test(path) { + // Explicitly define variable type by setting matched to `0` + var matched = 0; + + this._rules.forEach(function (rule) { + // if matched = true, then we only test negative rules + // if matched = false, then we test non-negative rules + if (!(matched ^ rule.negative)) { + matched = rule.negative ^ rule.regex.test(path); + } + }); + + return !matched; + } + }]); + + return IgnoreBase; +}(); + +// Windows +// -------------------------------------------------------------- +/* istanbul ignore if */ + + +if ( +// Detect `process` so that it can run in browsers. +typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32')) { + var filter = IgnoreBase.prototype._filter; + + /* eslint no-control-regex: "off" */ + var make_posix = function make_posix(str) { + return (/^\\\\\?\\/.test(str) || /[^\x00-\x80]+/.test(str) ? str : str.replace(/\\/g, '/') + ); + }; + + IgnoreBase.prototype._filter = function filterWin32(path, slices) { + path = make_posix(path); + return filter.call(this, path, slices); + }; +} + +module.exports = function (options) { + return new IgnoreBase(options); +}; diff --git a/node_modules/@eslint/eslintrc/node_modules/ignore/package.json b/node_modules/@eslint/eslintrc/node_modules/ignore/package.json new file mode 100644 index 000000000..b8f9aee12 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/ignore/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "ignore@4.0.6", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_development": true, + "_from": "ignore@4.0.6", + "_id": "ignore@4.0.6", + "_inBundle": false, + "_integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "_location": "/@eslint/eslintrc/ignore", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ignore@4.0.6", + "name": "ignore", + "escapedName": "ignore", + "rawSpec": "4.0.6", + "saveSpec": null, + "fetchSpec": "4.0.6" + }, + "_requiredBy": [ + "/@eslint/eslintrc" + ], + "_resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "_spec": "4.0.6", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", + "author": { + "name": "kael" + }, + "bugs": { + "url": "https://github.com/kaelzhang/node-ignore/issues" + }, + "description": "Ignore is a manager and filter for .gitignore rules.", + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-preset-env": "^1.7.0", + "codecov": "^3.0.4", + "eslint": "^5.3.0", + "eslint-config-ostai": "^1.3.2", + "eslint-plugin-import": "^2.13.0", + "mkdirp": "^0.5.1", + "pre-suf": "^1.1.0", + "rimraf": "^2.6.2", + "spawn-sync": "^2.0.0", + "tap": "^12.0.1", + "tmp": "0.0.33", + "typescript": "^3.0.1" + }, + "engines": { + "node": ">= 4" + }, + "files": [ + "legacy.js", + "index.js", + "index.d.ts", + "LICENSE-MIT" + ], + "homepage": "https://github.com/kaelzhang/node-ignore#readme", + "keywords": [ + "ignore", + ".gitignore", + "gitignore", + "npmignore", + "rules", + "manager", + "filter", + "regexp", + "regex", + "fnmatch", + "glob", + "asterisks", + "regular-expression" + ], + "license": "MIT", + "name": "ignore", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/kaelzhang/node-ignore.git" + }, + "scripts": { + "build": "babel -o legacy.js index.js", + "posttest": "tap --coverage-report=html && codecov", + "prepublish": "npm run build", + "test": "npm run test-no-cov", + "test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage", + "test:git": "tap test/git-check-ignore.js", + "test:ignore": "tap test/ignore.js --coverage", + "test:lint": "eslint .", + "test:tsc": "tsc ./test/ts/simple.ts" + }, + "version": "4.0.6" +} diff --git a/node_modules/@humanwhocodes/config-array/CHANGELOG.md b/node_modules/@humanwhocodes/config-array/CHANGELOG.md index 96eb937bd..182b5d285 100644 --- a/node_modules/@humanwhocodes/config-array/CHANGELOG.md +++ b/node_modules/@humanwhocodes/config-array/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.9.3](https://www.github.com/humanwhocodes/config-array/compare/v0.9.2...v0.9.3) (2022-01-26) + + +### Bug Fixes + +* Make negated ignore patterns work like gitignore ([4ee8e99](https://www.github.com/humanwhocodes/config-array/commit/4ee8e998436e2c4538b06476e0bead8a44fe5a1b)) + ### [0.9.2](https://www.github.com/humanwhocodes/config-array/compare/v0.9.1...v0.9.2) (2021-11-02) diff --git a/node_modules/@humanwhocodes/config-array/README.md b/node_modules/@humanwhocodes/config-array/README.md index 8032d8344..bb0c989ad 100644 --- a/node_modules/@humanwhocodes/config-array/README.md +++ b/node_modules/@humanwhocodes/config-array/README.md @@ -176,6 +176,38 @@ If the `files` array contains an item that is an array of strings and functions, If a pattern in the files array begins with `!` then it excludes that pattern. In the preceding example, any filename that doesn't end with `.js` will automatically getting a `settings.js` property set to `false`. +You can also specify an `ignores` key that will force files matching those patterns to not be included. If the `ignores` key is in a config object without a `files` key, then those ignores will always be applied; if the `ignores` key is in a config object with a `files` key, then those ignores are only applied when `files` matches. Here's an example: + +```js +export default [ + + // Always ignored + { + ignores: ["**/.git/**", "**/node_modules/**"] + }, + + // .eslintrc.js file is ignored only when .js file matches + { + files: ["**/*.js"], + ignores: [".eslintrc.js"] + handler: jsHandler + } +]; +``` + +You can use negated patterns in `ignores` to exclude a file that was already ignored, such as: + +```js +export default [ + + // Ignore all JSON files except tsconfig.json + { + ignores: ["**/*.json", "!tsconfig.json"] + }, + +]; +``` + ### Config Functions Config arrays can also include config functions when `extraConfigTypes` contains `"function"`. A config function accepts a single parameter, `context` (defined by you), and must return either a config object or a config array (it cannot return another function). Config functions allow end users to execute code in the creation of appropriate config objects. Here's an example: diff --git a/node_modules/@humanwhocodes/config-array/api.js b/node_modules/@humanwhocodes/config-array/api.js index a7e979a56..3106ef4d6 100644 --- a/node_modules/@humanwhocodes/config-array/api.js +++ b/node_modules/@humanwhocodes/config-array/api.js @@ -225,17 +225,51 @@ function normalizeSync(items, context, extraConfigTypes) { /** * Determines if a given file path should be ignored based on the given * matcher. - * @param {string|() => boolean} matcher The pattern to match. + * @param {Array boolean>} ignores The ignore patterns to check. * @param {string} filePath The absolute path of the file to check. * @param {string} relativeFilePath The relative path of the file to check. * @returns {boolean} True if the path should be ignored and false if not. */ -function shouldIgnoreFilePath(matcher, filePath, relativeFilePath) { - if (typeof matcher === 'function') { - return matcher(filePath); +function shouldIgnoreFilePath(ignores, filePath, relativeFilePath) { + + let shouldIgnore = false; + + for (const matcher of ignores) { + + if (typeof matcher === 'function') { + shouldIgnore = shouldIgnore || matcher(filePath); + continue; + } + + /* + * If there's a negated pattern, that means anything matching + * must NOT be ignored. To do that, we need to use the `flipNegate` + * option for minimatch to check if the filepath matches the + * pattern specified after the !, and if that result is true, + * then we return false immediately because this file should + * never be ignored. + */ + if (matcher.startsWith('!')) { + + /* + * The file must already be ignored in order to apply a negated + * pattern, because negated patterns simply remove files that + * would already be ignored. + */ + if (shouldIgnore && + minimatch(relativeFilePath, matcher, { + ...MINIMATCH_OPTIONS, + flipNegate: true + })) { + return false; + } + } else { + shouldIgnore = shouldIgnore || minimatch(relativeFilePath, matcher, MINIMATCH_OPTIONS); + } + } - return minimatch(relativeFilePath, matcher, MINIMATCH_OPTIONS); + return shouldIgnore; } /** @@ -254,7 +288,7 @@ function pathMatches(filePath, basePath, config) { if (!config.files) { return true; } - + /* * For both files and ignores, functions are passed the absolute * file path while strings are compared against the relative @@ -282,7 +316,7 @@ function pathMatches(filePath, basePath, config) { }; const isFilePathIgnored = matcher => { - return shouldIgnoreFilePath(matcher, filePath, relativeFilePath); + return shouldIgnoreFilePath([matcher], filePath, relativeFilePath); }; // check for all matches to config.files @@ -379,47 +413,47 @@ class ConfigArray extends Array { super(); /** - * Tracks if the array has been normalized. - * @property isNormalized - * @type boolean - * @private - */ + * Tracks if the array has been normalized. + * @property isNormalized + * @type boolean + * @private + */ this[ConfigArraySymbol.isNormalized] = normalized; /** - * The schema used for validating and merging configs. - * @property schema - * @type ObjectSchema - * @private - */ + * The schema used for validating and merging configs. + * @property schema + * @type ObjectSchema + * @private + */ this[ConfigArraySymbol.schema] = new objectSchema.ObjectSchema({ ...customSchema, ...baseSchema }); /** - * The path of the config file that this array was loaded from. - * This is used to calculate filename matches. - * @property basePath - * @type string - */ + * The path of the config file that this array was loaded from. + * This is used to calculate filename matches. + * @property basePath + * @type string + */ this.basePath = basePath; assertExtraConfigTypes(extraConfigTypes); /** - * The supported config types. - * @property configTypes - * @type Array - */ + * The supported config types. + * @property configTypes + * @type Array + */ this.extraConfigTypes = Object.freeze([...extraConfigTypes]); /** - * A cache to store calculated configs for faster repeat lookup. - * @property configCache - * @type Map - * @private - */ + * A cache to store calculated configs for faster repeat lookup. + * @property configCache + * @type Map + * @private + */ this[ConfigArraySymbol.configCache] = new Map(); // init cache @@ -427,158 +461,158 @@ class ConfigArray extends Array { // load the configs into this array if (Array.isArray(configs)) { - this.push(...configs); + this.push(...configs); } else { - this.push(configs); + this.push(configs); } } - /** +/** * Prevent normal array methods from creating a new `ConfigArray` instance. * This is to ensure that methods such as `slice()` won't try to create a * new instance of `ConfigArray` behind the scenes as doing so may throw * an error due to the different constructor signature. * @returns {Function} The `Array` constructor. */ - static get [Symbol.species]() { - return Array; - } +static get [Symbol.species]() { + return Array; +} - /** +/** * Returns the `files` globs from every config object in the array. * This can be used to determine which files will be matched by a * config array or to use as a glob pattern when no patterns are provided * for a command line interface. * @returns {Array} An array of matchers. */ - get files() { +get files() { - assertNormalized(this); + assertNormalized(this); - // if this data has been cached, retrieve it - const cache = dataCache.get(this); + // if this data has been cached, retrieve it + const cache = dataCache.get(this); - if (cache.files) { - return cache.files; - } + if (cache.files) { + return cache.files; + } - // otherwise calculate it + // otherwise calculate it - const result = []; + const result = []; - for (const config of this) { - if (config.files) { - config.files.forEach(filePattern => { - result.push(filePattern); - }); - } + for (const config of this) { + if (config.files) { + config.files.forEach(filePattern => { + result.push(filePattern); + }); } + } - // store result - cache.files = result; - dataCache.set(this, cache); + // store result + cache.files = result; + dataCache.set(this, cache); - return result; - } + return result; +} - /** +/** * Returns ignore matchers that should always be ignored regardless of * the matching `files` fields in any configs. This is necessary to mimic * the behavior of things like .gitignore and .eslintignore, allowing a * globbing operation to be faster. * @returns {string[]} An array of string patterns and functions to be ignored. */ - get ignores() { +get ignores() { - assertNormalized(this); + assertNormalized(this); - // if this data has been cached, retrieve it - const cache = dataCache.get(this); + // if this data has been cached, retrieve it + const cache = dataCache.get(this); - if (cache.ignores) { - return cache.ignores; - } + if (cache.ignores) { + return cache.ignores; + } - // otherwise calculate it + // otherwise calculate it - const result = []; + const result = []; - for (const config of this) { - if (config.ignores && !config.files) { - result.push(...config.ignores); - } + for (const config of this) { + if (config.ignores && !config.files) { + result.push(...config.ignores); } + } - // store result - cache.ignores = result; - dataCache.set(this, cache); + // store result + cache.ignores = result; + dataCache.set(this, cache); - return result; - } + return result; +} - /** +/** * Indicates if the config array has been normalized. * @returns {boolean} True if the config array is normalized, false if not. */ - isNormalized() { - return this[ConfigArraySymbol.isNormalized]; - } +isNormalized() { + return this[ConfigArraySymbol.isNormalized]; +} - /** +/** * Normalizes a config array by flattening embedded arrays and executing * config functions. * @param {ConfigContext} context The context object for config functions. * @returns {Promise} The current ConfigArray instance. */ - async normalize(context = {}) { - - if (!this.isNormalized()) { - const normalizedConfigs = await normalize(this, context, this.extraConfigTypes); - this.length = 0; - this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig])); - this[ConfigArraySymbol.isNormalized] = true; +async normalize(context = {}) { - // prevent further changes - Object.freeze(this); - } + if (!this.isNormalized()) { + const normalizedConfigs = await normalize(this, context, this.extraConfigTypes); + this.length = 0; + this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig])); + this[ConfigArraySymbol.isNormalized] = true; - return this; + // prevent further changes + Object.freeze(this); } - /** + return this; +} + +/** * Normalizes a config array by flattening embedded arrays and executing * config functions. * @param {ConfigContext} context The context object for config functions. * @returns {ConfigArray} The current ConfigArray instance. */ - normalizeSync(context = {}) { - - if (!this.isNormalized()) { - const normalizedConfigs = normalizeSync(this, context, this.extraConfigTypes); - this.length = 0; - this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig])); - this[ConfigArraySymbol.isNormalized] = true; +normalizeSync(context = {}) { - // prevent further changes - Object.freeze(this); - } + if (!this.isNormalized()) { + const normalizedConfigs = normalizeSync(this, context, this.extraConfigTypes); + this.length = 0; + this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig])); + this[ConfigArraySymbol.isNormalized] = true; - return this; + // prevent further changes + Object.freeze(this); } - /** + return this; +} + +/** * Finalizes the state of a config before being cached and returned by * `getConfig()`. Does nothing by default but is provided to be * overridden by subclasses as necessary. * @param {Object} config The config to finalize. * @returns {Object} The finalized config. */ - [ConfigArraySymbol.finalizeConfig](config) { - return config; - } +[ConfigArraySymbol.finalizeConfig](config) { + return config; +} - /** +/** * Preprocesses a config during the normalization process. This is the * method to override if you want to convert an array item before it is * validated for the first time. For example, if you want to replace a @@ -586,80 +620,77 @@ class ConfigArray extends Array { * @param {Object} config The config to preprocess. * @returns {Object} The config to use in place of the argument. */ - [ConfigArraySymbol.preprocessConfig](config) { - return config; - } +[ConfigArraySymbol.preprocessConfig](config) { + return config; +} - /** +/** * Returns the config object for a given file path. * @param {string} filePath The complete path of a file to get a config for. * @returns {Object} The config object for this file. */ - getConfig(filePath) { +getConfig(filePath) { - assertNormalized(this); + assertNormalized(this); - // first check the cache to avoid duplicate work - let finalConfig = this[ConfigArraySymbol.configCache].get(filePath); + // first check the cache to avoid duplicate work + let finalConfig = this[ConfigArraySymbol.configCache].get(filePath); - if (finalConfig) { - return finalConfig; - } + if (finalConfig) { + return finalConfig; + } - // TODO: Maybe move elsewhere? - const relativeFilePath = path.relative(this.basePath, filePath); + // TODO: Maybe move elsewhere? + const relativeFilePath = path.relative(this.basePath, filePath); - // if there is a global matcher ignoring this file, just return null - for (const shouldIgnore of this.ignores) { - if (shouldIgnoreFilePath(shouldIgnore, filePath, relativeFilePath)) { + if (shouldIgnoreFilePath(this.ignores, filePath, relativeFilePath)) { - // cache and return result - finalConfig is undefined at this point - this[ConfigArraySymbol.configCache].set(filePath, finalConfig); - return finalConfig; - } - } + // cache and return result - finalConfig is undefined at this point + this[ConfigArraySymbol.configCache].set(filePath, finalConfig); + return finalConfig; + } - // filePath isn't automatically ignored, so try to construct config + // filePath isn't automatically ignored, so try to construct config - const matchingConfigs = []; + const matchingConfigs = []; - for (const config of this) { - if (pathMatches(filePath, this.basePath, config)) { - debug(`Matching config found for ${filePath}`); - matchingConfigs.push(config); - } else { - debug(`No matching config found for ${filePath}`); - } - } - - // if matching both files and ignores, there will be no config to create - if (matchingConfigs.length === 0) { - // cache and return result - finalConfig is undefined at this point - this[ConfigArraySymbol.configCache].set(filePath, finalConfig); - return finalConfig; + for (const config of this) { + if (pathMatches(filePath, this.basePath, config)) { + debug(`Matching config found for ${filePath}`); + matchingConfigs.push(config); + } else { + debug(`No matching config found for ${filePath}`); } + } - // otherwise construct the config + // if matching both files and ignores, there will be no config to create + if (matchingConfigs.length === 0) { + // cache and return result - finalConfig is undefined at this point + this[ConfigArraySymbol.configCache].set(filePath, finalConfig); + return finalConfig; + } - finalConfig = matchingConfigs.reduce((result, config) => { - return this[ConfigArraySymbol.schema].merge(result, config); - }, {}, this); + // otherwise construct the config - finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig); + finalConfig = matchingConfigs.reduce((result, config) => { + return this[ConfigArraySymbol.schema].merge(result, config); + }, {}, this); - this[ConfigArraySymbol.configCache].set(filePath, finalConfig); + finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig); - return finalConfig; - } + this[ConfigArraySymbol.configCache].set(filePath, finalConfig); - /** + return finalConfig; +} + +/** * Determines if the given filepath is ignored based on the configs. * @param {string} filePath The complete path of a file to check. * @returns {boolean} True if the path is ignored, false if not. */ - isIgnored(filePath) { - return this.getConfig(filePath) === undefined; - } +isIgnored(filePath) { + return this.getConfig(filePath) === undefined; +} } diff --git a/node_modules/@humanwhocodes/config-array/package.json b/node_modules/@humanwhocodes/config-array/package.json index bfa7934ea..fe43ea636 100644 --- a/node_modules/@humanwhocodes/config-array/package.json +++ b/node_modules/@humanwhocodes/config-array/package.json @@ -1,41 +1,45 @@ { - "_from": "@humanwhocodes/config-array@^0.9.2", - "_id": "@humanwhocodes/config-array@0.9.2", + "_args": [ + [ + "@humanwhocodes/config-array@0.9.3", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_development": true, + "_from": "@humanwhocodes/config-array@0.9.3", + "_id": "@humanwhocodes/config-array@0.9.3", "_inBundle": false, - "_integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "_integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", "_location": "/@humanwhocodes/config-array", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "@humanwhocodes/config-array@^0.9.2", + "raw": "@humanwhocodes/config-array@0.9.3", "name": "@humanwhocodes/config-array", "escapedName": "@humanwhocodes%2fconfig-array", "scope": "@humanwhocodes", - "rawSpec": "^0.9.2", + "rawSpec": "0.9.3", "saveSpec": null, - "fetchSpec": "^0.9.2" + "fetchSpec": "0.9.3" }, "_requiredBy": [ "/eslint" ], - "_resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", - "_shasum": "68be55c737023009dfc5fe245d51181bb6476914", - "_spec": "@humanwhocodes/config-array@^0.9.2", - "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue/node_modules/eslint", + "_resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", + "_spec": "0.9.3", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", "author": { "name": "Nicholas C. Zakas" }, "bugs": { "url": "https://github.com/humanwhocodes/config-array/issues" }, - "bundleDependencies": false, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" }, - "deprecated": false, "description": "Glob-based configuration matching.", "devDependencies": { "@nitpik/javascript": "^0.3.3", @@ -85,5 +89,5 @@ "test": "mocha -r esm tests/ --recursive", "test:coverage": "nyc --include src/*.js npm run test" }, - "version": "0.9.2" + "version": "0.9.3" } diff --git a/node_modules/ansi-colors/README.md b/node_modules/ansi-colors/README.md deleted file mode 100644 index dcdbcb503..000000000 --- a/node_modules/ansi-colors/README.md +++ /dev/null @@ -1,315 +0,0 @@ -# ansi-colors [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) - -> Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs). - -Please consider following this project's author, [Brian Woodward](https://github.com/doowb), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save ansi-colors -``` - -![image](https://user-images.githubusercontent.com/383994/39635445-8a98a3a6-4f8b-11e8-89c1-068c45d4fff8.png) - -## Why use this? - -ansi-colors is _the fastest Node.js library for terminal styling_. A more performant drop-in replacement for chalk, with no dependencies. - -* _Blazing fast_ - Fastest terminal styling library in node.js, 10-20x faster than chalk! - -* _Drop-in replacement_ for [chalk](https://github.com/chalk/chalk). -* _No dependencies_ (Chalk has 7 dependencies in its tree!) - -* _Safe_ - Does not modify the `String.prototype` like [colors](https://github.com/Marak/colors.js). -* Supports [nested colors](#nested-colors), **and does not have the [nested styling bug](#nested-styling-bug) that is present in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur)**. -* Supports [chained colors](#chained-colors). -* [Toggle color support](#toggle-color-support) on or off. - -## Usage - -```js -const c = require('ansi-colors'); - -console.log(c.red('This is a red string!')); -console.log(c.green('This is a red string!')); -console.log(c.cyan('This is a cyan string!')); -console.log(c.yellow('This is a yellow string!')); -``` - -![image](https://user-images.githubusercontent.com/383994/39653848-a38e67da-4fc0-11e8-89ae-98c65ebe9dcf.png) - -## Chained colors - -```js -console.log(c.bold.red('this is a bold red message')); -console.log(c.bold.yellow.italic('this is a bold yellow italicized message')); -console.log(c.green.bold.underline('this is a bold green underlined message')); -``` - -![image](https://user-images.githubusercontent.com/383994/39635780-7617246a-4f8c-11e8-89e9-05216cc54e38.png) - -## Nested colors - -```js -console.log(c.yellow(`foo ${c.red.bold('red')} bar ${c.cyan('cyan')} baz`)); -``` - -![image](https://user-images.githubusercontent.com/383994/39635817-8ed93d44-4f8c-11e8-8afd-8c3ea35f5fbe.png) - -### Nested styling bug - -`ansi-colors` does not have the nested styling bug found in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur). - -```js -const { bold, red } = require('ansi-styles'); -console.log(bold(`foo ${red.dim('bar')} baz`)); - -const colorette = require('colorette'); -console.log(colorette.bold(`foo ${colorette.red(colorette.dim('bar'))} baz`)); - -const kleur = require('kleur'); -console.log(kleur.bold(`foo ${kleur.red.dim('bar')} baz`)); - -const chalk = require('chalk'); -console.log(chalk.bold(`foo ${chalk.red.dim('bar')} baz`)); -``` - -**Results in the following** - -(sans icons and labels) - -![image](https://user-images.githubusercontent.com/383994/47280326-d2ee0580-d5a3-11e8-9611-ea6010f0a253.png) - -## Toggle color support - -Easily enable/disable colors. - -```js -const c = require('ansi-colors'); - -// disable colors manually -c.enabled = false; - -// or use a library to automatically detect support -c.enabled = require('color-support').hasBasic; - -console.log(c.red('I will only be colored red if the terminal supports colors')); -``` - -## Strip ANSI codes - -Use the `.unstyle` method to strip ANSI codes from a string. - -```js -console.log(c.unstyle(c.blue.bold('foo bar baz'))); -//=> 'foo bar baz' -``` - -## Available styles - -**Note** that bright and bright-background colors are not always supported. - -| Colors | Background Colors | Bright Colors | Bright Background Colors | -| ------- | ----------------- | ------------- | ------------------------ | -| black | bgBlack | blackBright | bgBlackBright | -| red | bgRed | redBright | bgRedBright | -| green | bgGreen | greenBright | bgGreenBright | -| yellow | bgYellow | yellowBright | bgYellowBright | -| blue | bgBlue | blueBright | bgBlueBright | -| magenta | bgMagenta | magentaBright | bgMagentaBright | -| cyan | bgCyan | cyanBright | bgCyanBright | -| white | bgWhite | whiteBright | bgWhiteBright | -| gray | | | | -| grey | | | | - -_(`gray` is the U.S. spelling, `grey` is more commonly used in the Canada and U.K.)_ - -### Style modifiers - -* dim -* **bold** - -* hidden -* _italic_ - -* underline -* inverse -* ~~strikethrough~~ - -* reset - -## Aliases - -Create custom aliases for styles. - -```js -const colors = require('ansi-colors'); - -colors.alias('primary', colors.yellow); -colors.alias('secondary', colors.bold); - -console.log(colors.primary.secondary('Foo')); -``` - -## Themes - -A theme is an object of custom aliases. - -```js -const colors = require('ansi-colors'); - -colors.theme({ - danger: colors.red, - dark: colors.dim.gray, - disabled: colors.gray, - em: colors.italic, - heading: colors.bold.underline, - info: colors.cyan, - muted: colors.dim, - primary: colors.blue, - strong: colors.bold, - success: colors.green, - underline: colors.underline, - warning: colors.yellow -}); - -// Now, we can use our custom styles alongside the built-in styles! -console.log(colors.danger.strong.em('Error!')); -console.log(colors.warning('Heads up!')); -console.log(colors.info('Did you know...')); -console.log(colors.success.bold('It worked!')); -``` - -## Performance - -**Libraries tested** - -* ansi-colors v3.0.4 -* chalk v2.4.1 - -### Mac - -> MacBook Pro, Intel Core i7, 2.3 GHz, 16 GB. - -**Load time** - -Time it takes to load the first time `require()` is called: - -* ansi-colors - `1.915ms` -* chalk - `12.437ms` - -**Benchmarks** - -``` -# All Colors - ansi-colors x 173,851 ops/sec ±0.42% (91 runs sampled) - chalk x 9,944 ops/sec ±2.53% (81 runs sampled))) - -# Chained colors - ansi-colors x 20,791 ops/sec ±0.60% (88 runs sampled) - chalk x 2,111 ops/sec ±2.34% (83 runs sampled) - -# Nested colors - ansi-colors x 59,304 ops/sec ±0.98% (92 runs sampled) - chalk x 4,590 ops/sec ±2.08% (82 runs sampled) -``` - -### Windows - -> Windows 10, Intel Core i7-7700k CPU @ 4.2 GHz, 32 GB - -**Load time** - -Time it takes to load the first time `require()` is called: - -* ansi-colors - `1.494ms` -* chalk - `11.523ms` - -**Benchmarks** - -``` -# All Colors - ansi-colors x 193,088 ops/sec ±0.51% (95 runs sampled)) - chalk x 9,612 ops/sec ±3.31% (77 runs sampled))) - -# Chained colors - ansi-colors x 26,093 ops/sec ±1.13% (94 runs sampled) - chalk x 2,267 ops/sec ±2.88% (80 runs sampled)) - -# Nested colors - ansi-colors x 67,747 ops/sec ±0.49% (93 runs sampled) - chalk x 4,446 ops/sec ±3.01% (82 runs sampled)) -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [ansi-wrap](https://www.npmjs.com/package/ansi-wrap): Create ansi colors by passing the open and close codes. | [homepage](https://github.com/jonschlinkert/ansi-wrap "Create ansi colors by passing the open and close codes.") -* [strip-color](https://www.npmjs.com/package/strip-color): Strip ANSI color codes from a string. No dependencies. | [homepage](https://github.com/jonschlinkert/strip-color "Strip ANSI color codes from a string. No dependencies.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 48 | [jonschlinkert](https://github.com/jonschlinkert) | -| 42 | [doowb](https://github.com/doowb) | -| 6 | [lukeed](https://github.com/lukeed) | -| 2 | [Silic0nS0ldier](https://github.com/Silic0nS0ldier) | -| 1 | [dwieeb](https://github.com/dwieeb) | -| 1 | [jorgebucaran](https://github.com/jorgebucaran) | -| 1 | [madhavarshney](https://github.com/madhavarshney) | -| 1 | [chapterjason](https://github.com/chapterjason) | - -### Author - -**Brian Woodward** - -* [GitHub Profile](https://github.com/doowb) -* [Twitter Profile](https://twitter.com/doowb) -* [LinkedIn Profile](https://linkedin.com/in/woodwardbrian) - -### License - -Copyright © 2019, [Brian Woodward](https://github.com/doowb). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on July 01, 2019._ \ No newline at end of file diff --git a/node_modules/ansi-colors/index.js b/node_modules/ansi-colors/index.js deleted file mode 100644 index 8e2641904..000000000 --- a/node_modules/ansi-colors/index.js +++ /dev/null @@ -1,177 +0,0 @@ -'use strict'; - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -const identity = val => val; - -/* eslint-disable no-control-regex */ -// this is a modified version of https://github.com/chalk/ansi-regex (MIT License) -const ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g; - -const create = () => { - const colors = { enabled: true, visible: true, styles: {}, keys: {} }; - - if ('FORCE_COLOR' in process.env) { - colors.enabled = process.env.FORCE_COLOR !== '0'; - } - - const ansi = style => { - let open = style.open = `\u001b[${style.codes[0]}m`; - let close = style.close = `\u001b[${style.codes[1]}m`; - let regex = style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'); - style.wrap = (input, newline) => { - if (input.includes(close)) input = input.replace(regex, close + open); - let output = open + input + close; - // see https://github.com/chalk/chalk/pull/92, thanks to the - // chalk contributors for this fix. However, we've confirmed that - // this issue is also present in Windows terminals - return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output; - }; - return style; - }; - - const wrap = (style, input, newline) => { - return typeof style === 'function' ? style(input) : style.wrap(input, newline); - }; - - const style = (input, stack) => { - if (input === '' || input == null) return ''; - if (colors.enabled === false) return input; - if (colors.visible === false) return ''; - let str = '' + input; - let nl = str.includes('\n'); - let n = stack.length; - if (n > 0 && stack.includes('unstyle')) { - stack = [...new Set(['unstyle', ...stack])].reverse(); - } - while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl); - return str; - }; - - const define = (name, codes, type) => { - colors.styles[name] = ansi({ name, codes }); - let keys = colors.keys[type] || (colors.keys[type] = []); - keys.push(name); - - Reflect.defineProperty(colors, name, { - configurable: true, - enumerable: true, - set(value) { - colors.alias(name, value); - }, - get() { - let color = input => style(input, color.stack); - Reflect.setPrototypeOf(color, colors); - color.stack = this.stack ? this.stack.concat(name) : [name]; - return color; - } - }); - }; - - define('reset', [0, 0], 'modifier'); - define('bold', [1, 22], 'modifier'); - define('dim', [2, 22], 'modifier'); - define('italic', [3, 23], 'modifier'); - define('underline', [4, 24], 'modifier'); - define('inverse', [7, 27], 'modifier'); - define('hidden', [8, 28], 'modifier'); - define('strikethrough', [9, 29], 'modifier'); - - define('black', [30, 39], 'color'); - define('red', [31, 39], 'color'); - define('green', [32, 39], 'color'); - define('yellow', [33, 39], 'color'); - define('blue', [34, 39], 'color'); - define('magenta', [35, 39], 'color'); - define('cyan', [36, 39], 'color'); - define('white', [37, 39], 'color'); - define('gray', [90, 39], 'color'); - define('grey', [90, 39], 'color'); - - define('bgBlack', [40, 49], 'bg'); - define('bgRed', [41, 49], 'bg'); - define('bgGreen', [42, 49], 'bg'); - define('bgYellow', [43, 49], 'bg'); - define('bgBlue', [44, 49], 'bg'); - define('bgMagenta', [45, 49], 'bg'); - define('bgCyan', [46, 49], 'bg'); - define('bgWhite', [47, 49], 'bg'); - - define('blackBright', [90, 39], 'bright'); - define('redBright', [91, 39], 'bright'); - define('greenBright', [92, 39], 'bright'); - define('yellowBright', [93, 39], 'bright'); - define('blueBright', [94, 39], 'bright'); - define('magentaBright', [95, 39], 'bright'); - define('cyanBright', [96, 39], 'bright'); - define('whiteBright', [97, 39], 'bright'); - - define('bgBlackBright', [100, 49], 'bgBright'); - define('bgRedBright', [101, 49], 'bgBright'); - define('bgGreenBright', [102, 49], 'bgBright'); - define('bgYellowBright', [103, 49], 'bgBright'); - define('bgBlueBright', [104, 49], 'bgBright'); - define('bgMagentaBright', [105, 49], 'bgBright'); - define('bgCyanBright', [106, 49], 'bgBright'); - define('bgWhiteBright', [107, 49], 'bgBright'); - - colors.ansiRegex = ANSI_REGEX; - colors.hasColor = colors.hasAnsi = str => { - colors.ansiRegex.lastIndex = 0; - return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str); - }; - - colors.alias = (name, color) => { - let fn = typeof color === 'string' ? colors[color] : color; - - if (typeof fn !== 'function') { - throw new TypeError('Expected alias to be the name of an existing color (string) or a function'); - } - - if (!fn.stack) { - Reflect.defineProperty(fn, 'name', { value: name }); - colors.styles[name] = fn; - fn.stack = [name]; - } - - Reflect.defineProperty(colors, name, { - configurable: true, - enumerable: true, - set(value) { - colors.alias(name, value); - }, - get() { - let color = input => style(input, color.stack); - Reflect.setPrototypeOf(color, colors); - color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack; - return color; - } - }); - }; - - colors.theme = custom => { - if (!isObject(custom)) throw new TypeError('Expected theme to be an object'); - for (let name of Object.keys(custom)) { - colors.alias(name, custom[name]); - } - return colors; - }; - - colors.alias('unstyle', str => { - if (typeof str === 'string' && str !== '') { - colors.ansiRegex.lastIndex = 0; - return str.replace(colors.ansiRegex, ''); - } - return ''; - }); - - colors.alias('noop', str => str); - colors.none = colors.clear = colors.noop; - - colors.stripColor = colors.unstyle; - colors.symbols = require('./symbols'); - colors.define = define; - return colors; -}; - -module.exports = create(); -module.exports.create = create; diff --git a/node_modules/ansi-colors/package.json b/node_modules/ansi-colors/package.json deleted file mode 100644 index 6d594d2ae..000000000 --- a/node_modules/ansi-colors/package.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "_from": "ansi-colors@^4.1.1", - "_id": "ansi-colors@4.1.1", - "_inBundle": false, - "_integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "_location": "/ansi-colors", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ansi-colors@^4.1.1", - "name": "ansi-colors", - "escapedName": "ansi-colors", - "rawSpec": "^4.1.1", - "saveSpec": null, - "fetchSpec": "^4.1.1" - }, - "_requiredBy": [ - "/enquirer" - ], - "_resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "_shasum": "cbb9ae256bf750af1eab344f229aa27fe94ba348", - "_spec": "ansi-colors@^4.1.1", - "_where": "/Users/pozil/poz/git/auto-assign-issue/node_modules/enquirer", - "author": { - "name": "Brian Woodward", - "url": "https://github.com/doowb" - }, - "bugs": { - "url": "https://github.com/doowb/ansi-colors/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jason Schilling", - "url": "https://sourecode.de" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Jordan", - "url": "https://github.com/Silic0nS0ldier" - } - ], - "deprecated": false, - "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", - "devDependencies": { - "decache": "^4.5.1", - "gulp-format-md": "^2.0.0", - "justified": "^1.0.1", - "mocha": "^6.1.4", - "text-table": "^0.2.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "symbols.js", - "types/index.d.ts" - ], - "homepage": "https://github.com/doowb/ansi-colors", - "keywords": [ - "ansi", - "bgblack", - "bgBlack", - "bgblue", - "bgBlue", - "bgcyan", - "bgCyan", - "bggreen", - "bgGreen", - "bgmagenta", - "bgMagenta", - "bgred", - "bgRed", - "bgwhite", - "bgWhite", - "bgyellow", - "bgYellow", - "black", - "blue", - "bold", - "clorox", - "colors", - "cyan", - "dim", - "gray", - "green", - "grey", - "hidden", - "inverse", - "italic", - "kleur", - "magenta", - "red", - "reset", - "strikethrough", - "underline", - "white", - "yellow" - ], - "license": "MIT", - "main": "index.js", - "name": "ansi-colors", - "repository": { - "type": "git", - "url": "git+https://github.com/doowb/ansi-colors.git" - }, - "scripts": { - "test": "mocha" - }, - "types": "./types/index.d.ts", - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "data": { - "author": { - "linkedin": "woodwardbrian", - "twitter": "doowb" - } - }, - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "ansi-wrap", - "strip-color" - ] - }, - "reflinks": [ - "chalk", - "colorette", - "colors", - "kleur" - ] - }, - "version": "4.1.1" -} diff --git a/node_modules/ansi-colors/symbols.js b/node_modules/ansi-colors/symbols.js deleted file mode 100644 index ee1594573..000000000 --- a/node_modules/ansi-colors/symbols.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -const isHyper = process.env.TERM_PROGRAM === 'Hyper'; -const isWindows = process.platform === 'win32'; -const isLinux = process.platform === 'linux'; - -const common = { - ballotDisabled: '☒', - ballotOff: '☐', - ballotOn: '☑', - bullet: '•', - bulletWhite: '◦', - fullBlock: '█', - heart: '❤', - identicalTo: '≡', - line: '─', - mark: '※', - middot: '·', - minus: '-', - multiplication: '×', - obelus: '÷', - pencilDownRight: '✎', - pencilRight: '✏', - pencilUpRight: '✐', - percent: '%', - pilcrow2: '❡', - pilcrow: '¶', - plusMinus: '±', - section: '§', - starsOff: '☆', - starsOn: '★', - upDownArrow: '↕' -}; - -const windows = Object.assign({}, common, { - check: '√', - cross: '×', - ellipsisLarge: '...', - ellipsis: '...', - info: 'i', - question: '?', - questionSmall: '?', - pointer: '>', - pointerSmall: '»', - radioOff: '( )', - radioOn: '(*)', - warning: '‼' -}); - -const other = Object.assign({}, common, { - ballotCross: '✘', - check: '✔', - cross: '✖', - ellipsisLarge: '⋯', - ellipsis: '…', - info: 'ℹ', - question: '?', - questionFull: '?', - questionSmall: '﹖', - pointer: isLinux ? '▸' : '❯', - pointerSmall: isLinux ? '‣' : '›', - radioOff: '◯', - radioOn: '◉', - warning: '⚠' -}); - -module.exports = (isWindows && !isHyper) ? windows : other; -Reflect.defineProperty(module.exports, 'common', { enumerable: false, value: common }); -Reflect.defineProperty(module.exports, 'windows', { enumerable: false, value: windows }); -Reflect.defineProperty(module.exports, 'other', { enumerable: false, value: other }); diff --git a/node_modules/ansi-colors/types/index.d.ts b/node_modules/ansi-colors/types/index.d.ts deleted file mode 100644 index ca2d24acb..000000000 --- a/node_modules/ansi-colors/types/index.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -// Imported from DefinitelyTyped project. -// TypeScript definitions for ansi-colors -// Definitions by: Rogier Schouten -// Integrated by: Jordan Mele - -interface SymbolsType { - check: string; - cross: string; - info: string; - line: string; - pointer: string; - pointerSmall: string; - question: string; - warning: string; -} - -type StyleArrayStructure = [number, number]; -interface StyleArrayProperties { - open: string; - close: string; - closeRe: string; -} - -type StyleType = StyleArrayStructure & StyleArrayProperties; - -export interface StyleFunction extends StylesType { - (s: string): string; -} - -interface StylesType { - // modifiers - reset: T; - bold: T; - dim: T; - italic: T; - underline: T; - inverse: T; - hidden: T; - strikethrough: T; - - // colors - black: T; - red: T; - green: T; - yellow: T; - blue: T; - magenta: T; - cyan: T; - white: T; - gray: T; - grey: T; - - // bright colors - blackBright: T; - redBright: T; - greenBright: T; - yellowBright: T; - blueBright: T; - magentaBright: T; - cyanBright: T; - whiteBright: T; - - // background colors - bgBlack: T; - bgRed: T; - bgGreen: T; - bgYellow: T; - bgBlue: T; - bgMagenta: T; - bgCyan: T; - bgWhite: T; - - // bright background colors - bgBlackBright: T; - bgRedBright: T; - bgGreenBright: T; - bgYellowBright: T; - bgBlueBright: T; - bgMagentaBright: T; - bgCyanBright: T; - bgWhiteBright: T; -} - -// modifiers -export const reset: StyleFunction; -export const bold: StyleFunction; -export const dim: StyleFunction; -export const italic: StyleFunction; -export const underline: StyleFunction; -export const inverse: StyleFunction; -export const hidden: StyleFunction; -export const strikethrough: StyleFunction; - -// colors -export const black: StyleFunction; -export const red: StyleFunction; -export const green: StyleFunction; -export const yellow: StyleFunction; -export const blue: StyleFunction; -export const magenta: StyleFunction; -export const cyan: StyleFunction; -export const white: StyleFunction; -export const gray: StyleFunction; -export const grey: StyleFunction; - -// bright colors -export const blackBright: StyleFunction; -export const redBright: StyleFunction; -export const greenBright: StyleFunction; -export const yellowBright: StyleFunction; -export const blueBright: StyleFunction; -export const magentaBright: StyleFunction; -export const cyanBright: StyleFunction; -export const whiteBright: StyleFunction; - -// background colors -export const bgBlack: StyleFunction; -export const bgRed: StyleFunction; -export const bgGreen: StyleFunction; -export const bgYellow: StyleFunction; -export const bgBlue: StyleFunction; -export const bgMagenta: StyleFunction; -export const bgCyan: StyleFunction; -export const bgWhite: StyleFunction; - -// bright background colors -export const bgBlackBright: StyleFunction; -export const bgRedBright: StyleFunction; -export const bgGreenBright: StyleFunction; -export const bgYellowBright: StyleFunction; -export const bgBlueBright: StyleFunction; -export const bgMagentaBright: StyleFunction; -export const bgCyanBright: StyleFunction; -export const bgWhiteBright: StyleFunction; - -export let enabled: boolean; -export let visible: boolean; -export const ansiRegex: RegExp; - -/** - * Remove styles from string - */ -export function stripColor(s: string): string; - -/** - * Remove styles from string - */ -export function strip(s: string): string; - -/** - * Remove styles from string - */ -export function unstyle(s: string): string; - -export const styles: StylesType; -export const symbols: SymbolsType; - -/** - * Outputs a string with check-symbol as prefix - */ -export function ok(...args: string[]): string; diff --git a/node_modules/enquirer/CHANGELOG.md b/node_modules/enquirer/CHANGELOG.md deleted file mode 100644 index c9ec854a2..000000000 --- a/node_modules/enquirer/CHANGELOG.md +++ /dev/null @@ -1,135 +0,0 @@ -# Release history - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -
- Guiding Principles - -- Changelogs are for humans, not machines. -- There should be an entry for every single version. -- The same types of changes should be grouped. -- Versions and sections should be linkable. -- The latest version comes first. -- The release date of each versions is displayed. -- Mention whether you follow Semantic Versioning. - -
- -
- Types of changes - -Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): - -- `Added` for new features. -- `Changed` for changes in existing functionality. -- `Deprecated` for soon-to-be removed features. -- `Removed` for now removed features. -- `Fixed` for any bug fixes. -- `Security` in case of vulnerabilities. - -
- -## 2.3.6 - 2020-07-02 - -### Changed - -- Upgraded [ansi-colors](https://github.com/doowb/ansi-colors) dependency to v4, thanks to [@trySound](https://github.com/TrySound), [#297](https://github.com/enquirer/enquirer/pull/297). - -## 2.3.5 - 2020-04-07 - -### Fixed - -- PR #259 fixed typing numbers in the autocomplete prompt, which fixes #112, #199, and #237 -- PR #266 add the `template` property to the `SnippetPromptOptions` TypeScript interface - -## 2.3.4 - 2020-01-13 - -### Added - -- `MultiSelectPrompt` new example for `result` option. - -### Fixed - -- Updated typings to use `EventEmitter` class from `events` directly due to changes in `@types/node`. - - -## 2.3.3 - 2020-01-13 - -### Added - -- `BooleanPrompt` new example for `header` option. - -### Fixed - -- using `await` in `keypress` and returning the `number` result in the `array` type fixes an issue with tests failing only on Travis -- `autocomplete` highlighting issue -- Typos in some documentation and example comments. -- Syntax errors in example code on the README.md. - -## 2.3.2 - 2019-09-17 - -### Added - -- `AuthPrompt` type for creating authentication based prompts. -- `BasicAuth` prompt as an example of creating an authentication prompt using basic username/password authentication -- Examples for different authentication prompts. -- `QuizPrompt` - -### Fixed - -- More examples were updated to fix any known bugs. -- Couple of fixes to the editable and autocomplete prompts. -- Documentation updates to highlight options available to some prompts. - -## 2.3.1 - 2019-07-12 - -### Fixed - -- Several examples were updated to align with latest code changes and to fix small bugs found in the implementation of the example. -- Some bugs found from updating examples were fixed. -- Updates to documentation to provide more information on how to use prompts and the options available. - -## 2.1.0 - 2018-11-29 - -### Fixed - -- Several improvements were made for handling custom `format`, `result` and `initial` functions defined on the options. - -## 2.0.7 - 2018-11-14 - -### Fixed - -- `validate` function now properly accepts `false` as a return value, thanks to [@g-plane](https://github.com/g-plane). - -### Added - -- Adds support for ctrl+n to add choices -- Adds support for `options.required` on all prompts. Uses the built-in `validate()` function, allowing this functionality to be overridden or customized. -- Adds support for `options.scroll` to disable scrolling in array prompts. -- Adds support for `options.onRun`, which is called when `prompt.run()` is called, after the readline instance is created. -- Adds support for `options.history` on the `Input` and `Text` prompts. -- Adds support for `options.term` to set the terminal, thanks to [@tunnckoCore](https://github.com/tunnckoCore). At the moment this is only used in a couple of edge cases with the `Survey` and `Scale` prompts to check if the terminal is Hyper. -- `options.skip` may now be a Boolean, thanks to [@tunnckoCore](https://github.com/tunnckoCore) - -## 2.0.0 - 2018-11-07 - -### Changed - -Enquire 2.0 is a bottom-up complete re-write: - -- Several prompts that were previously published as individual packages will be included in Enquirer itself. -- Why? - As users, we didn't like having to add commonly-used prompts as plugins. Enquirer 2.0 will still support custom prompts as plugins, but many prompts will also be built-in. -- Enquirer will only have a single dependency, https://github.com/doowb/ansi-colors, which itself has no other dependencies). This will make Enquirer easier to maintain and faster for users. -- Methods for registering "questions" have been removed. While it was nice to be able to preregister questions that could be called upon later, this is something that is better left to implementors, as it's relatively trivial to do with custom code. -- `options.default` is now `options.initial` - -### Added - -- Many prompts that were previously separate packages are now bundled into Enquirer itself. - - -[Unreleased]: https://github.com/enquirer/enquirer/compare/2.0.2...HEAD -[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/enquirer/LICENSE b/node_modules/enquirer/LICENSE deleted file mode 100644 index 681d1bf72..000000000 --- a/node_modules/enquirer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/enquirer/README.md b/node_modules/enquirer/README.md deleted file mode 100644 index 159874228..000000000 --- a/node_modules/enquirer/README.md +++ /dev/null @@ -1,1752 +0,0 @@ -

Enquirer

- -

- -version - - -travis - - -downloads - -

- -
-
- -

-Stylish CLI prompts that are user-friendly, intuitive and easy to create.
->_ Prompts should be more like conversations than inquisitions▌ -

- -
- -

-(Example shows Enquirer's Survey Prompt) -Enquirer Survey Prompt
-The terminal in all examples is Hyper, theme is hyper-monokai-extended.

-See more prompt examples -

- -
-
- -Created by [jonschlinkert](https://github.com/jonschlinkert) and [doowb](https://github.com/doowb), Enquirer is fast, easy to use, and lightweight enough for small projects, while also being powerful and customizable enough for the most advanced use cases. - -* **Fast** - [Loads in ~4ms](#-performance) (that's about _3-4 times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps_) -* **Lightweight** - Only one dependency, the excellent [ansi-colors](https://github.com/doowb/ansi-colors) by [Brian Woodward](https://github.com/doowb). -* **Easy to implement** - Uses promises and async/await and sensible defaults to make prompts easy to create and implement. -* **Easy to use** - Thrill your users with a better experience! Navigating around input and choices is a breeze. You can even create [quizzes](examples/fun/countdown.js), or [record](examples/fun/record.js) and [playback](examples/fun/play.js) key bindings to aid with tutorials and videos. -* **Intuitive** - Keypress combos are available to simplify usage. -* **Flexible** - All prompts can be used standalone or chained together. -* **Stylish** - Easily override semantic styles and symbols for any part of the prompt. -* **Extensible** - Easily create and use custom prompts by extending Enquirer's built-in [prompts](#-prompts). -* **Pluggable** - Add advanced features to Enquirer using plugins. -* **Validation** - Optionally validate user input with any prompt. -* **Well tested** - All prompts are well-tested, and tests are easy to create without having to use brittle, hacky solutions to spy on prompts or "inject" values. -* **Examples** - There are numerous [examples](examples) available to help you get started. - -If you like Enquirer, please consider starring or tweeting about this project to show your support. Thanks! - -
- -

->_ Ready to start making prompts your users will love? ▌
-Enquirer Select Prompt with heartbeat example -

- -
-
- -## ❯ Getting started - -Get started with Enquirer, the most powerful and easy-to-use Node.js library for creating interactive CLI prompts. - -* [Install](#-install) -* [Usage](#-usage) -* [Enquirer](#-enquirer) -* [Prompts](#-prompts) - - [Built-in Prompts](#-prompts) - - [Custom Prompts](#-custom-prompts) -* [Key Bindings](#-key-bindings) -* [Options](#-options) -* [Release History](#-release-history) -* [Performance](#-performance) -* [About](#-about) - -
- -## ❯ Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install enquirer --save -``` -Install with [yarn](https://yarnpkg.com/en/): - -```sh -$ yarn add enquirer -``` - -

-Install Enquirer with NPM -

- -_(Requires Node.js 8.6 or higher. Please let us know if you need support for an earlier version by creating an [issue](../../issues/new).)_ - -
- -## ❯ Usage - -### Single prompt - -The easiest way to get started with enquirer is to pass a [question object](#prompt-options) to the `prompt` method. - -```js -const { prompt } = require('enquirer'); - -const response = await prompt({ - type: 'input', - name: 'username', - message: 'What is your username?' -}); - -console.log(response); // { username: 'jonschlinkert' } -``` - -_(Examples with `await` need to be run inside an `async` function)_ - -### Multiple prompts - -Pass an array of ["question" objects](#prompt-options) to run a series of prompts. - -```js -const response = await prompt([ - { - type: 'input', - name: 'name', - message: 'What is your name?' - }, - { - type: 'input', - name: 'username', - message: 'What is your username?' - } -]); - -console.log(response); // { name: 'Edward Chan', username: 'edwardmchan' } -``` - -### Different ways to run enquirer - -#### 1. By importing the specific `built-in prompt` - -```js -const { Confirm } = require('enquirer'); - -const prompt = new Confirm({ - name: 'question', - message: 'Did you like enquirer?' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)); -``` - -#### 2. By passing the options to `prompt` - -```js -const { prompt } = require('enquirer'); - -prompt({ - type: 'confirm', - name: 'question', - message: 'Did you like enquirer?' -}) - .then(answer => console.log('Answer:', answer)); -``` - -**Jump to**: [Getting Started](#-getting-started) · [Prompts](#-prompts) · [Options](#-options) · [Key Bindings](#-key-bindings) - -
- -## ❯ Enquirer - -**Enquirer is a prompt runner** - -Add Enquirer to your JavaScript project with following line of code. - -```js -const Enquirer = require('enquirer'); -``` - -The main export of this library is the `Enquirer` class, which has methods and features designed to simplify running prompts. - -```js -const { prompt } = require('enquirer'); -const question = [ - { - type: 'input', - name: 'username', - message: 'What is your username?' - }, - { - type: 'password', - name: 'password', - message: 'What is your password?' - } -]; - -let answers = await prompt(question); -console.log(answers); -``` - -**Prompts control how values are rendered and returned** - -Each individual prompt is a class with special features and functionality for rendering the types of values you want to show users in the terminal, and subsequently returning the types of values you need to use in your application. - -**How can I customize prompts?** - -Below in this guide you will find information about creating [custom prompts](#-custom-prompts). For now, we'll focus on how to customize an existing prompt. - -All of the individual [prompt classes](#built-in-prompts) in this library are exposed as static properties on Enquirer. This allows them to be used directly without using `enquirer.prompt()`. - -Use this approach if you need to modify a prompt instance, or listen for events on the prompt. - -**Example** - -```js -const { Input } = require('enquirer'); -const prompt = new Input({ - name: 'username', - message: 'What is your username?' -}); - -prompt.run() - .then(answer => console.log('Username:', answer)) - .catch(console.error); -``` - -### [Enquirer](index.js#L20) - -Create an instance of `Enquirer`. - -**Params** - -* `options` **{Object}**: (optional) Options to use with all prompts. -* `answers` **{Object}**: (optional) Answers object to initialize with. - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -``` - -### [register()](index.js#L42) - -Register a custom prompt type. - -**Params** - -* `type` **{String}** -* `fn` **{Function|Prompt}**: `Prompt` class, or a function that returns a `Prompt` class. -* `returns` **{Object}**: Returns the Enquirer instance - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -enquirer.register('customType', require('./custom-prompt')); -``` - -### [prompt()](index.js#L78) - -Prompt function that takes a "question" object or array of question objects, and returns an object with responses from the user. - -**Params** - -* `questions` **{Array|Object}**: Options objects for one or more prompts to run. -* `returns` **{Promise}**: Promise that returns an "answers" object with the user's responses. - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); - -const response = await enquirer.prompt({ - type: 'input', - name: 'username', - message: 'What is your username?' -}); -console.log(response); -``` - -### [use()](index.js#L160) - -Use an enquirer plugin. - -**Params** - -* `plugin` **{Function}**: Plugin function that takes an instance of Enquirer. -* `returns` **{Object}**: Returns the Enquirer instance. - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -const plugin = enquirer => { - // do stuff to enquire instance -}; -enquirer.use(plugin); -``` - -### [Enquirer#prompt](index.js#L210) - -Prompt function that takes a "question" object or array of question objects, and returns an object with responses from the user. - -**Params** - -* `questions` **{Array|Object}**: Options objects for one or more prompts to run. -* `returns` **{Promise}**: Promise that returns an "answers" object with the user's responses. - -**Example** - -```js -const { prompt } = require('enquirer'); -const response = await prompt({ - type: 'input', - name: 'username', - message: 'What is your username?' -}); -console.log(response); -``` - -
- -## ❯ Prompts - -This section is about Enquirer's prompts: what they look like, how they work, how to run them, available options, and how to customize the prompts or create your own prompt concept. - -**Getting started with Enquirer's prompts** - -* [Prompt](#prompt) - The base `Prompt` class used by other prompts - - [Prompt Options](#prompt-options) -* [Built-in prompts](#built-in-prompts) -* [Prompt Types](#prompt-types) - The base `Prompt` class used by other prompts -* [Custom prompts](#%E2%9D%AF-custom-prompts) - Enquirer 2.0 introduced the concept of prompt "types", with the goal of making custom prompts easier than ever to create and use. - -### Prompt - -The base `Prompt` class is used to create all other prompts. - -```js -const { Prompt } = require('enquirer'); -class MyCustomPrompt extends Prompt {} -``` - -See the documentation for [creating custom prompts](#-custom-prompts) to learn more about how this works. - -#### Prompt Options - -Each prompt takes an options object (aka "question" object), that implements the following interface: - -```js -{ - // required - type: string | function, - name: string | function, - message: string | function | async function, - - // optional - skip: boolean | function | async function, - initial: string | function | async function, - format: function | async function, - result: function | async function, - validate: function | async function, -} -``` -Each property of the options object is described below: - -| **Property** | **Required?** | **Type** | **Description** | -| ------------ | ------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | yes | `string\|function` | Enquirer uses this value to determine the type of prompt to run, but it's optional when prompts are run directly. | -| `name` | yes | `string\|function` | Used as the key for the answer on the returned values (answers) object. | -| `message` | yes | `string\|function` | The message to display when the prompt is rendered in the terminal. | -| `skip` | no | `boolean\|function` | If `true` it will not ask that prompt. | -| `initial` | no | `string\|function` | The default value to return if the user does not supply a value. | -| `format` | no | `function` | Function to format user input in the terminal. | -| `result` | no | `function` | Function to format the final submitted value before it's returned. | -| `validate` | no | `function` | Function to validate the submitted value before it's returned. This function may return a boolean or a string. If a string is returned it will be used as the validation error message. | - -**Example usage** - -```js -const { prompt } = require('enquirer'); - -const question = { - type: 'input', - name: 'username', - message: 'What is your username?' -}; - -prompt(question) - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -
- -### Built-in prompts - -* [AutoComplete Prompt](#autocomplete-prompt) -* [BasicAuth Prompt](#basicauth-prompt) -* [Confirm Prompt](#confirm-prompt) -* [Form Prompt](#form-prompt) -* [Input Prompt](#input-prompt) -* [Invisible Prompt](#invisible-prompt) -* [List Prompt](#list-prompt) -* [MultiSelect Prompt](#multiselect-prompt) -* [Numeral Prompt](#numeral-prompt) -* [Password Prompt](#password-prompt) -* [Quiz Prompt](#quiz-prompt) -* [Survey Prompt](#survey-prompt) -* [Scale Prompt](#scale-prompt) -* [Select Prompt](#select-prompt) -* [Sort Prompt](#sort-prompt) -* [Snippet Prompt](#snippet-prompt) -* [Toggle Prompt](#toggle-prompt) - -### AutoComplete Prompt - -Prompt that auto-completes as the user types, and returns the selected value as a string. - -

-Enquirer AutoComplete Prompt -

- -**Example Usage** - -```js -const { AutoComplete } = require('enquirer'); - -const prompt = new AutoComplete({ - name: 'flavor', - message: 'Pick your favorite flavor', - limit: 10, - initial: 2, - choices: [ - 'Almond', - 'Apple', - 'Banana', - 'Blackberry', - 'Blueberry', - 'Cherry', - 'Chocolate', - 'Cinnamon', - 'Coconut', - 'Cranberry', - 'Grape', - 'Nougat', - 'Orange', - 'Pear', - 'Pineapple', - 'Raspberry', - 'Strawberry', - 'Vanilla', - 'Watermelon', - 'Wintergreen' - ] -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**AutoComplete Options** - -| Option | Type | Default | Description | -| ----------- | ---------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| `highlight` | `function` | `dim` version of primary style | The color to use when "highlighting" characters in the list that match user input. | -| `multiple` | `boolean` | `false` | Allow multiple choices to be selected. | -| `suggest` | `function` | Greedy match, returns true if choice message contains input string. | Function that filters choices. Takes user input and a choices array, and returns a list of matching choices. | -| `initial` | `number` | 0 | Preselected item in the list of choices. | -| `footer` | `function` | None | Function that displays [footer text](https://github.com/enquirer/enquirer/blob/6c2819518a1e2ed284242a99a685655fbaabfa28/examples/autocomplete/option-footer.js#L10) | - -**Related prompts** - -* [Select](#select-prompt) -* [MultiSelect](#multiselect-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### BasicAuth Prompt - -Prompt that asks for username and password to authenticate the user. The default implementation of `authenticate` function in `BasicAuth` prompt is to compare the username and password with the values supplied while running the prompt. The implementer is expected to override the `authenticate` function with a custom logic such as making an API request to a server to authenticate the username and password entered and expect a token back. - -

-Enquirer BasicAuth Prompt -

- -**Example Usage** - -```js -const { BasicAuth } = require('enquirer'); - - const prompt = new BasicAuth({ - name: 'password', - message: 'Please enter your password', - username: 'rajat-sr', - password: '123', - showPassword: true -}); - - prompt - .run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Confirm Prompt - -Prompt that returns `true` or `false`. - -

-Enquirer Confirm Prompt -

- -**Example Usage** - -```js -const { Confirm } = require('enquirer'); - -const prompt = new Confirm({ - name: 'question', - message: 'Want to answer?' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Numeral](#numeral-prompt) -* [Password](#password-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Form Prompt - -Prompt that allows the user to enter and submit multiple values on a single terminal screen. - -

-Enquirer Form Prompt -

- -**Example Usage** - -```js -const { Form } = require('enquirer'); - -const prompt = new Form({ - name: 'user', - message: 'Please provide the following information:', - choices: [ - { name: 'firstname', message: 'First Name', initial: 'Jon' }, - { name: 'lastname', message: 'Last Name', initial: 'Schlinkert' }, - { name: 'username', message: 'GitHub username', initial: 'jonschlinkert' } - ] -}); - -prompt.run() - .then(value => console.log('Answer:', value)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Input Prompt - -Prompt that takes user input and returns a string. - -

-Enquirer Input Prompt -

- -**Example Usage** - -```js -const { Input } = require('enquirer'); -const prompt = new Input({ - message: 'What is your username?', - initial: 'jonschlinkert' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.log); -``` - -You can use [data-store](https://github.com/jonschlinkert/data-store) to store [input history](https://github.com/enquirer/enquirer/blob/master/examples/input/option-history.js) that the user can cycle through (see [source](https://github.com/enquirer/enquirer/blob/8407dc3579123df5e6e20215078e33bb605b0c37/lib/prompts/input.js)). - -**Related prompts** - -* [Confirm](#confirm-prompt) -* [Numeral](#numeral-prompt) -* [Password](#password-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Invisible Prompt - -Prompt that takes user input, hides it from the terminal, and returns a string. - -

-Enquirer Invisible Prompt -

- -**Example Usage** - -```js -const { Invisible } = require('enquirer'); -const prompt = new Invisible({ - name: 'secret', - message: 'What is your secret?' -}); - -prompt.run() - .then(answer => console.log('Answer:', { secret: answer })) - .catch(console.error); -``` - -**Related prompts** - -* [Password](#password-prompt) -* [Input](#input-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### List Prompt - -Prompt that returns a list of values, created by splitting the user input. The default split character is `,` with optional trailing whitespace. - -

-Enquirer List Prompt -

- -**Example Usage** - -```js -const { List } = require('enquirer'); -const prompt = new List({ - name: 'keywords', - message: 'Type comma-separated keywords' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Sort](#sort-prompt) -* [Select](#select-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### MultiSelect Prompt - -Prompt that allows the user to select multiple items from a list of options. - -

-Enquirer MultiSelect Prompt -

- -**Example Usage** - -```js -const { MultiSelect } = require('enquirer'); - -const prompt = new MultiSelect({ - name: 'value', - message: 'Pick your favorite colors', - limit: 7, - choices: [ - { name: 'aqua', value: '#00ffff' }, - { name: 'black', value: '#000000' }, - { name: 'blue', value: '#0000ff' }, - { name: 'fuchsia', value: '#ff00ff' }, - { name: 'gray', value: '#808080' }, - { name: 'green', value: '#008000' }, - { name: 'lime', value: '#00ff00' }, - { name: 'maroon', value: '#800000' }, - { name: 'navy', value: '#000080' }, - { name: 'olive', value: '#808000' }, - { name: 'purple', value: '#800080' }, - { name: 'red', value: '#ff0000' }, - { name: 'silver', value: '#c0c0c0' }, - { name: 'teal', value: '#008080' }, - { name: 'white', value: '#ffffff' }, - { name: 'yellow', value: '#ffff00' } - ] -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); - -// Answer: ['aqua', 'blue', 'fuchsia'] -``` - -**Example key-value pairs** - -Optionally, pass a `result` function and use the `.map` method to return an object of key-value pairs of the selected names and values: [example](./examples/multiselect/option-result.js) - -```js -const { MultiSelect } = require('enquirer'); - -const prompt = new MultiSelect({ - name: 'value', - message: 'Pick your favorite colors', - limit: 7, - choices: [ - { name: 'aqua', value: '#00ffff' }, - { name: 'black', value: '#000000' }, - { name: 'blue', value: '#0000ff' }, - { name: 'fuchsia', value: '#ff00ff' }, - { name: 'gray', value: '#808080' }, - { name: 'green', value: '#008000' }, - { name: 'lime', value: '#00ff00' }, - { name: 'maroon', value: '#800000' }, - { name: 'navy', value: '#000080' }, - { name: 'olive', value: '#808000' }, - { name: 'purple', value: '#800080' }, - { name: 'red', value: '#ff0000' }, - { name: 'silver', value: '#c0c0c0' }, - { name: 'teal', value: '#008080' }, - { name: 'white', value: '#ffffff' }, - { name: 'yellow', value: '#ffff00' } - ], - result(names) { - return this.map(names); - } -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); - -// Answer: { aqua: '#00ffff', blue: '#0000ff', fuchsia: '#ff00ff' } -``` - -**Related prompts** - -* [AutoComplete](#autocomplete-prompt) -* [Select](#select-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Numeral Prompt - -Prompt that takes a number as input. - -

-Enquirer Numeral Prompt -

- -**Example Usage** - -```js -const { NumberPrompt } = require('enquirer'); - -const prompt = new NumberPrompt({ - name: 'number', - message: 'Please enter a number' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Confirm](#confirm-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Password Prompt - -Prompt that takes user input and masks it in the terminal. Also see the [invisible prompt](#invisible-prompt) - -

-Enquirer Password Prompt -

- -**Example Usage** - -```js -const { Password } = require('enquirer'); - -const prompt = new Password({ - name: 'password', - message: 'What is your password?' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Invisible](#invisible-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Quiz Prompt - -Prompt that allows the user to play multiple-choice quiz questions. - -

-Enquirer Quiz Prompt -

- -**Example Usage** - -```js -const { Quiz } = require('enquirer'); - - const prompt = new Quiz({ - name: 'countries', - message: 'How many countries are there in the world?', - choices: ['165', '175', '185', '195', '205'], - correctChoice: 3 -}); - - prompt - .run() - .then(answer => { - if (answer.correct) { - console.log('Correct!'); - } else { - console.log(`Wrong! Correct answer is ${answer.correctAnswer}`); - } - }) - .catch(console.error); -``` - -**Quiz Options** - -| Option | Type | Required | Description | -| ----------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------ | -| `choices` | `array` | Yes | The list of possible answers to the quiz question. | -| `correctChoice`| `number` | Yes | Index of the correct choice from the `choices` array. | - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Survey Prompt - -Prompt that allows the user to provide feedback for a list of questions. - -

-Enquirer Survey Prompt -

- -**Example Usage** - -```js -const { Survey } = require('enquirer'); - -const prompt = new Survey({ - name: 'experience', - message: 'Please rate your experience', - scale: [ - { name: '1', message: 'Strongly Disagree' }, - { name: '2', message: 'Disagree' }, - { name: '3', message: 'Neutral' }, - { name: '4', message: 'Agree' }, - { name: '5', message: 'Strongly Agree' } - ], - margin: [0, 0, 2, 1], - choices: [ - { - name: 'interface', - message: 'The website has a friendly interface.' - }, - { - name: 'navigation', - message: 'The website is easy to navigate.' - }, - { - name: 'images', - message: 'The website usually has good images.' - }, - { - name: 'upload', - message: 'The website makes it easy to upload images.' - }, - { - name: 'colors', - message: 'The website has a pleasing color palette.' - } - ] -}); - -prompt.run() - .then(value => console.log('ANSWERS:', value)) - .catch(console.error); -``` - -**Related prompts** - -* [Scale](#scale-prompt) -* [Snippet](#snippet-prompt) -* [Select](#select-prompt) - -*** - -### Scale Prompt - -A more compact version of the [Survey prompt](#survey-prompt), the Scale prompt allows the user to quickly provide feedback using a [Likert Scale](https://en.wikipedia.org/wiki/Likert_scale). - -

-Enquirer Scale Prompt -

- -**Example Usage** - -```js -const { Scale } = require('enquirer'); -const prompt = new Scale({ - name: 'experience', - message: 'Please rate your experience', - scale: [ - { name: '1', message: 'Strongly Disagree' }, - { name: '2', message: 'Disagree' }, - { name: '3', message: 'Neutral' }, - { name: '4', message: 'Agree' }, - { name: '5', message: 'Strongly Agree' } - ], - margin: [0, 0, 2, 1], - choices: [ - { - name: 'interface', - message: 'The website has a friendly interface.', - initial: 2 - }, - { - name: 'navigation', - message: 'The website is easy to navigate.', - initial: 2 - }, - { - name: 'images', - message: 'The website usually has good images.', - initial: 2 - }, - { - name: 'upload', - message: 'The website makes it easy to upload images.', - initial: 2 - }, - { - name: 'colors', - message: 'The website has a pleasing color palette.', - initial: 2 - } - ] -}); - -prompt.run() - .then(value => console.log('ANSWERS:', value)) - .catch(console.error); -``` - -**Related prompts** - -* [AutoComplete](#autocomplete-prompt) -* [Select](#select-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Select Prompt - -Prompt that allows the user to select from a list of options. - -

-Enquirer Select Prompt -

- -**Example Usage** - -```js -const { Select } = require('enquirer'); - -const prompt = new Select({ - name: 'color', - message: 'Pick a flavor', - choices: ['apple', 'grape', 'watermelon', 'cherry', 'orange'] -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [AutoComplete](#autocomplete-prompt) -* [MultiSelect](#multiselect-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Sort Prompt - -Prompt that allows the user to sort items in a list. - -**Example** - -In this [example](https://github.com/enquirer/enquirer/raw/master/examples/sort/prompt.js), custom styling is applied to the returned values to make it easier to see what's happening. - -

-Enquirer Sort Prompt -

- -**Example Usage** - -```js -const colors = require('ansi-colors'); -const { Sort } = require('enquirer'); -const prompt = new Sort({ - name: 'colors', - message: 'Sort the colors in order of preference', - hint: 'Top is best, bottom is worst', - numbered: true, - choices: ['red', 'white', 'green', 'cyan', 'yellow'].map(n => ({ - name: n, - message: colors[n](n) - })) -}); - -prompt.run() - .then(function(answer = []) { - console.log(answer); - console.log('Your preferred order of colors is:'); - console.log(answer.map(key => colors[key](key)).join('\n')); - }) - .catch(console.error); -``` - -**Related prompts** - -* [List](#list-prompt) -* [Select](#select-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Snippet Prompt - -Prompt that allows the user to replace placeholders in a snippet of code or text. - -

-Prompts -

- -**Example Usage** - -```js -const semver = require('semver'); -const { Snippet } = require('enquirer'); -const prompt = new Snippet({ - name: 'username', - message: 'Fill out the fields in package.json', - required: true, - fields: [ - { - name: 'author_name', - message: 'Author Name' - }, - { - name: 'version', - validate(value, state, item, index) { - if (item && item.name === 'version' && !semver.valid(value)) { - return prompt.styles.danger('version should be a valid semver value'); - } - return true; - } - } - ], - template: `{ - "name": "\${name}", - "description": "\${description}", - "version": "\${version}", - "homepage": "https://github.com/\${username}/\${name}", - "author": "\${author_name} (https://github.com/\${username})", - "repository": "\${username}/\${name}", - "license": "\${license:ISC}" -} -` -}); - -prompt.run() - .then(answer => console.log('Answer:', answer.result)) - .catch(console.error); -``` - -**Related prompts** - -* [Survey](#survey-prompt) -* [AutoComplete](#autocomplete-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Toggle Prompt - -Prompt that allows the user to toggle between two values then returns `true` or `false`. - -

-Enquirer Toggle Prompt -

- -**Example Usage** - -```js -const { Toggle } = require('enquirer'); - -const prompt = new Toggle({ - message: 'Want to answer?', - enabled: 'Yep', - disabled: 'Nope' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Confirm](#confirm-prompt) -* [Input](#input-prompt) -* [Sort](#sort-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Prompt Types - -There are 5 (soon to be 6!) type classes: - -* [ArrayPrompt](#arrayprompt) - - [Options](#options) - - [Properties](#properties) - - [Methods](#methods) - - [Choices](#choices) - - [Defining choices](#defining-choices) - - [Choice properties](#choice-properties) - - [Related prompts](#related-prompts) -* [AuthPrompt](#authprompt) -* [BooleanPrompt](#booleanprompt) -* DatePrompt (Coming Soon!) -* [NumberPrompt](#numberprompt) -* [StringPrompt](#stringprompt) - -Each type is a low-level class that may be used as a starting point for creating higher level prompts. Continue reading to learn how. - -### ArrayPrompt - -The `ArrayPrompt` class is used for creating prompts that display a list of choices in the terminal. For example, Enquirer uses this class as the basis for the [Select](#select) and [Survey](#survey) prompts. - -#### Options - -In addition to the [options](#options) available to all prompts, Array prompts also support the following options. - -| **Option** | **Required?** | **Type** | **Description** | -| ----------- | ------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `autofocus` | `no` | `string\|number` | The index or name of the choice that should have focus when the prompt loads. Only one choice may have focus at a time. | | -| `stdin` | `no` | `stream` | The input stream to use for emitting keypress events. Defaults to `process.stdin`. | -| `stdout` | `no` | `stream` | The output stream to use for writing the prompt to the terminal. Defaults to `process.stdout`. | -| | - -#### Properties - -Array prompts have the following instance properties and getters. - -| **Property name** | **Type** | **Description** | -| ----------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `choices` | `array` | Array of choices that have been normalized from choices passed on the prompt options. | -| `cursor` | `number` | Position of the cursor relative to the _user input (string)_. | -| `enabled` | `array` | Returns an array of enabled choices. | -| `focused` | `array` | Returns the currently selected choice in the visible list of choices. This is similar to the concept of focus in HTML and CSS. Focused choices are always visible (on-screen). When a list of choices is longer than the list of visible choices, and an off-screen choice is _focused_, the list will scroll to the focused choice and re-render. | -| `focused` | Gets the currently selected choice. Equivalent to `prompt.choices[prompt.index]`. | -| `index` | `number` | Position of the pointer in the _visible list (array) of choices_. | -| `limit` | `number` | The number of choices to display on-screen. | -| `selected` | `array` | Either a list of enabled choices (when `options.multiple` is true) or the currently focused choice. | -| `visible` | `string` | | - -#### Methods - -| **Method** | **Description** | -| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pointer()` | Returns the visual symbol to use to identify the choice that currently has focus. The `❯` symbol is often used for this. The pointer is not always visible, as with the `autocomplete` prompt. | -| `indicator()` | Returns the visual symbol that indicates whether or not a choice is checked/enabled. | -| `focus()` | Sets focus on a choice, if it can be focused. | - -#### Choices - -Array prompts support the `choices` option, which is the array of choices users will be able to select from when rendered in the terminal. - -**Type**: `string|object` - -**Example** - -```js -const { prompt } = require('enquirer'); - -const questions = [{ - type: 'select', - name: 'color', - message: 'Favorite color?', - initial: 1, - choices: [ - { name: 'red', message: 'Red', value: '#ff0000' }, //<= choice object - { name: 'green', message: 'Green', value: '#00ff00' }, //<= choice object - { name: 'blue', message: 'Blue', value: '#0000ff' } //<= choice object - ] -}]; - -let answers = await prompt(questions); -console.log('Answer:', answers.color); -``` - -#### Defining choices - -Whether defined as a string or object, choices are normalized to the following interface: - -```js -{ - name: string; - message: string | undefined; - value: string | undefined; - hint: string | undefined; - disabled: boolean | string | undefined; -} -``` - -**Example** - -```js -const question = { - name: 'fruit', - message: 'Favorite fruit?', - choices: ['Apple', 'Orange', 'Raspberry'] -}; -``` - -Normalizes to the following when the prompt is run: - -```js -const question = { - name: 'fruit', - message: 'Favorite fruit?', - choices: [ - { name: 'Apple', message: 'Apple', value: 'Apple' }, - { name: 'Orange', message: 'Orange', value: 'Orange' }, - { name: 'Raspberry', message: 'Raspberry', value: 'Raspberry' } - ] -}; -``` - -#### Choice properties - -The following properties are supported on `choice` objects. - -| **Option** | **Type** | **Description** | -| ----------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | The unique key to identify a choice | -| `message` | `string` | The message to display in the terminal. `name` is used when this is undefined. | -| `value` | `string` | Value to associate with the choice. Useful for creating key-value pairs from user choices. `name` is used when this is undefined. | -| `choices` | `array` | Array of "child" choices. | -| `hint` | `string` | Help message to display next to a choice. | -| `role` | `string` | Determines how the choice will be displayed. Currently the only role supported is `separator`. Additional roles may be added in the future (like `heading`, etc). Please create a [feature request] | -| `enabled` | `boolean` | Enabled a choice by default. This is only supported when `options.multiple` is true or on prompts that support multiple choices, like [MultiSelect](#-multiselect). | -| `disabled` | `boolean\|string` | Disable a choice so that it cannot be selected. This value may either be `true`, `false`, or a message to display. | -| `indicator` | `string\|function` | Custom indicator to render for a choice (like a check or radio button). | - -#### Related prompts - -* [AutoComplete](#autocomplete-prompt) -* [Form](#form-prompt) -* [MultiSelect](#multiselect-prompt) -* [Select](#select-prompt) -* [Survey](#survey-prompt) - -*** - -### AuthPrompt - -The `AuthPrompt` is used to create prompts to log in user using any authentication method. For example, Enquirer uses this class as the basis for the [BasicAuth Prompt](#basicauth-prompt). You can also find prompt examples in `examples/auth/` folder that utilizes `AuthPrompt` to create OAuth based authentication prompt or a prompt that authenticates using time-based OTP, among others. - -`AuthPrompt` has a factory function that creates an instance of `AuthPrompt` class and it expects an `authenticate` function, as an argument, which overrides the `authenticate` function of the `AuthPrompt` class. - -#### Methods - -| **Method** | **Description** | -| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `authenticate()` | Contain all the authentication logic. This function should be overridden to implement custom authentication logic. The default `authenticate` function throws an error if no other function is provided. | - -#### Choices - -Auth prompt supports the `choices` option, which is the similar to the choices used in [Form Prompt](#form-prompt). - -**Example** - -```js -const { AuthPrompt } = require('enquirer'); - -function authenticate(value, state) { - if (value.username === this.options.username && value.password === this.options.password) { - return true; - } - return false; -} - -const CustomAuthPrompt = AuthPrompt.create(authenticate); - -const prompt = new CustomAuthPrompt({ - name: 'password', - message: 'Please enter your password', - username: 'rajat-sr', - password: '1234567', - choices: [ - { name: 'username', message: 'username' }, - { name: 'password', message: 'password' } - ] -}); - -prompt - .run() - .then(answer => console.log('Authenticated?', answer)) - .catch(console.error); -``` - -#### Related prompts - -* [BasicAuth Prompt](#basicauth-prompt) - -*** - -### BooleanPrompt - -The `BooleanPrompt` class is used for creating prompts that display and return a boolean value. - -```js -const { BooleanPrompt } = require('enquirer'); - -const prompt = new BooleanPrompt({ - header: '========================', - message: 'Do you love enquirer?', - footer: '========================', -}); - -prompt.run() - .then(answer => console.log('Selected:', answer)) - .catch(console.error); -``` - -**Returns**: `boolean` - -*** - -### NumberPrompt - -The `NumberPrompt` class is used for creating prompts that display and return a numerical value. - -```js -const { NumberPrompt } = require('enquirer'); - -const prompt = new NumberPrompt({ - header: '************************', - message: 'Input the Numbers:', - footer: '************************', -}); - -prompt.run() - .then(answer => console.log('Numbers are:', answer)) - .catch(console.error); -``` - -**Returns**: `string|number` (number, or number formatted as a string) - -*** - -### StringPrompt - -The `StringPrompt` class is used for creating prompts that display and return a string value. - -```js -const { StringPrompt } = require('enquirer'); - -const prompt = new StringPrompt({ - header: '************************', - message: 'Input the String:', - footer: '************************' -}); - -prompt.run() - .then(answer => console.log('String is:', answer)) - .catch(console.error); -``` - -**Returns**: `string` - -
- -## ❯ Custom prompts - -With Enquirer 2.0, custom prompts are easier than ever to create and use. - -**How do I create a custom prompt?** - -Custom prompts are created by extending either: - -* Enquirer's `Prompt` class -* one of the built-in [prompts](#-prompts), or -* low-level [types](#-types). - - - -```js -const { Prompt } = require('enquirer'); - -class HaiKarate extends Prompt { - constructor(options = {}) { - super(options); - this.value = options.initial || 0; - this.cursorHide(); - } - up() { - this.value++; - this.render(); - } - down() { - this.value--; - this.render(); - } - render() { - this.clear(); // clear previously rendered prompt from the terminal - this.write(`${this.state.message}: ${this.value}`); - } -} - -// Use the prompt by creating an instance of your custom prompt class. -const prompt = new HaiKarate({ - message: 'How many sprays do you want?', - initial: 10 -}); - -prompt.run() - .then(answer => console.log('Sprays:', answer)) - .catch(console.error); -``` - -If you want to be able to specify your prompt by `type` so that it may be used alongside other prompts, you will need to first create an instance of `Enquirer`. - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -``` - -Then use the `.register()` method to add your custom prompt. - -```js -enquirer.register('haikarate', HaiKarate); -``` - -Now you can do the following when defining "questions". - -```js -let spritzer = require('cologne-drone'); -let answers = await enquirer.prompt([ - { - type: 'haikarate', - name: 'cologne', - message: 'How many sprays do you need?', - initial: 10, - async onSubmit(name, value) { - await spritzer.activate(value); //<= activate drone - return value; - } - } -]); -``` - -
- -## ❯ Key Bindings - -### All prompts - -These key combinations may be used with all prompts. - -| **command** | **description** | -| -------------------------------- | -------------------------------------- | -| ctrl + c | Cancel the prompt. | -| ctrl + g | Reset the prompt to its initial state. | - -
- -### Move cursor - -These combinations may be used on prompts that support user input (eg. [input prompt](#input-prompt), [password prompt](#password-prompt), and [invisible prompt](#invisible-prompt)). - -| **command** | **description** | -| ------------------------------ | ---------------------------------------- | -| left | Move the cursor back one character. | -| right | Move the cursor forward one character. | -| ctrl + a | Move cursor to the start of the line | -| ctrl + e | Move cursor to the end of the line | -| ctrl + b | Move cursor back one character | -| ctrl + f | Move cursor forward one character | -| ctrl + x | Toggle between first and cursor position | - -
- -### Edit Input - -These key combinations may be used on prompts that support user input (eg. [input prompt](#input-prompt), [password prompt](#password-prompt), and [invisible prompt](#invisible-prompt)). - -| **command** | **description** | -| ------------------------------ | ---------------------------------------- | -| ctrl + a | Move cursor to the start of the line | -| ctrl + e | Move cursor to the end of the line | -| ctrl + b | Move cursor back one character | -| ctrl + f | Move cursor forward one character | -| ctrl + x | Toggle between first and cursor position | - -
- -| **command (Mac)** | **command (Windows)** | **description** | -| ----------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| delete | backspace | Delete one character to the left. | -| fn + delete | delete | Delete one character to the right. | -| option + up | alt + up | Scroll to the previous item in history ([Input prompt](#input-prompt) only, when [history is enabled](examples/input/option-history.js)). | -| option + down | alt + down | Scroll to the next item in history ([Input prompt](#input-prompt) only, when [history is enabled](examples/input/option-history.js)). | - -### Select choices - -These key combinations may be used on prompts that support _multiple_ choices, such as the [multiselect prompt](#multiselect-prompt), or the [select prompt](#select-prompt) when the `multiple` options is true. - -| **command** | **description** | -| ----------------- | -------------------------------------------------------------------------------------------------------------------- | -| space | Toggle the currently selected choice when `options.multiple` is true. | -| number | Move the pointer to the choice at the given index. Also toggles the selected choice when `options.multiple` is true. | -| a | Toggle all choices to be enabled or disabled. | -| i | Invert the current selection of choices. | -| g | Toggle the current choice group. | - -
- -### Hide/show choices - -| **command** | **description** | -| ------------------------------- | ---------------------------------------------- | -| fn + up | Decrease the number of visible choices by one. | -| fn + down | Increase the number of visible choices by one. | - -
- -### Move/lock Pointer - -| **command** | **description** | -| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| number | Move the pointer to the choice at the given index. Also toggles the selected choice when `options.multiple` is true. | -| up | Move the pointer up. | -| down | Move the pointer down. | -| ctrl + a | Move the pointer to the first _visible_ choice. | -| ctrl + e | Move the pointer to the last _visible_ choice. | -| shift + up | Scroll up one choice without changing pointer position (locks the pointer while scrolling). | -| shift + down | Scroll down one choice without changing pointer position (locks the pointer while scrolling). | - -
- -| **command (Mac)** | **command (Windows)** | **description** | -| -------------------------------- | --------------------- | ---------------------------------------------------------- | -| fn + left | home | Move the pointer to the first choice in the choices array. | -| fn + right | end | Move the pointer to the last choice in the choices array. | - -
- -## ❯ Release History - -Please see [CHANGELOG.md](CHANGELOG.md). - -## ❯ Performance - -### System specs - -MacBook Pro, Intel Core i7, 2.5 GHz, 16 GB. - -### Load time - -Time it takes for the module to load the first time (average of 3 runs): - -``` -enquirer: 4.013ms -inquirer: 286.717ms -``` - -
- -## ❯ About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Todo - -We're currently working on documentation for the following items. Please star and watch the repository for updates! - -* [ ] Customizing symbols -* [ ] Customizing styles (palette) -* [ ] Customizing rendered input -* [ ] Customizing returned values -* [ ] Customizing key bindings -* [ ] Question validation -* [ ] Choice validation -* [ ] Skipping questions -* [ ] Async choices -* [ ] Async timers: loaders, spinners and other animations -* [ ] Links to examples -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` -```sh -$ yarn && yarn test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -#### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 283 | [jonschlinkert](https://github.com/jonschlinkert) | -| 82 | [doowb](https://github.com/doowb) | -| 32 | [rajat-sr](https://github.com/rajat-sr) | -| 20 | [318097](https://github.com/318097) | -| 15 | [g-plane](https://github.com/g-plane) | -| 12 | [pixelass](https://github.com/pixelass) | -| 5 | [adityavyas611](https://github.com/adityavyas611) | -| 5 | [satotake](https://github.com/satotake) | -| 3 | [tunnckoCore](https://github.com/tunnckoCore) | -| 3 | [Ovyerus](https://github.com/Ovyerus) | -| 3 | [sw-yx](https://github.com/sw-yx) | -| 2 | [DanielRuf](https://github.com/DanielRuf) | -| 2 | [GabeL7r](https://github.com/GabeL7r) | -| 1 | [AlCalzone](https://github.com/AlCalzone) | -| 1 | [hipstersmoothie](https://github.com/hipstersmoothie) | -| 1 | [danieldelcore](https://github.com/danieldelcore) | -| 1 | [ImgBotApp](https://github.com/ImgBotApp) | -| 1 | [jsonkao](https://github.com/jsonkao) | -| 1 | [knpwrs](https://github.com/knpwrs) | -| 1 | [yeskunall](https://github.com/yeskunall) | -| 1 | [mischah](https://github.com/mischah) | -| 1 | [renarsvilnis](https://github.com/renarsvilnis) | -| 1 | [sbugert](https://github.com/sbugert) | -| 1 | [stephencweiss](https://github.com/stephencweiss) | -| 1 | [skellock](https://github.com/skellock) | -| 1 | [whxaxes](https://github.com/whxaxes) | - -#### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -#### Credit - -Thanks to [derhuerst](https://github.com/derhuerst), creator of prompt libraries such as [prompt-skeleton](https://github.com/derhuerst/prompt-skeleton), which influenced some of the concepts we used in our prompts. - -#### License - -Copyright © 2018-present, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). \ No newline at end of file diff --git a/node_modules/enquirer/index.d.ts b/node_modules/enquirer/index.d.ts deleted file mode 100644 index bcc7752a4..000000000 --- a/node_modules/enquirer/index.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { EventEmitter } from "events"; - -interface BasePromptOptions { - name: string | (() => string) - type: string | (() => string) - message: string | (() => string) | (() => Promise) - initial?: any - required?: boolean - format?(value: string): string | Promise - result?(value: string): string | Promise - skip?: ((state: object) => boolean | Promise) | boolean - validate?(value: string): boolean | Promise | string | Promise - onSubmit?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise - onCancel?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise - stdin?: NodeJS.ReadStream - stdout?: NodeJS.WriteStream -} - -interface Choice { - name: string - message?: string - value?: string - hint?: string - disabled?: boolean | string -} - -interface ArrayPromptOptions extends BasePromptOptions { - type: - | 'autocomplete' - | 'editable' - | 'form' - | 'multiselect' - | 'select' - | 'survey' - | 'list' - | 'scale' - choices: string[] | Choice[] - maxChoices?: number - muliple?: boolean - initial?: number - delay?: number - separator?: boolean - sort?: boolean - linebreak?: boolean - edgeLength?: number - align?: 'left' | 'right' - scroll?: boolean -} - -interface BooleanPromptOptions extends BasePromptOptions { - type: 'confirm' - initial?: boolean -} - -interface StringPromptOptions extends BasePromptOptions { - type: 'input' | 'invisible' | 'list' | 'password' | 'text' - initial?: string - multiline?: boolean -} - -interface NumberPromptOptions extends BasePromptOptions { - type: 'numeral' - min?: number - max?: number - delay?: number - float?: boolean - round?: boolean - major?: number - minor?: number - initial?: number -} - -interface SnippetPromptOptions extends BasePromptOptions { - type: 'snippet' - newline?: string - template?: string -} - -interface SortPromptOptions extends BasePromptOptions { - type: 'sort' - hint?: string - drag?: boolean - numbered?: boolean -} - -type PromptOptions = - | BasePromptOptions - | ArrayPromptOptions - | BooleanPromptOptions - | StringPromptOptions - | NumberPromptOptions - | SnippetPromptOptions - | SortPromptOptions - -declare class BasePrompt extends EventEmitter { - constructor(options?: PromptOptions); - - render(): void; - - run(): Promise; - } - -declare class Enquirer extends EventEmitter { - constructor(options?: object, answers?: T); - - /** - * Register a custom prompt type. - * - * @param type - * @param fn `Prompt` class, or a function that returns a `Prompt` class. - */ - register(type: string, fn: typeof BasePrompt | (() => typeof BasePrompt)): this; - - /** - * Register a custom prompt type. - */ - register(type: { [key: string]: typeof BasePrompt | (() => typeof BasePrompt) }): this; - - /** - * Prompt function that takes a "question" object or array of question objects, - * and returns an object with responses from the user. - * - * @param questions Options objects for one or more prompts to run. - */ - prompt( - questions: - | PromptOptions - | ((this: Enquirer) => PromptOptions) - | (PromptOptions | ((this: Enquirer) => PromptOptions))[] - ): Promise; - - /** - * Use an enquirer plugin. - * - * @param plugin Plugin function that takes an instance of Enquirer. - */ - use(plugin: (this: this, enquirer: this) => void): this; -} - -declare namespace Enquirer { - function prompt( - questions: - | PromptOptions - | ((this: Enquirer) => PromptOptions) - | (PromptOptions | ((this: Enquirer) => PromptOptions))[] - ): Promise; - - class Prompt extends BasePrompt {} -} - -export = Enquirer; diff --git a/node_modules/enquirer/index.js b/node_modules/enquirer/index.js deleted file mode 100644 index d0ef3f69b..000000000 --- a/node_modules/enquirer/index.js +++ /dev/null @@ -1,250 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const Events = require('events'); -const utils = require('./lib/utils'); - -/** - * Create an instance of `Enquirer`. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * ``` - * @name Enquirer - * @param {Object} `options` (optional) Options to use with all prompts. - * @param {Object} `answers` (optional) Answers object to initialize with. - * @api public - */ - -class Enquirer extends Events { - constructor(options, answers) { - super(); - this.options = utils.merge({}, options); - this.answers = { ...answers }; - } - - /** - * Register a custom prompt type. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * enquirer.register('customType', require('./custom-prompt')); - * ``` - * @name register() - * @param {String} `type` - * @param {Function|Prompt} `fn` `Prompt` class, or a function that returns a `Prompt` class. - * @return {Object} Returns the Enquirer instance - * @api public - */ - - register(type, fn) { - if (utils.isObject(type)) { - for (let key of Object.keys(type)) this.register(key, type[key]); - return this; - } - assert.equal(typeof fn, 'function', 'expected a function'); - let name = type.toLowerCase(); - if (fn.prototype instanceof this.Prompt) { - this.prompts[name] = fn; - } else { - this.prompts[name] = fn(this.Prompt, this); - } - return this; - } - - /** - * Prompt function that takes a "question" object or array of question objects, - * and returns an object with responses from the user. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * - * const response = await enquirer.prompt({ - * type: 'input', - * name: 'username', - * message: 'What is your username?' - * }); - * console.log(response); - * ``` - * @name prompt() - * @param {Array|Object} `questions` Options objects for one or more prompts to run. - * @return {Promise} Promise that returns an "answers" object with the user's responses. - * @api public - */ - - async prompt(questions = []) { - for (let question of [].concat(questions)) { - try { - if (typeof question === 'function') question = await question.call(this); - await this.ask(utils.merge({}, this.options, question)); - } catch (err) { - return Promise.reject(err); - } - } - return this.answers; - } - - async ask(question) { - if (typeof question === 'function') { - question = await question.call(this); - } - - let opts = utils.merge({}, this.options, question); - let { type, name } = question; - let { set, get } = utils; - - if (typeof type === 'function') { - type = await type.call(this, question, this.answers); - } - - if (!type) return this.answers[name]; - - assert(this.prompts[type], `Prompt "${type}" is not registered`); - - let prompt = new this.prompts[type](opts); - let value = get(this.answers, name); - - prompt.state.answers = this.answers; - prompt.enquirer = this; - - if (name) { - prompt.on('submit', value => { - this.emit('answer', name, value, prompt); - set(this.answers, name, value); - }); - } - - // bubble events - let emit = prompt.emit.bind(prompt); - prompt.emit = (...args) => { - this.emit.call(this, ...args); - return emit(...args); - }; - - this.emit('prompt', prompt, this); - - if (opts.autofill && value != null) { - prompt.value = prompt.input = value; - - // if "autofill=show" render the prompt, otherwise stay "silent" - if (opts.autofill === 'show') { - await prompt.submit(); - } - } else { - value = prompt.value = await prompt.run(); - } - - return value; - } - - /** - * Use an enquirer plugin. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * const plugin = enquirer => { - * // do stuff to enquire instance - * }; - * enquirer.use(plugin); - * ``` - * @name use() - * @param {Function} `plugin` Plugin function that takes an instance of Enquirer. - * @return {Object} Returns the Enquirer instance. - * @api public - */ - - use(plugin) { - plugin.call(this, this); - return this; - } - - set Prompt(value) { - this._Prompt = value; - } - get Prompt() { - return this._Prompt || this.constructor.Prompt; - } - - get prompts() { - return this.constructor.prompts; - } - - static set Prompt(value) { - this._Prompt = value; - } - static get Prompt() { - return this._Prompt || require('./lib/prompt'); - } - - static get prompts() { - return require('./lib/prompts'); - } - - static get types() { - return require('./lib/types'); - } - - /** - * Prompt function that takes a "question" object or array of question objects, - * and returns an object with responses from the user. - * - * ```js - * const { prompt } = require('enquirer'); - * const response = await prompt({ - * type: 'input', - * name: 'username', - * message: 'What is your username?' - * }); - * console.log(response); - * ``` - * @name Enquirer#prompt - * @param {Array|Object} `questions` Options objects for one or more prompts to run. - * @return {Promise} Promise that returns an "answers" object with the user's responses. - * @api public - */ - - static get prompt() { - const fn = (questions, ...rest) => { - let enquirer = new this(...rest); - let emit = enquirer.emit.bind(enquirer); - enquirer.emit = (...args) => { - fn.emit(...args); - return emit(...args); - }; - return enquirer.prompt(questions); - }; - utils.mixinEmitter(fn, new Events()); - return fn; - } -} - -utils.mixinEmitter(Enquirer, new Events()); -const prompts = Enquirer.prompts; - -for (let name of Object.keys(prompts)) { - let key = name.toLowerCase(); - - let run = options => new prompts[name](options).run(); - Enquirer.prompt[key] = run; - Enquirer[key] = run; - - if (!Enquirer[name]) { - Reflect.defineProperty(Enquirer, name, { get: () => prompts[name] }); - } -} - -const exp = name => { - utils.defineExport(Enquirer, name, () => Enquirer.types[name]); -}; - -exp('ArrayPrompt'); -exp('AuthPrompt'); -exp('BooleanPrompt'); -exp('NumberPrompt'); -exp('StringPrompt'); - -module.exports = Enquirer; diff --git a/node_modules/enquirer/lib/ansi.js b/node_modules/enquirer/lib/ansi.js deleted file mode 100644 index 1ba19813d..000000000 --- a/node_modules/enquirer/lib/ansi.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -const isTerm = process.env.TERM_PROGRAM === 'Apple_Terminal'; -const colors = require('ansi-colors'); -const utils = require('./utils'); -const ansi = module.exports = exports; -const ESC = '\u001b['; -const BEL = '\u0007'; -let hidden = false; - -const code = ansi.code = { - bell: BEL, - beep: BEL, - beginning: `${ESC}G`, - down: `${ESC}J`, - esc: ESC, - getPosition: `${ESC}6n`, - hide: `${ESC}?25l`, - line: `${ESC}2K`, - lineEnd: `${ESC}K`, - lineStart: `${ESC}1K`, - restorePosition: ESC + (isTerm ? '8' : 'u'), - savePosition: ESC + (isTerm ? '7' : 's'), - screen: `${ESC}2J`, - show: `${ESC}?25h`, - up: `${ESC}1J` -}; - -const cursor = ansi.cursor = { - get hidden() { - return hidden; - }, - - hide() { - hidden = true; - return code.hide; - }, - show() { - hidden = false; - return code.show; - }, - - forward: (count = 1) => `${ESC}${count}C`, - backward: (count = 1) => `${ESC}${count}D`, - nextLine: (count = 1) => `${ESC}E`.repeat(count), - prevLine: (count = 1) => `${ESC}F`.repeat(count), - - up: (count = 1) => count ? `${ESC}${count}A` : '', - down: (count = 1) => count ? `${ESC}${count}B` : '', - right: (count = 1) => count ? `${ESC}${count}C` : '', - left: (count = 1) => count ? `${ESC}${count}D` : '', - - to(x, y) { - return y ? `${ESC}${y + 1};${x + 1}H` : `${ESC}${x + 1}G`; - }, - - move(x = 0, y = 0) { - let res = ''; - res += (x < 0) ? cursor.left(-x) : (x > 0) ? cursor.right(x) : ''; - res += (y < 0) ? cursor.up(-y) : (y > 0) ? cursor.down(y) : ''; - return res; - }, - - restore(state = {}) { - let { after, cursor, initial, input, prompt, size, value } = state; - initial = utils.isPrimitive(initial) ? String(initial) : ''; - input = utils.isPrimitive(input) ? String(input) : ''; - value = utils.isPrimitive(value) ? String(value) : ''; - - if (size) { - let codes = ansi.cursor.up(size) + ansi.cursor.to(prompt.length); - let diff = input.length - cursor; - if (diff > 0) { - codes += ansi.cursor.left(diff); - } - return codes; - } - - if (value || after) { - let pos = (!input && !!initial) ? -initial.length : -input.length + cursor; - if (after) pos -= after.length; - if (input === '' && initial && !prompt.includes(initial)) { - pos += initial.length; - } - return ansi.cursor.move(pos); - } - } -}; - -const erase = ansi.erase = { - screen: code.screen, - up: code.up, - down: code.down, - line: code.line, - lineEnd: code.lineEnd, - lineStart: code.lineStart, - lines(n) { - let str = ''; - for (let i = 0; i < n; i++) { - str += ansi.erase.line + (i < n - 1 ? ansi.cursor.up(1) : ''); - } - if (n) str += ansi.code.beginning; - return str; - } -}; - -ansi.clear = (input = '', columns = process.stdout.columns) => { - if (!columns) return erase.line + cursor.to(0); - let width = str => [...colors.unstyle(str)].length; - let lines = input.split(/\r?\n/); - let rows = 0; - for (let line of lines) { - rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / columns); - } - return (erase.line + cursor.prevLine()).repeat(rows - 1) + erase.line + cursor.to(0); -}; diff --git a/node_modules/enquirer/lib/combos.js b/node_modules/enquirer/lib/combos.js deleted file mode 100644 index 5b9d86c55..000000000 --- a/node_modules/enquirer/lib/combos.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -/** - * Actions are mappings from keypress event names to method names - * in the prompts. - */ - -exports.ctrl = { - a: 'first', - b: 'backward', - c: 'cancel', - d: 'deleteForward', - e: 'last', - f: 'forward', - g: 'reset', - i: 'tab', - k: 'cutForward', - l: 'reset', - n: 'newItem', - m: 'cancel', - j: 'submit', - p: 'search', - r: 'remove', - s: 'save', - u: 'undo', - w: 'cutLeft', - x: 'toggleCursor', - v: 'paste' -}; - -exports.shift = { - up: 'shiftUp', - down: 'shiftDown', - left: 'shiftLeft', - right: 'shiftRight', - tab: 'prev' -}; - -exports.fn = { - up: 'pageUp', - down: 'pageDown', - left: 'pageLeft', - right: 'pageRight', - delete: 'deleteForward' -}; - -// on Windows -exports.option = { - b: 'backward', - f: 'forward', - d: 'cutRight', - left: 'cutLeft', - up: 'altUp', - down: 'altDown' -}; - -exports.keys = { - pageup: 'pageUp', // + (mac), (windows) - pagedown: 'pageDown', // + (mac), (windows) - home: 'home', // + (mac), (windows) - end: 'end', // + (mac), (windows) - cancel: 'cancel', - delete: 'deleteForward', - backspace: 'delete', - down: 'down', - enter: 'submit', - escape: 'cancel', - left: 'left', - space: 'space', - number: 'number', - return: 'submit', - right: 'right', - tab: 'next', - up: 'up' -}; diff --git a/node_modules/enquirer/lib/completer.js b/node_modules/enquirer/lib/completer.js deleted file mode 100644 index 4a50af0a1..000000000 --- a/node_modules/enquirer/lib/completer.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -const unique = arr => arr.filter((v, i) => arr.lastIndexOf(v) === i); -const compact = arr => unique(arr).filter(Boolean); - -module.exports = (action, data = {}, value = '') => { - let { past = [], present = '' } = data; - let rest, prev; - - switch (action) { - case 'prev': - case 'undo': - rest = past.slice(0, past.length - 1); - prev = past[past.length - 1] || ''; - return { - past: compact([value, ...rest]), - present: prev - }; - - case 'next': - case 'redo': - rest = past.slice(1); - prev = past[0] || ''; - return { - past: compact([...rest, value]), - present: prev - }; - - case 'save': - return { - past: compact([...past, value]), - present: '' - }; - - case 'remove': - prev = compact(past.filter(v => v !== value)); - present = ''; - - if (prev.length) { - present = prev.pop(); - } - - return { - past: prev, - present - }; - - default: { - throw new Error(`Invalid action: "${action}"`); - } - } -}; diff --git a/node_modules/enquirer/lib/interpolate.js b/node_modules/enquirer/lib/interpolate.js deleted file mode 100644 index c3d9b3f3f..000000000 --- a/node_modules/enquirer/lib/interpolate.js +++ /dev/null @@ -1,266 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const clean = (str = '') => { - return typeof str === 'string' ? str.replace(/^['"]|['"]$/g, '') : ''; -}; - -/** - * This file contains the interpolation and rendering logic for - * the Snippet prompt. - */ - -class Item { - constructor(token) { - this.name = token.key; - this.field = token.field || {}; - this.value = clean(token.initial || this.field.initial || ''); - this.message = token.message || this.name; - this.cursor = 0; - this.input = ''; - this.lines = []; - } -} - -const tokenize = async(options = {}, defaults = {}, fn = token => token) => { - let unique = new Set(); - let fields = options.fields || []; - let input = options.template; - let tabstops = []; - let items = []; - let keys = []; - let line = 1; - - if (typeof input === 'function') { - input = await input(); - } - - let i = -1; - let next = () => input[++i]; - let peek = () => input[i + 1]; - let push = token => { - token.line = line; - tabstops.push(token); - }; - - push({ type: 'bos', value: '' }); - - while (i < input.length - 1) { - let value = next(); - - if (/^[^\S\n ]$/.test(value)) { - push({ type: 'text', value }); - continue; - } - - if (value === '\n') { - push({ type: 'newline', value }); - line++; - continue; - } - - if (value === '\\') { - value += next(); - push({ type: 'text', value }); - continue; - } - - if ((value === '$' || value === '#' || value === '{') && peek() === '{') { - let n = next(); - value += n; - - let token = { type: 'template', open: value, inner: '', close: '', value }; - let ch; - - while ((ch = next())) { - if (ch === '}') { - if (peek() === '}') ch += next(); - token.value += ch; - token.close = ch; - break; - } - - if (ch === ':') { - token.initial = ''; - token.key = token.inner; - } else if (token.initial !== void 0) { - token.initial += ch; - } - - token.value += ch; - token.inner += ch; - } - - token.template = token.open + (token.initial || token.inner) + token.close; - token.key = token.key || token.inner; - - if (defaults.hasOwnProperty(token.key)) { - token.initial = defaults[token.key]; - } - - token = fn(token); - push(token); - - keys.push(token.key); - unique.add(token.key); - - let item = items.find(item => item.name === token.key); - token.field = fields.find(ch => ch.name === token.key); - - if (!item) { - item = new Item(token); - items.push(item); - } - - item.lines.push(token.line - 1); - continue; - } - - let last = tabstops[tabstops.length - 1]; - if (last.type === 'text' && last.line === line) { - last.value += value; - } else { - push({ type: 'text', value }); - } - } - - push({ type: 'eos', value: '' }); - return { input, tabstops, unique, keys, items }; -}; - -module.exports = async prompt => { - let options = prompt.options; - let required = new Set(options.required === true ? [] : (options.required || [])); - let defaults = { ...options.values, ...options.initial }; - let { tabstops, items, keys } = await tokenize(options, defaults); - - let result = createFn('result', prompt, options); - let format = createFn('format', prompt, options); - let isValid = createFn('validate', prompt, options, true); - let isVal = prompt.isValue.bind(prompt); - - return async(state = {}, submitted = false) => { - let index = 0; - - state.required = required; - state.items = items; - state.keys = keys; - state.output = ''; - - let validate = async(value, state, item, index) => { - let error = await isValid(value, state, item, index); - if (error === false) { - return 'Invalid field ' + item.name; - } - return error; - }; - - for (let token of tabstops) { - let value = token.value; - let key = token.key; - - if (token.type !== 'template') { - if (value) state.output += value; - continue; - } - - if (token.type === 'template') { - let item = items.find(ch => ch.name === key); - - if (options.required === true) { - state.required.add(item.name); - } - - let val = [item.input, state.values[item.value], item.value, value].find(isVal); - let field = item.field || {}; - let message = field.message || token.inner; - - if (submitted) { - let error = await validate(state.values[key], state, item, index); - if ((error && typeof error === 'string') || error === false) { - state.invalid.set(key, error); - continue; - } - - state.invalid.delete(key); - let res = await result(state.values[key], state, item, index); - state.output += colors.unstyle(res); - continue; - } - - item.placeholder = false; - - let before = value; - value = await format(value, state, item, index); - - if (val !== value) { - state.values[key] = val; - value = prompt.styles.typing(val); - state.missing.delete(message); - - } else { - state.values[key] = void 0; - val = `<${message}>`; - value = prompt.styles.primary(val); - item.placeholder = true; - - if (state.required.has(key)) { - state.missing.add(message); - } - } - - if (state.missing.has(message) && state.validating) { - value = prompt.styles.warning(val); - } - - if (state.invalid.has(key) && state.validating) { - value = prompt.styles.danger(val); - } - - if (index === state.index) { - if (before !== value) { - value = prompt.styles.underline(value); - } else { - value = prompt.styles.heading(colors.unstyle(value)); - } - } - - index++; - } - - if (value) { - state.output += value; - } - } - - let lines = state.output.split('\n').map(l => ' ' + l); - let len = items.length; - let done = 0; - - for (let item of items) { - if (state.invalid.has(item.name)) { - item.lines.forEach(i => { - if (lines[i][0] !== ' ') return; - lines[i] = state.styles.danger(state.symbols.bullet) + lines[i].slice(1); - }); - } - - if (prompt.isValue(state.values[item.name])) { - done++; - } - } - - state.completed = ((done / len) * 100).toFixed(0); - state.output = lines.join('\n'); - return state.output; - }; -}; - -function createFn(prop, prompt, options, fallback) { - return (value, state, item, index) => { - if (typeof item.field[prop] === 'function') { - return item.field[prop].call(prompt, value, state, item, index); - } - return [fallback, value].find(v => prompt.isValue(v)); - }; -} diff --git a/node_modules/enquirer/lib/keypress.js b/node_modules/enquirer/lib/keypress.js deleted file mode 100644 index 15d731497..000000000 --- a/node_modules/enquirer/lib/keypress.js +++ /dev/null @@ -1,243 +0,0 @@ -'use strict'; - -const readline = require('readline'); -const combos = require('./combos'); - -/* eslint-disable no-control-regex */ -const metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/; -const fnKeyRe = /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/; -const keyName = { - /* xterm/gnome ESC O letter */ - 'OP': 'f1', - 'OQ': 'f2', - 'OR': 'f3', - 'OS': 'f4', - /* xterm/rxvt ESC [ number ~ */ - '[11~': 'f1', - '[12~': 'f2', - '[13~': 'f3', - '[14~': 'f4', - /* from Cygwin and used in libuv */ - '[[A': 'f1', - '[[B': 'f2', - '[[C': 'f3', - '[[D': 'f4', - '[[E': 'f5', - /* common */ - '[15~': 'f5', - '[17~': 'f6', - '[18~': 'f7', - '[19~': 'f8', - '[20~': 'f9', - '[21~': 'f10', - '[23~': 'f11', - '[24~': 'f12', - /* xterm ESC [ letter */ - '[A': 'up', - '[B': 'down', - '[C': 'right', - '[D': 'left', - '[E': 'clear', - '[F': 'end', - '[H': 'home', - /* xterm/gnome ESC O letter */ - 'OA': 'up', - 'OB': 'down', - 'OC': 'right', - 'OD': 'left', - 'OE': 'clear', - 'OF': 'end', - 'OH': 'home', - /* xterm/rxvt ESC [ number ~ */ - '[1~': 'home', - '[2~': 'insert', - '[3~': 'delete', - '[4~': 'end', - '[5~': 'pageup', - '[6~': 'pagedown', - /* putty */ - '[[5~': 'pageup', - '[[6~': 'pagedown', - /* rxvt */ - '[7~': 'home', - '[8~': 'end', - /* rxvt keys with modifiers */ - '[a': 'up', - '[b': 'down', - '[c': 'right', - '[d': 'left', - '[e': 'clear', - - '[2$': 'insert', - '[3$': 'delete', - '[5$': 'pageup', - '[6$': 'pagedown', - '[7$': 'home', - '[8$': 'end', - - 'Oa': 'up', - 'Ob': 'down', - 'Oc': 'right', - 'Od': 'left', - 'Oe': 'clear', - - '[2^': 'insert', - '[3^': 'delete', - '[5^': 'pageup', - '[6^': 'pagedown', - '[7^': 'home', - '[8^': 'end', - /* misc. */ - '[Z': 'tab', -} - -function isShiftKey(code) { - return ['[a', '[b', '[c', '[d', '[e', '[2$', '[3$', '[5$', '[6$', '[7$', '[8$', '[Z'].includes(code) -} - -function isCtrlKey(code) { - return [ 'Oa', 'Ob', 'Oc', 'Od', 'Oe', '[2^', '[3^', '[5^', '[6^', '[7^', '[8^'].includes(code) -} - -const keypress = (s = '', event = {}) => { - let parts; - let key = { - name: event.name, - ctrl: false, - meta: false, - shift: false, - option: false, - sequence: s, - raw: s, - ...event - }; - - if (Buffer.isBuffer(s)) { - if (s[0] > 127 && s[1] === void 0) { - s[0] -= 128; - s = '\x1b' + String(s); - } else { - s = String(s); - } - } else if (s !== void 0 && typeof s !== 'string') { - s = String(s); - } else if (!s) { - s = key.sequence || ''; - } - - key.sequence = key.sequence || s || key.name; - - if (s === '\r') { - // carriage return - key.raw = void 0; - key.name = 'return'; - } else if (s === '\n') { - // enter, should have been called linefeed - key.name = 'enter'; - } else if (s === '\t') { - // tab - key.name = 'tab'; - } else if (s === '\b' || s === '\x7f' || s === '\x1b\x7f' || s === '\x1b\b') { - // backspace or ctrl+h - key.name = 'backspace'; - key.meta = s.charAt(0) === '\x1b'; - } else if (s === '\x1b' || s === '\x1b\x1b') { - // escape key - key.name = 'escape'; - key.meta = s.length === 2; - } else if (s === ' ' || s === '\x1b ') { - key.name = 'space'; - key.meta = s.length === 2; - } else if (s <= '\x1a') { - // ctrl+letter - key.name = String.fromCharCode(s.charCodeAt(0) + 'a'.charCodeAt(0) - 1); - key.ctrl = true; - } else if (s.length === 1 && s >= '0' && s <= '9') { - // number - key.name = 'number'; - } else if (s.length === 1 && s >= 'a' && s <= 'z') { - // lowercase letter - key.name = s; - } else if (s.length === 1 && s >= 'A' && s <= 'Z') { - // shift+letter - key.name = s.toLowerCase(); - key.shift = true; - } else if ((parts = metaKeyCodeRe.exec(s))) { - // meta+character key - key.meta = true; - key.shift = /^[A-Z]$/.test(parts[1]); - } else if ((parts = fnKeyRe.exec(s))) { - let segs = [...s]; - - if (segs[0] === '\u001b' && segs[1] === '\u001b') { - key.option = true; - } - - // ansi escape sequence - // reassemble the key code leaving out leading \x1b's, - // the modifier key bitflag and any meaningless "1;" sequence - let code = [parts[1], parts[2], parts[4], parts[6]].filter(Boolean).join(''); - let modifier = (parts[3] || parts[5] || 1) - 1; - - // Parse the key modifier - key.ctrl = !!(modifier & 4); - key.meta = !!(modifier & 10); - key.shift = !!(modifier & 1); - key.code = code; - - key.name = keyName[code]; - key.shift = isShiftKey(code) || key.shift; - key.ctrl = isCtrlKey(code) || key.ctrl; - } - return key; -}; - -keypress.listen = (options = {}, onKeypress) => { - let { stdin } = options; - - if (!stdin || (stdin !== process.stdin && !stdin.isTTY)) { - throw new Error('Invalid stream passed'); - } - - let rl = readline.createInterface({ terminal: true, input: stdin }); - readline.emitKeypressEvents(stdin, rl); - - let on = (buf, key) => onKeypress(buf, keypress(buf, key), rl); - let isRaw = stdin.isRaw; - - if (stdin.isTTY) stdin.setRawMode(true); - stdin.on('keypress', on); - rl.resume(); - - let off = () => { - if (stdin.isTTY) stdin.setRawMode(isRaw); - stdin.removeListener('keypress', on); - rl.pause(); - rl.close(); - }; - - return off; -}; - -keypress.action = (buf, key, customActions) => { - let obj = { ...combos, ...customActions }; - if (key.ctrl) { - key.action = obj.ctrl[key.name]; - return key; - } - - if (key.option && obj.option) { - key.action = obj.option[key.name]; - return key; - } - - if (key.shift) { - key.action = obj.shift[key.name]; - return key; - } - - key.action = obj.keys[key.name]; - return key; -}; - -module.exports = keypress; diff --git a/node_modules/enquirer/lib/placeholder.js b/node_modules/enquirer/lib/placeholder.js deleted file mode 100644 index ae2af1cff..000000000 --- a/node_modules/enquirer/lib/placeholder.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -const utils = require('./utils'); - -/** - * Render a placeholder value with cursor and styling based on the - * position of the cursor. - * - * @param {Object} `prompt` Prompt instance. - * @param {String} `input` Input string. - * @param {String} `initial` The initial user-provided value. - * @param {Number} `pos` Current cursor position. - * @param {Boolean} `showCursor` Render a simulated cursor using the inverse primary style. - * @return {String} Returns the styled placeholder string. - * @api public - */ - -module.exports = (prompt, options = {}) => { - prompt.cursorHide(); - - let { input = '', initial = '', pos, showCursor = true, color } = options; - let style = color || prompt.styles.placeholder; - let inverse = utils.inverse(prompt.styles.primary); - let blinker = str => inverse(prompt.styles.black(str)); - let output = input; - let char = ' '; - let reverse = blinker(char); - - if (prompt.blink && prompt.blink.off === true) { - blinker = str => str; - reverse = ''; - } - - if (showCursor && pos === 0 && initial === '' && input === '') { - return blinker(char); - } - - if (showCursor && pos === 0 && (input === initial || input === '')) { - return blinker(initial[0]) + style(initial.slice(1)); - } - - initial = utils.isPrimitive(initial) ? `${initial}` : ''; - input = utils.isPrimitive(input) ? `${input}` : ''; - - let placeholder = initial && initial.startsWith(input) && initial !== input; - let cursor = placeholder ? blinker(initial[input.length]) : reverse; - - if (pos !== input.length && showCursor === true) { - output = input.slice(0, pos) + blinker(input[pos]) + input.slice(pos + 1); - cursor = ''; - } - - if (showCursor === false) { - cursor = ''; - } - - if (placeholder) { - let raw = prompt.styles.unstyle(output + cursor); - return output + cursor + style(initial.slice(raw.length)); - } - - return output + cursor; -}; diff --git a/node_modules/enquirer/lib/prompt.js b/node_modules/enquirer/lib/prompt.js deleted file mode 100644 index 65f7bdd1e..000000000 --- a/node_modules/enquirer/lib/prompt.js +++ /dev/null @@ -1,485 +0,0 @@ -'use strict'; - -const Events = require('events'); -const colors = require('ansi-colors'); -const keypress = require('./keypress'); -const timer = require('./timer'); -const State = require('./state'); -const theme = require('./theme'); -const utils = require('./utils'); -const ansi = require('./ansi'); - -/** - * Base class for creating a new Prompt. - * @param {Object} `options` Question object. - */ - -class Prompt extends Events { - constructor(options = {}) { - super(); - this.name = options.name; - this.type = options.type; - this.options = options; - theme(this); - timer(this); - this.state = new State(this); - this.initial = [options.initial, options.default].find(v => v != null); - this.stdout = options.stdout || process.stdout; - this.stdin = options.stdin || process.stdin; - this.scale = options.scale || 1; - this.term = this.options.term || process.env.TERM_PROGRAM; - this.margin = margin(this.options.margin); - this.setMaxListeners(0); - setOptions(this); - } - - async keypress(input, event = {}) { - this.keypressed = true; - let key = keypress.action(input, keypress(input, event), this.options.actions); - this.state.keypress = key; - this.emit('keypress', input, key); - this.emit('state', this.state.clone()); - let fn = this.options[key.action] || this[key.action] || this.dispatch; - if (typeof fn === 'function') { - return await fn.call(this, input, key); - } - this.alert(); - } - - alert() { - delete this.state.alert; - if (this.options.show === false) { - this.emit('alert'); - } else { - this.stdout.write(ansi.code.beep); - } - } - - cursorHide() { - this.stdout.write(ansi.cursor.hide()); - utils.onExit(() => this.cursorShow()); - } - - cursorShow() { - this.stdout.write(ansi.cursor.show()); - } - - write(str) { - if (!str) return; - if (this.stdout && this.state.show !== false) { - this.stdout.write(str); - } - this.state.buffer += str; - } - - clear(lines = 0) { - let buffer = this.state.buffer; - this.state.buffer = ''; - if ((!buffer && !lines) || this.options.show === false) return; - this.stdout.write(ansi.cursor.down(lines) + ansi.clear(buffer, this.width)); - } - - restore() { - if (this.state.closed || this.options.show === false) return; - - let { prompt, after, rest } = this.sections(); - let { cursor, initial = '', input = '', value = '' } = this; - - let size = this.state.size = rest.length; - let state = { after, cursor, initial, input, prompt, size, value }; - let codes = ansi.cursor.restore(state); - if (codes) { - this.stdout.write(codes); - } - } - - sections() { - let { buffer, input, prompt } = this.state; - prompt = colors.unstyle(prompt); - let buf = colors.unstyle(buffer); - let idx = buf.indexOf(prompt); - let header = buf.slice(0, idx); - let rest = buf.slice(idx); - let lines = rest.split('\n'); - let first = lines[0]; - let last = lines[lines.length - 1]; - let promptLine = prompt + (input ? ' ' + input : ''); - let len = promptLine.length; - let after = len < first.length ? first.slice(len + 1) : ''; - return { header, prompt: first, after, rest: lines.slice(1), last }; - } - - async submit() { - this.state.submitted = true; - this.state.validating = true; - - // this will only be called when the prompt is directly submitted - // without initializing, i.e. when the prompt is skipped, etc. Otherwize, - // "options.onSubmit" is will be handled by the "initialize()" method. - if (this.options.onSubmit) { - await this.options.onSubmit.call(this, this.name, this.value, this); - } - - let result = this.state.error || await this.validate(this.value, this.state); - if (result !== true) { - let error = '\n' + this.symbols.pointer + ' '; - - if (typeof result === 'string') { - error += result.trim(); - } else { - error += 'Invalid input'; - } - - this.state.error = '\n' + this.styles.danger(error); - this.state.submitted = false; - await this.render(); - await this.alert(); - this.state.validating = false; - this.state.error = void 0; - return; - } - - this.state.validating = false; - await this.render(); - await this.close(); - - this.value = await this.result(this.value); - this.emit('submit', this.value); - } - - async cancel(err) { - this.state.cancelled = this.state.submitted = true; - - await this.render(); - await this.close(); - - if (typeof this.options.onCancel === 'function') { - await this.options.onCancel.call(this, this.name, this.value, this); - } - - this.emit('cancel', await this.error(err)); - } - - async close() { - this.state.closed = true; - - try { - let sections = this.sections(); - let lines = Math.ceil(sections.prompt.length / this.width); - if (sections.rest) { - this.write(ansi.cursor.down(sections.rest.length)); - } - this.write('\n'.repeat(lines)); - } catch (err) { /* do nothing */ } - - this.emit('close'); - } - - start() { - if (!this.stop && this.options.show !== false) { - this.stop = keypress.listen(this, this.keypress.bind(this)); - this.once('close', this.stop); - } - } - - async skip() { - this.skipped = this.options.skip === true; - if (typeof this.options.skip === 'function') { - this.skipped = await this.options.skip.call(this, this.name, this.value); - } - return this.skipped; - } - - async initialize() { - let { format, options, result } = this; - - this.format = () => format.call(this, this.value); - this.result = () => result.call(this, this.value); - - if (typeof options.initial === 'function') { - this.initial = await options.initial.call(this, this); - } - - if (typeof options.onRun === 'function') { - await options.onRun.call(this, this); - } - - // if "options.onSubmit" is defined, we wrap the "submit" method to guarantee - // that "onSubmit" will always called first thing inside the submit - // method, regardless of how it's handled in inheriting prompts. - if (typeof options.onSubmit === 'function') { - let onSubmit = options.onSubmit.bind(this); - let submit = this.submit.bind(this); - delete this.options.onSubmit; - this.submit = async() => { - await onSubmit(this.name, this.value, this); - return submit(); - }; - } - - await this.start(); - await this.render(); - } - - render() { - throw new Error('expected prompt to have a custom render method'); - } - - run() { - return new Promise(async(resolve, reject) => { - this.once('submit', resolve); - this.once('cancel', reject); - if (await this.skip()) { - this.render = () => {}; - return this.submit(); - } - await this.initialize(); - this.emit('run'); - }); - } - - async element(name, choice, i) { - let { options, state, symbols, timers } = this; - let timer = timers && timers[name]; - state.timer = timer; - let value = options[name] || state[name] || symbols[name]; - let val = choice && choice[name] != null ? choice[name] : await value; - if (val === '') return val; - - let res = await this.resolve(val, state, choice, i); - if (!res && choice && choice[name]) { - return this.resolve(value, state, choice, i); - } - return res; - } - - async prefix() { - let element = await this.element('prefix') || this.symbols; - let timer = this.timers && this.timers.prefix; - let state = this.state; - state.timer = timer; - if (utils.isObject(element)) element = element[state.status] || element.pending; - if (!utils.hasColor(element)) { - let style = this.styles[state.status] || this.styles.pending; - return style(element); - } - return element; - } - - async message() { - let message = await this.element('message'); - if (!utils.hasColor(message)) { - return this.styles.strong(message); - } - return message; - } - - async separator() { - let element = await this.element('separator') || this.symbols; - let timer = this.timers && this.timers.separator; - let state = this.state; - state.timer = timer; - let value = element[state.status] || element.pending || state.separator; - let ele = await this.resolve(value, state); - if (utils.isObject(ele)) ele = ele[state.status] || ele.pending; - if (!utils.hasColor(ele)) { - return this.styles.muted(ele); - } - return ele; - } - - async pointer(choice, i) { - let val = await this.element('pointer', choice, i); - - if (typeof val === 'string' && utils.hasColor(val)) { - return val; - } - - if (val) { - let styles = this.styles; - let focused = this.index === i; - let style = focused ? styles.primary : val => val; - let ele = await this.resolve(val[focused ? 'on' : 'off'] || val, this.state); - let styled = !utils.hasColor(ele) ? style(ele) : ele; - return focused ? styled : ' '.repeat(ele.length); - } - } - - async indicator(choice, i) { - let val = await this.element('indicator', choice, i); - if (typeof val === 'string' && utils.hasColor(val)) { - return val; - } - if (val) { - let styles = this.styles; - let enabled = choice.enabled === true; - let style = enabled ? styles.success : styles.dark; - let ele = val[enabled ? 'on' : 'off'] || val; - return !utils.hasColor(ele) ? style(ele) : ele; - } - return ''; - } - - body() { - return null; - } - - footer() { - if (this.state.status === 'pending') { - return this.element('footer'); - } - } - - header() { - if (this.state.status === 'pending') { - return this.element('header'); - } - } - - async hint() { - if (this.state.status === 'pending' && !this.isValue(this.state.input)) { - let hint = await this.element('hint'); - if (!utils.hasColor(hint)) { - return this.styles.muted(hint); - } - return hint; - } - } - - error(err) { - return !this.state.submitted ? (err || this.state.error) : ''; - } - - format(value) { - return value; - } - - result(value) { - return value; - } - - validate(value) { - if (this.options.required === true) { - return this.isValue(value); - } - return true; - } - - isValue(value) { - return value != null && value !== ''; - } - - resolve(value, ...args) { - return utils.resolve(this, value, ...args); - } - - get base() { - return Prompt.prototype; - } - - get style() { - return this.styles[this.state.status]; - } - - get height() { - return this.options.rows || utils.height(this.stdout, 25); - } - get width() { - return this.options.columns || utils.width(this.stdout, 80); - } - get size() { - return { width: this.width, height: this.height }; - } - - set cursor(value) { - this.state.cursor = value; - } - get cursor() { - return this.state.cursor; - } - - set input(value) { - this.state.input = value; - } - get input() { - return this.state.input; - } - - set value(value) { - this.state.value = value; - } - get value() { - let { input, value } = this.state; - let result = [value, input].find(this.isValue.bind(this)); - return this.isValue(result) ? result : this.initial; - } - - static get prompt() { - return options => new this(options).run(); - } -} - -function setOptions(prompt) { - let isValidKey = key => { - return prompt[key] === void 0 || typeof prompt[key] === 'function'; - }; - - let ignore = [ - 'actions', - 'choices', - 'initial', - 'margin', - 'roles', - 'styles', - 'symbols', - 'theme', - 'timers', - 'value' - ]; - - let ignoreFn = [ - 'body', - 'footer', - 'error', - 'header', - 'hint', - 'indicator', - 'message', - 'prefix', - 'separator', - 'skip' - ]; - - for (let key of Object.keys(prompt.options)) { - if (ignore.includes(key)) continue; - if (/^on[A-Z]/.test(key)) continue; - let option = prompt.options[key]; - if (typeof option === 'function' && isValidKey(key)) { - if (!ignoreFn.includes(key)) { - prompt[key] = option.bind(prompt); - } - } else if (typeof prompt[key] !== 'function') { - prompt[key] = option; - } - } -} - -function margin(value) { - if (typeof value === 'number') { - value = [value, value, value, value]; - } - let arr = [].concat(value || []); - let pad = i => i % 2 === 0 ? '\n' : ' '; - let res = []; - for (let i = 0; i < 4; i++) { - let char = pad(i); - if (arr[i]) { - res.push(char.repeat(arr[i])); - } else { - res.push(''); - } - } - return res; -} - -module.exports = Prompt; diff --git a/node_modules/enquirer/lib/prompts/autocomplete.js b/node_modules/enquirer/lib/prompts/autocomplete.js deleted file mode 100644 index daa4a16af..000000000 --- a/node_modules/enquirer/lib/prompts/autocomplete.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -const Select = require('./select'); - -const highlight = (input, color) => { - let val = input.toLowerCase(); - return str => { - let s = str.toLowerCase(); - let i = s.indexOf(val); - let colored = color(str.slice(i, i + val.length)); - return i >= 0 ? str.slice(0, i) + colored + str.slice(i + val.length) : str; - }; -}; - -class AutoComplete extends Select { - constructor(options) { - super(options); - this.cursorShow(); - } - - moveCursor(n) { - this.state.cursor += n; - } - - dispatch(ch) { - return this.append(ch); - } - - space(ch) { - return this.options.multiple ? super.space(ch) : this.append(ch); - } - - append(ch) { - let { cursor, input } = this.state; - this.input = input.slice(0, cursor) + ch + input.slice(cursor); - this.moveCursor(1); - return this.complete(); - } - - delete() { - let { cursor, input } = this.state; - if (!input) return this.alert(); - this.input = input.slice(0, cursor - 1) + input.slice(cursor); - this.moveCursor(-1); - return this.complete(); - } - - deleteForward() { - let { cursor, input } = this.state; - if (input[cursor] === void 0) return this.alert(); - this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); - return this.complete(); - } - - number(ch) { - return this.append(ch); - } - - async complete() { - this.completing = true; - this.choices = await this.suggest(this.input, this.state._choices); - this.state.limit = void 0; // allow getter/setter to reset limit - this.index = Math.min(Math.max(this.visible.length - 1, 0), this.index); - await this.render(); - this.completing = false; - } - - suggest(input = this.input, choices = this.state._choices) { - if (typeof this.options.suggest === 'function') { - return this.options.suggest.call(this, input, choices); - } - let str = input.toLowerCase(); - return choices.filter(ch => ch.message.toLowerCase().includes(str)); - } - - pointer() { - return ''; - } - - format() { - if (!this.focused) return this.input; - if (this.options.multiple && this.state.submitted) { - return this.selected.map(ch => this.styles.primary(ch.message)).join(', '); - } - if (this.state.submitted) { - let value = this.value = this.input = this.focused.value; - return this.styles.primary(value); - } - return this.input; - } - - async render() { - if (this.state.status !== 'pending') return super.render(); - let style = this.options.highlight - ? this.options.highlight.bind(this) - : this.styles.placeholder; - - let color = highlight(this.input, style); - let choices = this.choices; - this.choices = choices.map(ch => ({ ...ch, message: color(ch.message) })); - await super.render(); - this.choices = choices; - } - - submit() { - if (this.options.multiple) { - this.value = this.selected.map(ch => ch.name); - } - return super.submit(); - } -} - -module.exports = AutoComplete; diff --git a/node_modules/enquirer/lib/prompts/basicauth.js b/node_modules/enquirer/lib/prompts/basicauth.js deleted file mode 100644 index 54c5ea77b..000000000 --- a/node_modules/enquirer/lib/prompts/basicauth.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const AuthPrompt = require('../types/auth'); - -function defaultAuthenticate(value, state) { - if (value.username === this.options.username && value.password === this.options.password) { - return true; - } - return false; -} - -const factory = (authenticate = defaultAuthenticate) => { - const choices = [ - { name: 'username', message: 'username' }, - { - name: 'password', - message: 'password', - format(input) { - if (this.options.showPassword) { - return input; - } - let color = this.state.submitted ? this.styles.primary : this.styles.muted; - return color(this.symbols.asterisk.repeat(input.length)); - } - } - ]; - - class BasicAuthPrompt extends AuthPrompt.create(authenticate) { - constructor(options) { - super({ ...options, choices }); - } - - static create(authenticate) { - return factory(authenticate); - } - } - - return BasicAuthPrompt; -}; - -module.exports = factory(); diff --git a/node_modules/enquirer/lib/prompts/confirm.js b/node_modules/enquirer/lib/prompts/confirm.js deleted file mode 100644 index 61eae7ad9..000000000 --- a/node_modules/enquirer/lib/prompts/confirm.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const BooleanPrompt = require('../types/boolean'); - -class ConfirmPrompt extends BooleanPrompt { - constructor(options) { - super(options); - this.default = this.options.default || (this.initial ? '(Y/n)' : '(y/N)'); - } -} - -module.exports = ConfirmPrompt; - diff --git a/node_modules/enquirer/lib/prompts/editable.js b/node_modules/enquirer/lib/prompts/editable.js deleted file mode 100644 index 042e4c9d0..000000000 --- a/node_modules/enquirer/lib/prompts/editable.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict'; - -const Select = require('./select'); -const Form = require('./form'); -const form = Form.prototype; - -class Editable extends Select { - constructor(options) { - super({ ...options, multiple: true }); - this.align = [this.options.align, 'left'].find(v => v != null); - this.emptyError = ''; - this.values = {}; - } - - dispatch(char, key) { - let choice = this.focused; - let parent = choice.parent || {}; - if (!choice.editable && !parent.editable) { - if (char === 'a' || char === 'i') return super[char](); - } - return form.dispatch.call(this, char, key); - } - - append(char, key) { - return form.append.call(this, char, key); - } - - delete(char, key) { - return form.delete.call(this, char, key); - } - - space(char) { - return this.focused.editable ? this.append(char) : super.space(); - } - - number(char) { - return this.focused.editable ? this.append(char) : super.number(char); - } - - next() { - return this.focused.editable ? form.next.call(this) : super.next(); - } - - prev() { - return this.focused.editable ? form.prev.call(this) : super.prev(); - } - - async indicator(choice, i) { - let symbol = choice.indicator || ''; - let value = choice.editable ? symbol : super.indicator(choice, i); - return await this.resolve(value, this.state, choice, i) || ''; - } - - indent(choice) { - return choice.role === 'heading' ? '' : (choice.editable ? ' ' : ' '); - } - - async renderChoice(choice, i) { - choice.indent = ''; - if (choice.editable) return form.renderChoice.call(this, choice, i); - return super.renderChoice(choice, i); - } - - error() { - return ''; - } - - footer() { - return this.state.error; - } - - async validate() { - let result = true; - - for (let choice of this.choices) { - if (typeof choice.validate !== 'function') { - continue; - } - - if (choice.role === 'heading') { - continue; - } - - let val = choice.parent ? this.value[choice.parent.name] : this.value; - - if (choice.editable) { - val = choice.value === choice.name ? choice.initial || '' : choice.value; - } else if (!this.isDisabled(choice)) { - val = choice.enabled === true; - } - - result = await choice.validate(val, this.state); - - if (result !== true) { - break; - } - } - - if (result !== true) { - this.state.error = typeof result === 'string' ? result : 'Invalid Input'; - } - - return result; - } - - submit() { - if (this.focused.newChoice === true) return super.submit(); - if (this.choices.some(ch => ch.newChoice)) { - return this.alert(); - } - - this.value = {}; - - for (let choice of this.choices) { - let val = choice.parent ? this.value[choice.parent.name] : this.value; - - if (choice.role === 'heading') { - this.value[choice.name] = {}; - continue; - } - - if (choice.editable) { - val[choice.name] = choice.value === choice.name - ? (choice.initial || '') - : choice.value; - - } else if (!this.isDisabled(choice)) { - val[choice.name] = choice.enabled === true; - } - } - - return this.base.submit.call(this); - } -} - -module.exports = Editable; diff --git a/node_modules/enquirer/lib/prompts/form.js b/node_modules/enquirer/lib/prompts/form.js deleted file mode 100644 index aad4c6c6f..000000000 --- a/node_modules/enquirer/lib/prompts/form.js +++ /dev/null @@ -1,196 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const SelectPrompt = require('./select'); -const placeholder = require('../placeholder'); - -class FormPrompt extends SelectPrompt { - constructor(options) { - super({ ...options, multiple: true }); - this.type = 'form'; - this.initial = this.options.initial; - this.align = [this.options.align, 'right'].find(v => v != null); - this.emptyError = ''; - this.values = {}; - } - - async reset(first) { - await super.reset(); - if (first === true) this._index = this.index; - this.index = this._index; - this.values = {}; - this.choices.forEach(choice => choice.reset && choice.reset()); - return this.render(); - } - - dispatch(char) { - return !!char && this.append(char); - } - - append(char) { - let choice = this.focused; - if (!choice) return this.alert(); - let { cursor, input } = choice; - choice.value = choice.input = input.slice(0, cursor) + char + input.slice(cursor); - choice.cursor++; - return this.render(); - } - - delete() { - let choice = this.focused; - if (!choice || choice.cursor <= 0) return this.alert(); - let { cursor, input } = choice; - choice.value = choice.input = input.slice(0, cursor - 1) + input.slice(cursor); - choice.cursor--; - return this.render(); - } - - deleteForward() { - let choice = this.focused; - if (!choice) return this.alert(); - let { cursor, input } = choice; - if (input[cursor] === void 0) return this.alert(); - let str = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); - choice.value = choice.input = str; - return this.render(); - } - - right() { - let choice = this.focused; - if (!choice) return this.alert(); - if (choice.cursor >= choice.input.length) return this.alert(); - choice.cursor++; - return this.render(); - } - - left() { - let choice = this.focused; - if (!choice) return this.alert(); - if (choice.cursor <= 0) return this.alert(); - choice.cursor--; - return this.render(); - } - - space(ch, key) { - return this.dispatch(ch, key); - } - - number(ch, key) { - return this.dispatch(ch, key); - } - - next() { - let ch = this.focused; - if (!ch) return this.alert(); - let { initial, input } = ch; - if (initial && initial.startsWith(input) && input !== initial) { - ch.value = ch.input = initial; - ch.cursor = ch.value.length; - return this.render(); - } - return super.next(); - } - - prev() { - let ch = this.focused; - if (!ch) return this.alert(); - if (ch.cursor === 0) return super.prev(); - ch.value = ch.input = ''; - ch.cursor = 0; - return this.render(); - } - - separator() { - return ''; - } - - format(value) { - return !this.state.submitted ? super.format(value) : ''; - } - - pointer() { - return ''; - } - - indicator(choice) { - return choice.input ? '⦿' : '⊙'; - } - - async choiceSeparator(choice, i) { - let sep = await this.resolve(choice.separator, this.state, choice, i) || ':'; - return sep ? ' ' + this.styles.disabled(sep) : ''; - } - - async renderChoice(choice, i) { - await this.onChoice(choice, i); - - let { state, styles } = this; - let { cursor, initial = '', name, hint, input = '' } = choice; - let { muted, submitted, primary, danger } = styles; - - let help = hint; - let focused = this.index === i; - let validate = choice.validate || (() => true); - let sep = await this.choiceSeparator(choice, i); - let msg = choice.message; - - if (this.align === 'right') msg = msg.padStart(this.longest + 1, ' '); - if (this.align === 'left') msg = msg.padEnd(this.longest + 1, ' '); - - // re-populate the form values (answers) object - let value = this.values[name] = (input || initial); - let color = input ? 'success' : 'dark'; - - if ((await validate.call(choice, value, this.state)) !== true) { - color = 'danger'; - } - - let style = styles[color]; - let indicator = style(await this.indicator(choice, i)) + (choice.pad || ''); - - let indent = this.indent(choice); - let line = () => [indent, indicator, msg + sep, input, help].filter(Boolean).join(' '); - - if (state.submitted) { - msg = colors.unstyle(msg); - input = submitted(input); - help = ''; - return line(); - } - - if (choice.format) { - input = await choice.format.call(this, input, choice, i); - } else { - let color = this.styles.muted; - let options = { input, initial, pos: cursor, showCursor: focused, color }; - input = placeholder(this, options); - } - - if (!this.isValue(input)) { - input = this.styles.muted(this.symbols.ellipsis); - } - - if (choice.result) { - this.values[name] = await choice.result.call(this, value, choice, i); - } - - if (focused) { - msg = primary(msg); - } - - if (choice.error) { - input += (input ? ' ' : '') + danger(choice.error.trim()); - } else if (choice.hint) { - input += (input ? ' ' : '') + muted(choice.hint.trim()); - } - - return line(); - } - - async submit() { - this.value = this.values; - return super.base.submit.call(this); - } -} - -module.exports = FormPrompt; diff --git a/node_modules/enquirer/lib/prompts/index.js b/node_modules/enquirer/lib/prompts/index.js deleted file mode 100644 index a82fbfb4a..000000000 --- a/node_modules/enquirer/lib/prompts/index.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const utils = require('../utils'); - -const define = (key, fn) => { - utils.defineExport(exports, key, fn); - utils.defineExport(exports, key.toLowerCase(), fn); -}; - -define('AutoComplete', () => require('./autocomplete')); -define('BasicAuth', () => require('./basicauth')); -define('Confirm', () => require('./confirm')); -define('Editable', () => require('./editable')); -define('Form', () => require('./form')); -define('Input', () => require('./input')); -define('Invisible', () => require('./invisible')); -define('List', () => require('./list')); -define('MultiSelect', () => require('./multiselect')); -define('Numeral', () => require('./numeral')); -define('Password', () => require('./password')); -define('Scale', () => require('./scale')); -define('Select', () => require('./select')); -define('Snippet', () => require('./snippet')); -define('Sort', () => require('./sort')); -define('Survey', () => require('./survey')); -define('Text', () => require('./text')); -define('Toggle', () => require('./toggle')); -define('Quiz', () => require('./quiz')); diff --git a/node_modules/enquirer/lib/prompts/input.js b/node_modules/enquirer/lib/prompts/input.js deleted file mode 100644 index 80ba193b4..000000000 --- a/node_modules/enquirer/lib/prompts/input.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -const Prompt = require('../types/string'); -const completer = require('../completer'); - -class Input extends Prompt { - constructor(options) { - super(options); - let history = this.options.history; - if (history && history.store) { - let initial = history.values || this.initial; - this.autosave = !!history.autosave; - this.store = history.store; - this.data = this.store.get('values') || { past: [], present: initial }; - this.initial = this.data.present || this.data.past[this.data.past.length - 1]; - } - } - - completion(action) { - if (!this.store) return this.alert(); - this.data = completer(action, this.data, this.input); - if (!this.data.present) return this.alert(); - this.input = this.data.present; - this.cursor = this.input.length; - return this.render(); - } - - altUp() { - return this.completion('prev'); - } - - altDown() { - return this.completion('next'); - } - - prev() { - this.save(); - return super.prev(); - } - - save() { - if (!this.store) return; - this.data = completer('save', this.data, this.input); - this.store.set('values', this.data); - } - - submit() { - if (this.store && this.autosave === true) { - this.save(); - } - return super.submit(); - } -} - -module.exports = Input; diff --git a/node_modules/enquirer/lib/prompts/invisible.js b/node_modules/enquirer/lib/prompts/invisible.js deleted file mode 100644 index 548106243..000000000 --- a/node_modules/enquirer/lib/prompts/invisible.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const StringPrompt = require('../types/string'); - -class InvisiblePrompt extends StringPrompt { - format() { - return ''; - } -} - -module.exports = InvisiblePrompt; diff --git a/node_modules/enquirer/lib/prompts/list.js b/node_modules/enquirer/lib/prompts/list.js deleted file mode 100644 index 7657c7fff..000000000 --- a/node_modules/enquirer/lib/prompts/list.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const StringPrompt = require('../types/string'); - -class ListPrompt extends StringPrompt { - constructor(options = {}) { - super(options); - this.sep = this.options.separator || /, */; - this.initial = options.initial || ''; - } - - split(input = this.value) { - return input ? String(input).split(this.sep) : []; - } - - format() { - let style = this.state.submitted ? this.styles.primary : val => val; - return this.list.map(style).join(', '); - } - - async submit(value) { - let result = this.state.error || await this.validate(this.list, this.state); - if (result !== true) { - this.state.error = result; - return super.submit(); - } - this.value = this.list; - return super.submit(); - } - - get list() { - return this.split(); - } -} - -module.exports = ListPrompt; diff --git a/node_modules/enquirer/lib/prompts/multiselect.js b/node_modules/enquirer/lib/prompts/multiselect.js deleted file mode 100644 index f64fcd582..000000000 --- a/node_modules/enquirer/lib/prompts/multiselect.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const Select = require('./select'); - -class MultiSelect extends Select { - constructor(options) { - super({ ...options, multiple: true }); - } -} - -module.exports = MultiSelect; diff --git a/node_modules/enquirer/lib/prompts/numeral.js b/node_modules/enquirer/lib/prompts/numeral.js deleted file mode 100644 index 2a81fdd26..000000000 --- a/node_modules/enquirer/lib/prompts/numeral.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../types/number'); diff --git a/node_modules/enquirer/lib/prompts/password.js b/node_modules/enquirer/lib/prompts/password.js deleted file mode 100644 index 46df22d28..000000000 --- a/node_modules/enquirer/lib/prompts/password.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const StringPrompt = require('../types/string'); - -class PasswordPrompt extends StringPrompt { - constructor(options) { - super(options); - this.cursorShow(); - } - - format(input = this.input) { - if (!this.keypressed) return ''; - let color = this.state.submitted ? this.styles.primary : this.styles.muted; - return color(this.symbols.asterisk.repeat(input.length)); - } -} - -module.exports = PasswordPrompt; diff --git a/node_modules/enquirer/lib/prompts/quiz.js b/node_modules/enquirer/lib/prompts/quiz.js deleted file mode 100644 index 2be455184..000000000 --- a/node_modules/enquirer/lib/prompts/quiz.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -const SelectPrompt = require('./select'); - -class Quiz extends SelectPrompt { - constructor(options) { - super(options); - if (typeof this.options.correctChoice !== 'number' || this.options.correctChoice < 0) { - throw new Error('Please specify the index of the correct answer from the list of choices'); - } - } - - async toChoices(value, parent) { - let choices = await super.toChoices(value, parent); - if (choices.length < 2) { - throw new Error('Please give at least two choices to the user'); - } - if (this.options.correctChoice > choices.length) { - throw new Error('Please specify the index of the correct answer from the list of choices'); - } - return choices; - } - - check(state) { - return state.index === this.options.correctChoice; - } - - async result(selected) { - return { - selectedAnswer: selected, - correctAnswer: this.options.choices[this.options.correctChoice].value, - correct: await this.check(this.state) - }; - } -} - -module.exports = Quiz; diff --git a/node_modules/enquirer/lib/prompts/scale.js b/node_modules/enquirer/lib/prompts/scale.js deleted file mode 100644 index 29d682964..000000000 --- a/node_modules/enquirer/lib/prompts/scale.js +++ /dev/null @@ -1,237 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const ArrayPrompt = require('../types/array'); -const utils = require('../utils'); - -class LikertScale extends ArrayPrompt { - constructor(options = {}) { - super(options); - this.widths = [].concat(options.messageWidth || 50); - this.align = [].concat(options.align || 'left'); - this.linebreak = options.linebreak || false; - this.edgeLength = options.edgeLength || 3; - this.newline = options.newline || '\n '; - let start = options.startNumber || 1; - if (typeof this.scale === 'number') { - this.scaleKey = false; - this.scale = Array(this.scale).fill(0).map((v, i) => ({ name: i + start })); - } - } - - async reset() { - this.tableized = false; - await super.reset(); - return this.render(); - } - - tableize() { - if (this.tableized === true) return; - this.tableized = true; - let longest = 0; - - for (let ch of this.choices) { - longest = Math.max(longest, ch.message.length); - ch.scaleIndex = ch.initial || 2; - ch.scale = []; - - for (let i = 0; i < this.scale.length; i++) { - ch.scale.push({ index: i }); - } - } - this.widths[0] = Math.min(this.widths[0], longest + 3); - } - - async dispatch(s, key) { - if (this.multiple) { - return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); - } - this.alert(); - } - - heading(msg, item, i) { - return this.styles.strong(msg); - } - - separator() { - return this.styles.muted(this.symbols.ellipsis); - } - - right() { - let choice = this.focused; - if (choice.scaleIndex >= this.scale.length - 1) return this.alert(); - choice.scaleIndex++; - return this.render(); - } - - left() { - let choice = this.focused; - if (choice.scaleIndex <= 0) return this.alert(); - choice.scaleIndex--; - return this.render(); - } - - indent() { - return ''; - } - - format() { - if (this.state.submitted) { - let values = this.choices.map(ch => this.styles.info(ch.index)); - return values.join(', '); - } - return ''; - } - - pointer() { - return ''; - } - - /** - * Render the scale "Key". Something like: - * @return {String} - */ - - renderScaleKey() { - if (this.scaleKey === false) return ''; - if (this.state.submitted) return ''; - let scale = this.scale.map(item => ` ${item.name} - ${item.message}`); - let key = ['', ...scale].map(item => this.styles.muted(item)); - return key.join('\n'); - } - - /** - * Render the heading row for the scale. - * @return {String} - */ - - renderScaleHeading(max) { - let keys = this.scale.map(ele => ele.name); - if (typeof this.options.renderScaleHeading === 'function') { - keys = this.options.renderScaleHeading.call(this, max); - } - let diff = this.scaleLength - keys.join('').length; - let spacing = Math.round(diff / (keys.length - 1)); - let names = keys.map(key => this.styles.strong(key)); - let headings = names.join(' '.repeat(spacing)); - let padding = ' '.repeat(this.widths[0]); - return this.margin[3] + padding + this.margin[1] + headings; - } - - /** - * Render a scale indicator => ◯ or ◉ by default - */ - - scaleIndicator(choice, item, i) { - if (typeof this.options.scaleIndicator === 'function') { - return this.options.scaleIndicator.call(this, choice, item, i); - } - let enabled = choice.scaleIndex === item.index; - if (item.disabled) return this.styles.hint(this.symbols.radio.disabled); - if (enabled) return this.styles.success(this.symbols.radio.on); - return this.symbols.radio.off; - } - - /** - * Render the actual scale => ◯────◯────◉────◯────◯ - */ - - renderScale(choice, i) { - let scale = choice.scale.map(item => this.scaleIndicator(choice, item, i)); - let padding = this.term === 'Hyper' ? '' : ' '; - return scale.join(padding + this.symbols.line.repeat(this.edgeLength)); - } - - /** - * Render a choice, including scale => - * "The website is easy to navigate. ◯───◯───◉───◯───◯" - */ - - async renderChoice(choice, i) { - await this.onChoice(choice, i); - - let focused = this.index === i; - let pointer = await this.pointer(choice, i); - let hint = await choice.hint; - - if (hint && !utils.hasColor(hint)) { - hint = this.styles.muted(hint); - } - - let pad = str => this.margin[3] + str.replace(/\s+$/, '').padEnd(this.widths[0], ' '); - let newline = this.newline; - let ind = this.indent(choice); - let message = await this.resolve(choice.message, this.state, choice, i); - let scale = await this.renderScale(choice, i); - let margin = this.margin[1] + this.margin[3]; - this.scaleLength = colors.unstyle(scale).length; - this.widths[0] = Math.min(this.widths[0], this.width - this.scaleLength - margin.length); - let msg = utils.wordWrap(message, { width: this.widths[0], newline }); - let lines = msg.split('\n').map(line => pad(line) + this.margin[1]); - - if (focused) { - scale = this.styles.info(scale); - lines = lines.map(line => this.styles.info(line)); - } - - lines[0] += scale; - - if (this.linebreak) lines.push(''); - return [ind + pointer, lines.join('\n')].filter(Boolean); - } - - async renderChoices() { - if (this.state.submitted) return ''; - this.tableize(); - let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); - let visible = await Promise.all(choices); - let heading = await this.renderScaleHeading(); - return this.margin[0] + [heading, ...visible.map(v => v.join(' '))].join('\n'); - } - - async render() { - let { submitted, size } = this.state; - - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = ''; - if (this.options.promptLine !== false) { - prompt = [prefix, message, separator, ''].join(' '); - this.state.prompt = prompt; - } - - let header = await this.header(); - let output = await this.format(); - let key = await this.renderScaleKey(); - let help = await this.error() || await this.hint(); - let body = await this.renderChoices(); - let footer = await this.footer(); - let err = this.emptyError; - - if (output) prompt += output; - if (help && !prompt.includes(help)) prompt += ' ' + help; - - if (submitted && !output && !body.trim() && this.multiple && err != null) { - prompt += this.styles.danger(err); - } - - this.clear(size); - this.write([header, prompt, key, body, footer].filter(Boolean).join('\n')); - if (!this.state.submitted) { - this.write(this.margin[2]); - } - this.restore(); - } - - submit() { - this.value = {}; - for (let choice of this.choices) { - this.value[choice.name] = choice.scaleIndex; - } - return this.base.submit.call(this); - } -} - -module.exports = LikertScale; diff --git a/node_modules/enquirer/lib/prompts/select.js b/node_modules/enquirer/lib/prompts/select.js deleted file mode 100644 index 5d3ad3703..000000000 --- a/node_modules/enquirer/lib/prompts/select.js +++ /dev/null @@ -1,139 +0,0 @@ -'use strict'; - -const ArrayPrompt = require('../types/array'); -const utils = require('../utils'); - -class SelectPrompt extends ArrayPrompt { - constructor(options) { - super(options); - this.emptyError = this.options.emptyError || 'No items were selected'; - } - - async dispatch(s, key) { - if (this.multiple) { - return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); - } - this.alert(); - } - - separator() { - if (this.options.separator) return super.separator(); - let sep = this.styles.muted(this.symbols.ellipsis); - return this.state.submitted ? super.separator() : sep; - } - - pointer(choice, i) { - return (!this.multiple || this.options.pointer) ? super.pointer(choice, i) : ''; - } - - indicator(choice, i) { - return this.multiple ? super.indicator(choice, i) : ''; - } - - choiceMessage(choice, i) { - let message = this.resolve(choice.message, this.state, choice, i); - if (choice.role === 'heading' && !utils.hasColor(message)) { - message = this.styles.strong(message); - } - return this.resolve(message, this.state, choice, i); - } - - choiceSeparator() { - return ':'; - } - - async renderChoice(choice, i) { - await this.onChoice(choice, i); - - let focused = this.index === i; - let pointer = await this.pointer(choice, i); - let check = await this.indicator(choice, i) + (choice.pad || ''); - let hint = await this.resolve(choice.hint, this.state, choice, i); - - if (hint && !utils.hasColor(hint)) { - hint = this.styles.muted(hint); - } - - let ind = this.indent(choice); - let msg = await this.choiceMessage(choice, i); - let line = () => [this.margin[3], ind + pointer + check, msg, this.margin[1], hint].filter(Boolean).join(' '); - - if (choice.role === 'heading') { - return line(); - } - - if (choice.disabled) { - if (!utils.hasColor(msg)) { - msg = this.styles.disabled(msg); - } - return line(); - } - - if (focused) { - msg = this.styles.em(msg); - } - - return line(); - } - - async renderChoices() { - if (this.state.loading === 'choices') { - return this.styles.warning('Loading choices'); - } - - if (this.state.submitted) return ''; - let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); - let visible = await Promise.all(choices); - if (!visible.length) visible.push(this.styles.danger('No matching choices')); - let result = this.margin[0] + visible.join('\n'); - let header; - - if (this.options.choicesHeader) { - header = await this.resolve(this.options.choicesHeader, this.state); - } - - return [header, result].filter(Boolean).join('\n'); - } - - format() { - if (!this.state.submitted || this.state.cancelled) return ''; - if (Array.isArray(this.selected)) { - return this.selected.map(choice => this.styles.primary(choice.name)).join(', '); - } - return this.styles.primary(this.selected.name); - } - - async render() { - let { submitted, size } = this.state; - - let prompt = ''; - let header = await this.header(); - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - if (this.options.promptLine !== false) { - prompt = [prefix, message, separator, ''].join(' '); - this.state.prompt = prompt; - } - - let output = await this.format(); - let help = (await this.error()) || (await this.hint()); - let body = await this.renderChoices(); - let footer = await this.footer(); - - if (output) prompt += output; - if (help && !prompt.includes(help)) prompt += ' ' + help; - - if (submitted && !output && !body.trim() && this.multiple && this.emptyError != null) { - prompt += this.styles.danger(this.emptyError); - } - - this.clear(size); - this.write([header, prompt, body, footer].filter(Boolean).join('\n')); - this.write(this.margin[2]); - this.restore(); - } -} - -module.exports = SelectPrompt; diff --git a/node_modules/enquirer/lib/prompts/snippet.js b/node_modules/enquirer/lib/prompts/snippet.js deleted file mode 100644 index eec6cc3ab..000000000 --- a/node_modules/enquirer/lib/prompts/snippet.js +++ /dev/null @@ -1,185 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const interpolate = require('../interpolate'); -const Prompt = require('../prompt'); - -class SnippetPrompt extends Prompt { - constructor(options) { - super(options); - this.cursorHide(); - this.reset(true); - } - - async initialize() { - this.interpolate = await interpolate(this); - await super.initialize(); - } - - async reset(first) { - this.state.keys = []; - this.state.invalid = new Map(); - this.state.missing = new Set(); - this.state.completed = 0; - this.state.values = {}; - - if (first !== true) { - await this.initialize(); - await this.render(); - } - } - - moveCursor(n) { - let item = this.getItem(); - this.cursor += n; - item.cursor += n; - } - - dispatch(ch, key) { - if (!key.code && !key.ctrl && ch != null && this.getItem()) { - this.append(ch, key); - return; - } - this.alert(); - } - - append(ch, key) { - let item = this.getItem(); - let prefix = item.input.slice(0, this.cursor); - let suffix = item.input.slice(this.cursor); - this.input = item.input = `${prefix}${ch}${suffix}`; - this.moveCursor(1); - this.render(); - } - - delete() { - let item = this.getItem(); - if (this.cursor <= 0 || !item.input) return this.alert(); - let suffix = item.input.slice(this.cursor); - let prefix = item.input.slice(0, this.cursor - 1); - this.input = item.input = `${prefix}${suffix}`; - this.moveCursor(-1); - this.render(); - } - - increment(i) { - return i >= this.state.keys.length - 1 ? 0 : i + 1; - } - - decrement(i) { - return i <= 0 ? this.state.keys.length - 1 : i - 1; - } - - first() { - this.state.index = 0; - this.render(); - } - - last() { - this.state.index = this.state.keys.length - 1; - this.render(); - } - - right() { - if (this.cursor >= this.input.length) return this.alert(); - this.moveCursor(1); - this.render(); - } - - left() { - if (this.cursor <= 0) return this.alert(); - this.moveCursor(-1); - this.render(); - } - - prev() { - this.state.index = this.decrement(this.state.index); - this.getItem(); - this.render(); - } - - next() { - this.state.index = this.increment(this.state.index); - this.getItem(); - this.render(); - } - - up() { - this.prev(); - } - - down() { - this.next(); - } - - format(value) { - let color = this.state.completed < 100 ? this.styles.warning : this.styles.success; - if (this.state.submitted === true && this.state.completed !== 100) { - color = this.styles.danger; - } - return color(`${this.state.completed}% completed`); - } - - async render() { - let { index, keys = [], submitted, size } = this.state; - - let newline = [this.options.newline, '\n'].find(v => v != null); - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = [prefix, message, separator].filter(Boolean).join(' '); - this.state.prompt = prompt; - - let header = await this.header(); - let error = (await this.error()) || ''; - let hint = (await this.hint()) || ''; - let body = submitted ? '' : await this.interpolate(this.state); - - let key = this.state.key = keys[index] || ''; - let input = await this.format(key); - let footer = await this.footer(); - if (input) prompt += ' ' + input; - if (hint && !input && this.state.completed === 0) prompt += ' ' + hint; - - this.clear(size); - let lines = [header, prompt, body, footer, error.trim()]; - this.write(lines.filter(Boolean).join(newline)); - this.restore(); - } - - getItem(name) { - let { items, keys, index } = this.state; - let item = items.find(ch => ch.name === keys[index]); - if (item && item.input != null) { - this.input = item.input; - this.cursor = item.cursor; - } - return item; - } - - async submit() { - if (typeof this.interpolate !== 'function') await this.initialize(); - await this.interpolate(this.state, true); - - let { invalid, missing, output, values } = this.state; - if (invalid.size) { - let err = ''; - for (let [key, value] of invalid) err += `Invalid ${key}: ${value}\n`; - this.state.error = err; - return super.submit(); - } - - if (missing.size) { - this.state.error = 'Required: ' + [...missing.keys()].join(', '); - return super.submit(); - } - - let lines = colors.unstyle(output).split('\n'); - let result = lines.map(v => v.slice(1)).join('\n'); - this.value = { values, result }; - return super.submit(); - } -} - -module.exports = SnippetPrompt; diff --git a/node_modules/enquirer/lib/prompts/sort.js b/node_modules/enquirer/lib/prompts/sort.js deleted file mode 100644 index b779b9b24..000000000 --- a/node_modules/enquirer/lib/prompts/sort.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -const hint = '(Use + to sort)'; -const Prompt = require('./select'); - -class Sort extends Prompt { - constructor(options) { - super({ ...options, reorder: false, sort: true, multiple: true }); - this.state.hint = [this.options.hint, hint].find(this.isValue.bind(this)); - } - - indicator() { - return ''; - } - - async renderChoice(choice, i) { - let str = await super.renderChoice(choice, i); - let sym = this.symbols.identicalTo + ' '; - let pre = (this.index === i && this.sorting) ? this.styles.muted(sym) : ' '; - if (this.options.drag === false) pre = ''; - if (this.options.numbered === true) { - return pre + `${i + 1} - ` + str; - } - return pre + str; - } - - get selected() { - return this.choices; - } - - submit() { - this.value = this.choices.map(choice => choice.value); - return super.submit(); - } -} - -module.exports = Sort; diff --git a/node_modules/enquirer/lib/prompts/survey.js b/node_modules/enquirer/lib/prompts/survey.js deleted file mode 100644 index 5d39f6bd2..000000000 --- a/node_modules/enquirer/lib/prompts/survey.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -const ArrayPrompt = require('../types/array'); - -class Survey extends ArrayPrompt { - constructor(options = {}) { - super(options); - this.emptyError = options.emptyError || 'No items were selected'; - this.term = process.env.TERM_PROGRAM; - - if (!this.options.header) { - let header = ['', '4 - Strongly Agree', '3 - Agree', '2 - Neutral', '1 - Disagree', '0 - Strongly Disagree', '']; - header = header.map(ele => this.styles.muted(ele)); - this.state.header = header.join('\n '); - } - } - - async toChoices(...args) { - if (this.createdScales) return false; - this.createdScales = true; - let choices = await super.toChoices(...args); - for (let choice of choices) { - choice.scale = createScale(5, this.options); - choice.scaleIdx = 2; - } - return choices; - } - - dispatch() { - this.alert(); - } - - space() { - let choice = this.focused; - let ele = choice.scale[choice.scaleIdx]; - let selected = ele.selected; - choice.scale.forEach(e => (e.selected = false)); - ele.selected = !selected; - return this.render(); - } - - indicator() { - return ''; - } - - pointer() { - return ''; - } - - separator() { - return this.styles.muted(this.symbols.ellipsis); - } - - right() { - let choice = this.focused; - if (choice.scaleIdx >= choice.scale.length - 1) return this.alert(); - choice.scaleIdx++; - return this.render(); - } - - left() { - let choice = this.focused; - if (choice.scaleIdx <= 0) return this.alert(); - choice.scaleIdx--; - return this.render(); - } - - indent() { - return ' '; - } - - async renderChoice(item, i) { - await this.onChoice(item, i); - let focused = this.index === i; - let isHyper = this.term === 'Hyper'; - let n = !isHyper ? 8 : 9; - let s = !isHyper ? ' ' : ''; - let ln = this.symbols.line.repeat(n); - let sp = ' '.repeat(n + (isHyper ? 0 : 1)); - let dot = enabled => (enabled ? this.styles.success('◉') : '◯') + s; - - let num = i + 1 + '.'; - let color = focused ? this.styles.heading : this.styles.noop; - let msg = await this.resolve(item.message, this.state, item, i); - let indent = this.indent(item); - let scale = indent + item.scale.map((e, i) => dot(i === item.scaleIdx)).join(ln); - let val = i => i === item.scaleIdx ? color(i) : i; - let next = indent + item.scale.map((e, i) => val(i)).join(sp); - - let line = () => [num, msg].filter(Boolean).join(' '); - let lines = () => [line(), scale, next, ' '].filter(Boolean).join('\n'); - - if (focused) { - scale = this.styles.cyan(scale); - next = this.styles.cyan(next); - } - - return lines(); - } - - async renderChoices() { - if (this.state.submitted) return ''; - let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); - let visible = await Promise.all(choices); - if (!visible.length) visible.push(this.styles.danger('No matching choices')); - return visible.join('\n'); - } - - format() { - if (this.state.submitted) { - let values = this.choices.map(ch => this.styles.info(ch.scaleIdx)); - return values.join(', '); - } - return ''; - } - - async render() { - let { submitted, size } = this.state; - - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = [prefix, message, separator].filter(Boolean).join(' '); - this.state.prompt = prompt; - - let header = await this.header(); - let output = await this.format(); - let help = await this.error() || await this.hint(); - let body = await this.renderChoices(); - let footer = await this.footer(); - - if (output || !help) prompt += ' ' + output; - if (help && !prompt.includes(help)) prompt += ' ' + help; - - if (submitted && !output && !body && this.multiple && this.type !== 'form') { - prompt += this.styles.danger(this.emptyError); - } - - this.clear(size); - this.write([prompt, header, body, footer].filter(Boolean).join('\n')); - this.restore(); - } - - submit() { - this.value = {}; - for (let choice of this.choices) { - this.value[choice.name] = choice.scaleIdx; - } - return this.base.submit.call(this); - } -} - -function createScale(n, options = {}) { - if (Array.isArray(options.scale)) { - return options.scale.map(ele => ({ ...ele })); - } - let scale = []; - for (let i = 1; i < n + 1; i++) scale.push({ i, selected: false }); - return scale; -} - -module.exports = Survey; diff --git a/node_modules/enquirer/lib/prompts/text.js b/node_modules/enquirer/lib/prompts/text.js deleted file mode 100644 index 556e1db44..000000000 --- a/node_modules/enquirer/lib/prompts/text.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./input'); diff --git a/node_modules/enquirer/lib/prompts/toggle.js b/node_modules/enquirer/lib/prompts/toggle.js deleted file mode 100644 index 26d33945e..000000000 --- a/node_modules/enquirer/lib/prompts/toggle.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -const BooleanPrompt = require('../types/boolean'); - -class TogglePrompt extends BooleanPrompt { - async initialize() { - await super.initialize(); - this.value = this.initial = !!this.options.initial; - this.disabled = this.options.disabled || 'no'; - this.enabled = this.options.enabled || 'yes'; - await this.render(); - } - - reset() { - this.value = this.initial; - this.render(); - } - - delete() { - this.alert(); - } - - toggle() { - this.value = !this.value; - this.render(); - } - - enable() { - if (this.value === true) return this.alert(); - this.value = true; - this.render(); - } - disable() { - if (this.value === false) return this.alert(); - this.value = false; - this.render(); - } - - up() { - this.toggle(); - } - down() { - this.toggle(); - } - right() { - this.toggle(); - } - left() { - this.toggle(); - } - next() { - this.toggle(); - } - prev() { - this.toggle(); - } - - dispatch(ch = '', key) { - switch (ch.toLowerCase()) { - case ' ': - return this.toggle(); - case '1': - case 'y': - case 't': - return this.enable(); - case '0': - case 'n': - case 'f': - return this.disable(); - default: { - return this.alert(); - } - } - } - - format() { - let active = str => this.styles.primary.underline(str); - let value = [ - this.value ? this.disabled : active(this.disabled), - this.value ? active(this.enabled) : this.enabled - ]; - return value.join(this.styles.muted(' / ')); - } - - async render() { - let { size } = this.state; - - let header = await this.header(); - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let output = await this.format(); - let help = (await this.error()) || (await this.hint()); - let footer = await this.footer(); - - let prompt = [prefix, message, separator, output].join(' '); - this.state.prompt = prompt; - - if (help && !prompt.includes(help)) prompt += ' ' + help; - - this.clear(size); - this.write([header, prompt, footer].filter(Boolean).join('\n')); - this.write(this.margin[2]); - this.restore(); - } -} - -module.exports = TogglePrompt; diff --git a/node_modules/enquirer/lib/render.js b/node_modules/enquirer/lib/render.js deleted file mode 100644 index 6a6df4a24..000000000 --- a/node_modules/enquirer/lib/render.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -module.exports = async(value, prompt, context = {}) => { - let { choices, multiple } = prompt.options; - let { size, submitted } = prompt.state; - - let prefix = context.prefix || await prompt.prefix(); - let separator = context.separator || await prompt.separator(); - let message = context.message || await prompt.message(); - - // ? Select your favorite colors > - // ^ ^ ^ - // prefix message separator - let promptLine = [prefix, message, separator].filter(Boolean).join(' '); - prompt.state.prompt = promptLine; - - let header = context.header || await prompt.header(); - let output = context.format || await prompt.format(value); - let help = context.help || await prompt.error() || await prompt.hint(); - let body = context.body || await prompt.body(); - let footer = context.footer || await prompt.footer(); - - if (output || !help) promptLine += ' ' + output; - if (help && !promptLine.includes(help)) promptLine += ' ' + help; - - if (submitted && choices && multiple && !output && !body) { - promptLine += prompt.styles.danger('No items were selected'); - } - - prompt.clear(size); - prompt.write([header, promptLine, body, footer].filter(Boolean).join('\n')); - prompt.restore(); -}; diff --git a/node_modules/enquirer/lib/roles.js b/node_modules/enquirer/lib/roles.js deleted file mode 100644 index 1d663d22d..000000000 --- a/node_modules/enquirer/lib/roles.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const roles = { - default(prompt, choice) { - return choice; - }, - checkbox(prompt, choice) { - throw new Error('checkbox role is not implemented yet'); - }, - editable(prompt, choice) { - throw new Error('editable role is not implemented yet'); - }, - expandable(prompt, choice) { - throw new Error('expandable role is not implemented yet'); - }, - heading(prompt, choice) { - choice.disabled = ''; - choice.indicator = [choice.indicator, ' '].find(v => v != null); - choice.message = choice.message || ''; - return choice; - }, - input(prompt, choice) { - throw new Error('input role is not implemented yet'); - }, - option(prompt, choice) { - return roles.default(prompt, choice); - }, - radio(prompt, choice) { - throw new Error('radio role is not implemented yet'); - }, - separator(prompt, choice) { - choice.disabled = ''; - choice.indicator = [choice.indicator, ' '].find(v => v != null); - choice.message = choice.message || prompt.symbols.line.repeat(5); - return choice; - }, - spacer(prompt, choice) { - return choice; - } -}; - -module.exports = (name, options = {}) => { - let role = utils.merge({}, roles, options.roles); - return role[name] || role.default; -}; diff --git a/node_modules/enquirer/lib/state.js b/node_modules/enquirer/lib/state.js deleted file mode 100644 index 501890b8e..000000000 --- a/node_modules/enquirer/lib/state.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -const { define, width } = require('./utils'); - -class State { - constructor(prompt) { - let options = prompt.options; - define(this, '_prompt', prompt); - this.type = prompt.type; - this.name = prompt.name; - this.message = ''; - this.header = ''; - this.footer = ''; - this.error = ''; - this.hint = ''; - this.input = ''; - this.cursor = 0; - this.index = 0; - this.lines = 0; - this.tick = 0; - this.prompt = ''; - this.buffer = ''; - this.width = width(options.stdout || process.stdout); - Object.assign(this, options); - this.name = this.name || this.message; - this.message = this.message || this.name; - this.symbols = prompt.symbols; - this.styles = prompt.styles; - this.required = new Set(); - this.cancelled = false; - this.submitted = false; - } - - clone() { - let state = { ...this }; - state.status = this.status; - state.buffer = Buffer.from(state.buffer); - delete state.clone; - return state; - } - - set color(val) { - this._color = val; - } - get color() { - let styles = this.prompt.styles; - if (this.cancelled) return styles.cancelled; - if (this.submitted) return styles.submitted; - let color = this._color || styles[this.status]; - return typeof color === 'function' ? color : styles.pending; - } - - set loading(value) { - this._loading = value; - } - get loading() { - if (typeof this._loading === 'boolean') return this._loading; - if (this.loadingChoices) return 'choices'; - return false; - } - - get status() { - if (this.cancelled) return 'cancelled'; - if (this.submitted) return 'submitted'; - return 'pending'; - } -} - -module.exports = State; diff --git a/node_modules/enquirer/lib/styles.js b/node_modules/enquirer/lib/styles.js deleted file mode 100644 index 0a177f429..000000000 --- a/node_modules/enquirer/lib/styles.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const colors = require('ansi-colors'); - -const styles = { - default: colors.noop, - noop: colors.noop, - - /** - * Modifiers - */ - - set inverse(custom) { - this._inverse = custom; - }, - get inverse() { - return this._inverse || utils.inverse(this.primary); - }, - - set complement(custom) { - this._complement = custom; - }, - get complement() { - return this._complement || utils.complement(this.primary); - }, - - /** - * Main color - */ - - primary: colors.cyan, - - /** - * Main palette - */ - - success: colors.green, - danger: colors.magenta, - strong: colors.bold, - warning: colors.yellow, - muted: colors.dim, - disabled: colors.gray, - dark: colors.dim.gray, - underline: colors.underline, - - set info(custom) { - this._info = custom; - }, - get info() { - return this._info || this.primary; - }, - - set em(custom) { - this._em = custom; - }, - get em() { - return this._em || this.primary.underline; - }, - - set heading(custom) { - this._heading = custom; - }, - get heading() { - return this._heading || this.muted.underline; - }, - - /** - * Statuses - */ - - set pending(custom) { - this._pending = custom; - }, - get pending() { - return this._pending || this.primary; - }, - - set submitted(custom) { - this._submitted = custom; - }, - get submitted() { - return this._submitted || this.success; - }, - - set cancelled(custom) { - this._cancelled = custom; - }, - get cancelled() { - return this._cancelled || this.danger; - }, - - /** - * Special styling - */ - - set typing(custom) { - this._typing = custom; - }, - get typing() { - return this._typing || this.dim; - }, - - set placeholder(custom) { - this._placeholder = custom; - }, - get placeholder() { - return this._placeholder || this.primary.dim; - }, - - set highlight(custom) { - this._highlight = custom; - }, - get highlight() { - return this._highlight || this.inverse; - } -}; - -styles.merge = (options = {}) => { - if (options.styles && typeof options.styles.enabled === 'boolean') { - colors.enabled = options.styles.enabled; - } - if (options.styles && typeof options.styles.visible === 'boolean') { - colors.visible = options.styles.visible; - } - - let result = utils.merge({}, styles, options.styles); - delete result.merge; - - for (let key of Object.keys(colors)) { - if (!result.hasOwnProperty(key)) { - Reflect.defineProperty(result, key, { get: () => colors[key] }); - } - } - - for (let key of Object.keys(colors.styles)) { - if (!result.hasOwnProperty(key)) { - Reflect.defineProperty(result, key, { get: () => colors[key] }); - } - } - return result; -}; - -module.exports = styles; diff --git a/node_modules/enquirer/lib/symbols.js b/node_modules/enquirer/lib/symbols.js deleted file mode 100644 index 16adb8690..000000000 --- a/node_modules/enquirer/lib/symbols.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -const isWindows = process.platform === 'win32'; -const colors = require('ansi-colors'); -const utils = require('./utils'); - -const symbols = { - ...colors.symbols, - upDownDoubleArrow: '⇕', - upDownDoubleArrow2: '⬍', - upDownArrow: '↕', - asterisk: '*', - asterism: '⁂', - bulletWhite: '◦', - electricArrow: '⌁', - ellipsisLarge: '⋯', - ellipsisSmall: '…', - fullBlock: '█', - identicalTo: '≡', - indicator: colors.symbols.check, - leftAngle: '‹', - mark: '※', - minus: '−', - multiplication: '×', - obelus: '÷', - percent: '%', - pilcrow: '¶', - pilcrow2: '❡', - pencilUpRight: '✐', - pencilDownRight: '✎', - pencilRight: '✏', - plus: '+', - plusMinus: '±', - pointRight: '☞', - rightAngle: '›', - section: '§', - hexagon: { off: '⬡', on: '⬢', disabled: '⬢' }, - ballot: { on: '☑', off: '☐', disabled: '☒' }, - stars: { on: '★', off: '☆', disabled: '☆' }, - folder: { on: '▼', off: '▶', disabled: '▶' }, - prefix: { - pending: colors.symbols.question, - submitted: colors.symbols.check, - cancelled: colors.symbols.cross - }, - separator: { - pending: colors.symbols.pointerSmall, - submitted: colors.symbols.middot, - cancelled: colors.symbols.middot - }, - radio: { - off: isWindows ? '( )' : '◯', - on: isWindows ? '(*)' : '◉', - disabled: isWindows ? '(|)' : 'Ⓘ' - }, - numbers: ['⓪', '①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳', '㉑', '㉒', '㉓', '㉔', '㉕', '㉖', '㉗', '㉘', '㉙', '㉚', '㉛', '㉜', '㉝', '㉞', '㉟', '㊱', '㊲', '㊳', '㊴', '㊵', '㊶', '㊷', '㊸', '㊹', '㊺', '㊻', '㊼', '㊽', '㊾', '㊿'] -}; - -symbols.merge = options => { - let result = utils.merge({}, colors.symbols, symbols, options.symbols); - delete result.merge; - return result; -}; - -module.exports = symbols; - diff --git a/node_modules/enquirer/lib/theme.js b/node_modules/enquirer/lib/theme.js deleted file mode 100644 index f9c642ac5..000000000 --- a/node_modules/enquirer/lib/theme.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const styles = require('./styles'); -const symbols = require('./symbols'); -const utils = require('./utils'); - -module.exports = prompt => { - prompt.options = utils.merge({}, prompt.options.theme, prompt.options); - prompt.symbols = symbols.merge(prompt.options); - prompt.styles = styles.merge(prompt.options); -}; diff --git a/node_modules/enquirer/lib/timer.js b/node_modules/enquirer/lib/timer.js deleted file mode 100644 index 564998b3a..000000000 --- a/node_modules/enquirer/lib/timer.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -module.exports = prompt => { - prompt.timers = prompt.timers || {}; - - let timers = prompt.options.timers; - if (!timers) return; - - for (let key of Object.keys(timers)) { - let opts = timers[key]; - if (typeof opts === 'number') { - opts = { interval: opts }; - } - create(prompt, key, opts); - } -}; - -function create(prompt, name, options = {}) { - let timer = prompt.timers[name] = { name, start: Date.now(), ms: 0, tick: 0 }; - let ms = options.interval || 120; - timer.frames = options.frames || []; - timer.loading = true; - - let interval = setInterval(() => { - timer.ms = Date.now() - timer.start; - timer.tick++; - prompt.render(); - }, ms); - - timer.stop = () => { - timer.loading = false; - clearInterval(interval); - }; - - Reflect.defineProperty(timer, 'interval', { value: interval }); - prompt.once('close', () => timer.stop()); - return timer.stop; -} diff --git a/node_modules/enquirer/lib/types/array.js b/node_modules/enquirer/lib/types/array.js deleted file mode 100644 index 0a522cb20..000000000 --- a/node_modules/enquirer/lib/types/array.js +++ /dev/null @@ -1,658 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const Prompt = require('../prompt'); -const roles = require('../roles'); -const utils = require('../utils'); -const { reorder, scrollUp, scrollDown, isObject, swap } = utils; - -class ArrayPrompt extends Prompt { - constructor(options) { - super(options); - this.cursorHide(); - this.maxSelected = options.maxSelected || Infinity; - this.multiple = options.multiple || false; - this.initial = options.initial || 0; - this.delay = options.delay || 0; - this.longest = 0; - this.num = ''; - } - - async initialize() { - if (typeof this.options.initial === 'function') { - this.initial = await this.options.initial.call(this); - } - await this.reset(true); - await super.initialize(); - } - - async reset() { - let { choices, initial, autofocus, suggest } = this.options; - this.state._choices = []; - this.state.choices = []; - - this.choices = await Promise.all(await this.toChoices(choices)); - this.choices.forEach(ch => (ch.enabled = false)); - - if (typeof suggest !== 'function' && this.selectable.length === 0) { - throw new Error('At least one choice must be selectable'); - } - - if (isObject(initial)) initial = Object.keys(initial); - if (Array.isArray(initial)) { - if (autofocus != null) this.index = this.findIndex(autofocus); - initial.forEach(v => this.enable(this.find(v))); - await this.render(); - } else { - if (autofocus != null) initial = autofocus; - if (typeof initial === 'string') initial = this.findIndex(initial); - if (typeof initial === 'number' && initial > -1) { - this.index = Math.max(0, Math.min(initial, this.choices.length)); - this.enable(this.find(this.index)); - } - } - - if (this.isDisabled(this.focused)) { - await this.down(); - } - } - - async toChoices(value, parent) { - this.state.loadingChoices = true; - let choices = []; - let index = 0; - - let toChoices = async(items, parent) => { - if (typeof items === 'function') items = await items.call(this); - if (items instanceof Promise) items = await items; - - for (let i = 0; i < items.length; i++) { - let choice = items[i] = await this.toChoice(items[i], index++, parent); - choices.push(choice); - - if (choice.choices) { - await toChoices(choice.choices, choice); - } - } - return choices; - }; - - return toChoices(value, parent) - .then(choices => { - this.state.loadingChoices = false; - return choices; - }); - } - - async toChoice(ele, i, parent) { - if (typeof ele === 'function') ele = await ele.call(this, this); - if (ele instanceof Promise) ele = await ele; - if (typeof ele === 'string') ele = { name: ele }; - - if (ele.normalized) return ele; - ele.normalized = true; - - let origVal = ele.value; - let role = roles(ele.role, this.options); - ele = role(this, ele); - - if (typeof ele.disabled === 'string' && !ele.hint) { - ele.hint = ele.disabled; - ele.disabled = true; - } - - if (ele.disabled === true && ele.hint == null) { - ele.hint = '(disabled)'; - } - - // if the choice was already normalized, return it - if (ele.index != null) return ele; - ele.name = ele.name || ele.key || ele.title || ele.value || ele.message; - ele.message = ele.message || ele.name || ''; - ele.value = [ele.value, ele.name].find(this.isValue.bind(this)); - - ele.input = ''; - ele.index = i; - ele.cursor = 0; - - utils.define(ele, 'parent', parent); - ele.level = parent ? parent.level + 1 : 1; - if (ele.indent == null) { - ele.indent = parent ? parent.indent + ' ' : (ele.indent || ''); - } - - ele.path = parent ? parent.path + '.' + ele.name : ele.name; - ele.enabled = !!(this.multiple && !this.isDisabled(ele) && (ele.enabled || this.isSelected(ele))); - - if (!this.isDisabled(ele)) { - this.longest = Math.max(this.longest, colors.unstyle(ele.message).length); - } - - // shallow clone the choice first - let choice = { ...ele }; - - // then allow the choice to be reset using the "original" values - ele.reset = (input = choice.input, value = choice.value) => { - for (let key of Object.keys(choice)) ele[key] = choice[key]; - ele.input = input; - ele.value = value; - }; - - if (origVal == null && typeof ele.initial === 'function') { - ele.input = await ele.initial.call(this, this.state, ele, i); - } - - return ele; - } - - async onChoice(choice, i) { - this.emit('choice', choice, i, this); - - if (typeof choice.onChoice === 'function') { - await choice.onChoice.call(this, this.state, choice, i); - } - } - - async addChoice(ele, i, parent) { - let choice = await this.toChoice(ele, i, parent); - this.choices.push(choice); - this.index = this.choices.length - 1; - this.limit = this.choices.length; - return choice; - } - - async newItem(item, i, parent) { - let ele = { name: 'New choice name?', editable: true, newChoice: true, ...item }; - let choice = await this.addChoice(ele, i, parent); - - choice.updateChoice = () => { - delete choice.newChoice; - choice.name = choice.message = choice.input; - choice.input = ''; - choice.cursor = 0; - }; - - return this.render(); - } - - indent(choice) { - if (choice.indent == null) { - return choice.level > 1 ? ' '.repeat(choice.level - 1) : ''; - } - return choice.indent; - } - - dispatch(s, key) { - if (this.multiple && this[key.name]) return this[key.name](); - this.alert(); - } - - focus(choice, enabled) { - if (typeof enabled !== 'boolean') enabled = choice.enabled; - if (enabled && !choice.enabled && this.selected.length >= this.maxSelected) { - return this.alert(); - } - this.index = choice.index; - choice.enabled = enabled && !this.isDisabled(choice); - return choice; - } - - space() { - if (!this.multiple) return this.alert(); - this.toggle(this.focused); - return this.render(); - } - - a() { - if (this.maxSelected < this.choices.length) return this.alert(); - let enabled = this.selectable.every(ch => ch.enabled); - this.choices.forEach(ch => (ch.enabled = !enabled)); - return this.render(); - } - - i() { - // don't allow choices to be inverted if it will result in - // more than the maximum number of allowed selected items. - if (this.choices.length - this.selected.length > this.maxSelected) { - return this.alert(); - } - this.choices.forEach(ch => (ch.enabled = !ch.enabled)); - return this.render(); - } - - g(choice = this.focused) { - if (!this.choices.some(ch => !!ch.parent)) return this.a(); - this.toggle((choice.parent && !choice.choices) ? choice.parent : choice); - return this.render(); - } - - toggle(choice, enabled) { - if (!choice.enabled && this.selected.length >= this.maxSelected) { - return this.alert(); - } - - if (typeof enabled !== 'boolean') enabled = !choice.enabled; - choice.enabled = enabled; - - if (choice.choices) { - choice.choices.forEach(ch => this.toggle(ch, enabled)); - } - - let parent = choice.parent; - while (parent) { - let choices = parent.choices.filter(ch => this.isDisabled(ch)); - parent.enabled = choices.every(ch => ch.enabled === true); - parent = parent.parent; - } - - reset(this, this.choices); - this.emit('toggle', choice, this); - return choice; - } - - enable(choice) { - if (this.selected.length >= this.maxSelected) return this.alert(); - choice.enabled = !this.isDisabled(choice); - choice.choices && choice.choices.forEach(this.enable.bind(this)); - return choice; - } - - disable(choice) { - choice.enabled = false; - choice.choices && choice.choices.forEach(this.disable.bind(this)); - return choice; - } - - number(n) { - this.num += n; - - let number = num => { - let i = Number(num); - if (i > this.choices.length - 1) return this.alert(); - - let focused = this.focused; - let choice = this.choices.find(ch => i === ch.index); - - if (!choice.enabled && this.selected.length >= this.maxSelected) { - return this.alert(); - } - - if (this.visible.indexOf(choice) === -1) { - let choices = reorder(this.choices); - let actualIdx = choices.indexOf(choice); - - if (focused.index > actualIdx) { - let start = choices.slice(actualIdx, actualIdx + this.limit); - let end = choices.filter(ch => !start.includes(ch)); - this.choices = start.concat(end); - } else { - let pos = actualIdx - this.limit + 1; - this.choices = choices.slice(pos).concat(choices.slice(0, pos)); - } - } - - this.index = this.choices.indexOf(choice); - this.toggle(this.focused); - return this.render(); - }; - - clearTimeout(this.numberTimeout); - - return new Promise(resolve => { - let len = this.choices.length; - let num = this.num; - - let handle = (val = false, res) => { - clearTimeout(this.numberTimeout); - if (val) res = number(num); - this.num = ''; - resolve(res); - }; - - if (num === '0' || (num.length === 1 && Number(num + '0') > len)) { - return handle(true); - } - - if (Number(num) > len) { - return handle(false, this.alert()); - } - - this.numberTimeout = setTimeout(() => handle(true), this.delay); - }); - } - - home() { - this.choices = reorder(this.choices); - this.index = 0; - return this.render(); - } - - end() { - let pos = this.choices.length - this.limit; - let choices = reorder(this.choices); - this.choices = choices.slice(pos).concat(choices.slice(0, pos)); - this.index = this.limit - 1; - return this.render(); - } - - first() { - this.index = 0; - return this.render(); - } - - last() { - this.index = this.visible.length - 1; - return this.render(); - } - - prev() { - if (this.visible.length <= 1) return this.alert(); - return this.up(); - } - - next() { - if (this.visible.length <= 1) return this.alert(); - return this.down(); - } - - right() { - if (this.cursor >= this.input.length) return this.alert(); - this.cursor++; - return this.render(); - } - - left() { - if (this.cursor <= 0) return this.alert(); - this.cursor--; - return this.render(); - } - - up() { - let len = this.choices.length; - let vis = this.visible.length; - let idx = this.index; - if (this.options.scroll === false && idx === 0) { - return this.alert(); - } - if (len > vis && idx === 0) { - return this.scrollUp(); - } - this.index = ((idx - 1 % len) + len) % len; - if (this.isDisabled()) { - return this.up(); - } - return this.render(); - } - - down() { - let len = this.choices.length; - let vis = this.visible.length; - let idx = this.index; - if (this.options.scroll === false && idx === vis - 1) { - return this.alert(); - } - if (len > vis && idx === vis - 1) { - return this.scrollDown(); - } - this.index = (idx + 1) % len; - if (this.isDisabled()) { - return this.down(); - } - return this.render(); - } - - scrollUp(i = 0) { - this.choices = scrollUp(this.choices); - this.index = i; - if (this.isDisabled()) { - return this.up(); - } - return this.render(); - } - - scrollDown(i = this.visible.length - 1) { - this.choices = scrollDown(this.choices); - this.index = i; - if (this.isDisabled()) { - return this.down(); - } - return this.render(); - } - - async shiftUp() { - if (this.options.sort === true) { - this.sorting = true; - this.swap(this.index - 1); - await this.up(); - this.sorting = false; - return; - } - return this.scrollUp(this.index); - } - - async shiftDown() { - if (this.options.sort === true) { - this.sorting = true; - this.swap(this.index + 1); - await this.down(); - this.sorting = false; - return; - } - return this.scrollDown(this.index); - } - - pageUp() { - if (this.visible.length <= 1) return this.alert(); - this.limit = Math.max(this.limit - 1, 0); - this.index = Math.min(this.limit - 1, this.index); - this._limit = this.limit; - if (this.isDisabled()) { - return this.up(); - } - return this.render(); - } - - pageDown() { - if (this.visible.length >= this.choices.length) return this.alert(); - this.index = Math.max(0, this.index); - this.limit = Math.min(this.limit + 1, this.choices.length); - this._limit = this.limit; - if (this.isDisabled()) { - return this.down(); - } - return this.render(); - } - - swap(pos) { - swap(this.choices, this.index, pos); - } - - isDisabled(choice = this.focused) { - let keys = ['disabled', 'collapsed', 'hidden', 'completing', 'readonly']; - if (choice && keys.some(key => choice[key] === true)) { - return true; - } - return choice && choice.role === 'heading'; - } - - isEnabled(choice = this.focused) { - if (Array.isArray(choice)) return choice.every(ch => this.isEnabled(ch)); - if (choice.choices) { - let choices = choice.choices.filter(ch => !this.isDisabled(ch)); - return choice.enabled && choices.every(ch => this.isEnabled(ch)); - } - return choice.enabled && !this.isDisabled(choice); - } - - isChoice(choice, value) { - return choice.name === value || choice.index === Number(value); - } - - isSelected(choice) { - if (Array.isArray(this.initial)) { - return this.initial.some(value => this.isChoice(choice, value)); - } - return this.isChoice(choice, this.initial); - } - - map(names = [], prop = 'value') { - return [].concat(names || []).reduce((acc, name) => { - acc[name] = this.find(name, prop); - return acc; - }, {}); - } - - filter(value, prop) { - let isChoice = (ele, i) => [ele.name, i].includes(value); - let fn = typeof value === 'function' ? value : isChoice; - let choices = this.options.multiple ? this.state._choices : this.choices; - let result = choices.filter(fn); - if (prop) { - return result.map(ch => ch[prop]); - } - return result; - } - - find(value, prop) { - if (isObject(value)) return prop ? value[prop] : value; - let isChoice = (ele, i) => [ele.name, i].includes(value); - let fn = typeof value === 'function' ? value : isChoice; - let choice = this.choices.find(fn); - if (choice) { - return prop ? choice[prop] : choice; - } - } - - findIndex(value) { - return this.choices.indexOf(this.find(value)); - } - - async submit() { - let choice = this.focused; - if (!choice) return this.alert(); - - if (choice.newChoice) { - if (!choice.input) return this.alert(); - choice.updateChoice(); - return this.render(); - } - - if (this.choices.some(ch => ch.newChoice)) { - return this.alert(); - } - - let { reorder, sort } = this.options; - let multi = this.multiple === true; - let value = this.selected; - if (value === void 0) { - return this.alert(); - } - - // re-sort choices to original order - if (Array.isArray(value) && reorder !== false && sort !== true) { - value = utils.reorder(value); - } - - this.value = multi ? value.map(ch => ch.name) : value.name; - return super.submit(); - } - - set choices(choices = []) { - this.state._choices = this.state._choices || []; - this.state.choices = choices; - - for (let choice of choices) { - if (!this.state._choices.some(ch => ch.name === choice.name)) { - this.state._choices.push(choice); - } - } - - if (!this._initial && this.options.initial) { - this._initial = true; - let init = this.initial; - if (typeof init === 'string' || typeof init === 'number') { - let choice = this.find(init); - if (choice) { - this.initial = choice.index; - this.focus(choice, true); - } - } - } - } - get choices() { - return reset(this, this.state.choices || []); - } - - set visible(visible) { - this.state.visible = visible; - } - get visible() { - return (this.state.visible || this.choices).slice(0, this.limit); - } - - set limit(num) { - this.state.limit = num; - } - get limit() { - let { state, options, choices } = this; - let limit = state.limit || this._limit || options.limit || choices.length; - return Math.min(limit, this.height); - } - - set value(value) { - super.value = value; - } - get value() { - if (typeof super.value !== 'string' && super.value === this.initial) { - return this.input; - } - return super.value; - } - - set index(i) { - this.state.index = i; - } - get index() { - return Math.max(0, this.state ? this.state.index : 0); - } - - get enabled() { - return this.filter(this.isEnabled.bind(this)); - } - - get focused() { - let choice = this.choices[this.index]; - if (choice && this.state.submitted && this.multiple !== true) { - choice.enabled = true; - } - return choice; - } - - get selectable() { - return this.choices.filter(choice => !this.isDisabled(choice)); - } - - get selected() { - return this.multiple ? this.enabled : this.focused; - } -} - -function reset(prompt, choices) { - if (choices instanceof Promise) return choices; - if (typeof choices === 'function') { - if (utils.isAsyncFn(choices)) return choices; - choices = choices.call(prompt, prompt); - } - for (let choice of choices) { - if (Array.isArray(choice.choices)) { - let items = choice.choices.filter(ch => !prompt.isDisabled(ch)); - choice.enabled = items.every(ch => ch.enabled === true); - } - if (prompt.isDisabled(choice) === true) { - delete choice.enabled; - } - } - return choices; -} - -module.exports = ArrayPrompt; diff --git a/node_modules/enquirer/lib/types/auth.js b/node_modules/enquirer/lib/types/auth.js deleted file mode 100644 index c2c66fae9..000000000 --- a/node_modules/enquirer/lib/types/auth.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const FormPrompt = require('../prompts/form'); - -const defaultAuthenticate = () => { - throw new Error('expected prompt to have a custom authenticate method'); -}; - -const factory = (authenticate = defaultAuthenticate) => { - - class AuthPrompt extends FormPrompt { - constructor(options) { - super(options); - } - - async submit() { - this.value = await authenticate.call(this, this.values, this.state); - super.base.submit.call(this); - } - - static create(authenticate) { - return factory(authenticate); - } - } - - return AuthPrompt; -}; - -module.exports = factory(); diff --git a/node_modules/enquirer/lib/types/boolean.js b/node_modules/enquirer/lib/types/boolean.js deleted file mode 100644 index d3e7f3408..000000000 --- a/node_modules/enquirer/lib/types/boolean.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -const Prompt = require('../prompt'); -const { isPrimitive, hasColor } = require('../utils'); - -class BooleanPrompt extends Prompt { - constructor(options) { - super(options); - this.cursorHide(); - } - - async initialize() { - let initial = await this.resolve(this.initial, this.state); - this.input = await this.cast(initial); - await super.initialize(); - } - - dispatch(ch) { - if (!this.isValue(ch)) return this.alert(); - this.input = ch; - return this.submit(); - } - - format(value) { - let { styles, state } = this; - return !state.submitted ? styles.primary(value) : styles.success(value); - } - - cast(input) { - return this.isTrue(input); - } - - isTrue(input) { - return /^[ty1]/i.test(input); - } - - isFalse(input) { - return /^[fn0]/i.test(input); - } - - isValue(value) { - return isPrimitive(value) && (this.isTrue(value) || this.isFalse(value)); - } - - async hint() { - if (this.state.status === 'pending') { - let hint = await this.element('hint'); - if (!hasColor(hint)) { - return this.styles.muted(hint); - } - return hint; - } - } - - async render() { - let { input, size } = this.state; - - let prefix = await this.prefix(); - let sep = await this.separator(); - let msg = await this.message(); - let hint = this.styles.muted(this.default); - - let promptLine = [prefix, msg, hint, sep].filter(Boolean).join(' '); - this.state.prompt = promptLine; - - let header = await this.header(); - let value = this.value = this.cast(input); - let output = await this.format(value); - let help = (await this.error()) || (await this.hint()); - let footer = await this.footer(); - - if (help && !promptLine.includes(help)) output += ' ' + help; - promptLine += ' ' + output; - - this.clear(size); - this.write([header, promptLine, footer].filter(Boolean).join('\n')); - this.restore(); - } - - set value(value) { - super.value = value; - } - get value() { - return this.cast(super.value); - } -} - -module.exports = BooleanPrompt; diff --git a/node_modules/enquirer/lib/types/index.js b/node_modules/enquirer/lib/types/index.js deleted file mode 100644 index b3a2300d8..000000000 --- a/node_modules/enquirer/lib/types/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - ArrayPrompt: require('./array'), - AuthPrompt: require('./auth'), - BooleanPrompt: require('./boolean'), - NumberPrompt: require('./number'), - StringPrompt: require('./string') -}; diff --git a/node_modules/enquirer/lib/types/number.js b/node_modules/enquirer/lib/types/number.js deleted file mode 100644 index 199a7c99a..000000000 --- a/node_modules/enquirer/lib/types/number.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -const StringPrompt = require('./string'); - -class NumberPrompt extends StringPrompt { - constructor(options = {}) { - super({ style: 'number', ...options }); - this.min = this.isValue(options.min) ? this.toNumber(options.min) : -Infinity; - this.max = this.isValue(options.max) ? this.toNumber(options.max) : Infinity; - this.delay = options.delay != null ? options.delay : 1000; - this.float = options.float !== false; - this.round = options.round === true || options.float === false; - this.major = options.major || 10; - this.minor = options.minor || 1; - this.initial = options.initial != null ? options.initial : ''; - this.input = String(this.initial); - this.cursor = this.input.length; - this.cursorShow(); - } - - append(ch) { - if (!/[-+.]/.test(ch) || (ch === '.' && this.input.includes('.'))) { - return this.alert('invalid number'); - } - return super.append(ch); - } - - number(ch) { - return super.append(ch); - } - - next() { - if (this.input && this.input !== this.initial) return this.alert(); - if (!this.isValue(this.initial)) return this.alert(); - this.input = this.initial; - this.cursor = String(this.initial).length; - return this.render(); - } - - up(number) { - let step = number || this.minor; - let num = this.toNumber(this.input); - if (num > this.max + step) return this.alert(); - this.input = `${num + step}`; - return this.render(); - } - - down(number) { - let step = number || this.minor; - let num = this.toNumber(this.input); - if (num < this.min - step) return this.alert(); - this.input = `${num - step}`; - return this.render(); - } - - shiftDown() { - return this.down(this.major); - } - - shiftUp() { - return this.up(this.major); - } - - format(input = this.input) { - if (typeof this.options.format === 'function') { - return this.options.format.call(this, input); - } - return this.styles.info(input); - } - - toNumber(value = '') { - return this.float ? +value : Math.round(+value); - } - - isValue(value) { - return /^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(value); - } - - submit() { - let value = [this.input, this.initial].find(v => this.isValue(v)); - this.value = this.toNumber(value || 0); - return super.submit(); - } -} - -module.exports = NumberPrompt; diff --git a/node_modules/enquirer/lib/types/string.js b/node_modules/enquirer/lib/types/string.js deleted file mode 100644 index d4e0ce9ad..000000000 --- a/node_modules/enquirer/lib/types/string.js +++ /dev/null @@ -1,185 +0,0 @@ -'use strict'; - -const Prompt = require('../prompt'); -const placeholder = require('../placeholder'); -const { isPrimitive } = require('../utils'); - -class StringPrompt extends Prompt { - constructor(options) { - super(options); - this.initial = isPrimitive(this.initial) ? String(this.initial) : ''; - if (this.initial) this.cursorHide(); - this.state.prevCursor = 0; - this.state.clipboard = []; - } - - async keypress(input, key = {}) { - let prev = this.state.prevKeypress; - this.state.prevKeypress = key; - if (this.options.multiline === true && key.name === 'return') { - if (!prev || prev.name !== 'return') { - return this.append('\n', key); - } - } - return super.keypress(input, key); - } - - moveCursor(n) { - this.cursor += n; - } - - reset() { - this.input = this.value = ''; - this.cursor = 0; - return this.render(); - } - - dispatch(ch, key) { - if (!ch || key.ctrl || key.code) return this.alert(); - this.append(ch); - } - - append(ch) { - let { cursor, input } = this.state; - this.input = `${input}`.slice(0, cursor) + ch + `${input}`.slice(cursor); - this.moveCursor(String(ch).length); - this.render(); - } - - insert(str) { - this.append(str); - } - - delete() { - let { cursor, input } = this.state; - if (cursor <= 0) return this.alert(); - this.input = `${input}`.slice(0, cursor - 1) + `${input}`.slice(cursor); - this.moveCursor(-1); - this.render(); - } - - deleteForward() { - let { cursor, input } = this.state; - if (input[cursor] === void 0) return this.alert(); - this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); - this.render(); - } - - cutForward() { - let pos = this.cursor; - if (this.input.length <= pos) return this.alert(); - this.state.clipboard.push(this.input.slice(pos)); - this.input = this.input.slice(0, pos); - this.render(); - } - - cutLeft() { - let pos = this.cursor; - if (pos === 0) return this.alert(); - let before = this.input.slice(0, pos); - let after = this.input.slice(pos); - let words = before.split(' '); - this.state.clipboard.push(words.pop()); - this.input = words.join(' '); - this.cursor = this.input.length; - this.input += after; - this.render(); - } - - paste() { - if (!this.state.clipboard.length) return this.alert(); - this.insert(this.state.clipboard.pop()); - this.render(); - } - - toggleCursor() { - if (this.state.prevCursor) { - this.cursor = this.state.prevCursor; - this.state.prevCursor = 0; - } else { - this.state.prevCursor = this.cursor; - this.cursor = 0; - } - this.render(); - } - - first() { - this.cursor = 0; - this.render(); - } - - last() { - this.cursor = this.input.length - 1; - this.render(); - } - - next() { - let init = this.initial != null ? String(this.initial) : ''; - if (!init || !init.startsWith(this.input)) return this.alert(); - this.input = this.initial; - this.cursor = this.initial.length; - this.render(); - } - - prev() { - if (!this.input) return this.alert(); - this.reset(); - } - - backward() { - return this.left(); - } - - forward() { - return this.right(); - } - - right() { - if (this.cursor >= this.input.length) return this.alert(); - this.moveCursor(1); - return this.render(); - } - - left() { - if (this.cursor <= 0) return this.alert(); - this.moveCursor(-1); - return this.render(); - } - - isValue(value) { - return !!value; - } - - async format(input = this.value) { - let initial = await this.resolve(this.initial, this.state); - if (!this.state.submitted) { - return placeholder(this, { input, initial, pos: this.cursor }); - } - return this.styles.submitted(input || initial); - } - - async render() { - let size = this.state.size; - - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = [prefix, message, separator].filter(Boolean).join(' '); - this.state.prompt = prompt; - - let header = await this.header(); - let output = await this.format(); - let help = (await this.error()) || (await this.hint()); - let footer = await this.footer(); - - if (help && !output.includes(help)) output += ' ' + help; - prompt += ' ' + output; - - this.clear(size); - this.write([header, prompt, footer].filter(Boolean).join('\n')); - this.restore(); - } -} - -module.exports = StringPrompt; diff --git a/node_modules/enquirer/lib/utils.js b/node_modules/enquirer/lib/utils.js deleted file mode 100644 index 7493c0d53..000000000 --- a/node_modules/enquirer/lib/utils.js +++ /dev/null @@ -1,268 +0,0 @@ -'use strict'; - -const toString = Object.prototype.toString; -const colors = require('ansi-colors'); -let called = false; -let fns = []; - -const complements = { - 'yellow': 'blue', - 'cyan': 'red', - 'green': 'magenta', - 'black': 'white', - 'blue': 'yellow', - 'red': 'cyan', - 'magenta': 'green', - 'white': 'black' -}; - -exports.longest = (arr, prop) => { - return arr.reduce((a, v) => Math.max(a, prop ? v[prop].length : v.length), 0); -}; - -exports.hasColor = str => !!str && colors.hasColor(str); - -const isObject = exports.isObject = val => { - return val !== null && typeof val === 'object' && !Array.isArray(val); -}; - -exports.nativeType = val => { - return toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, ''); -}; - -exports.isAsyncFn = val => { - return exports.nativeType(val) === 'asyncfunction'; -}; - -exports.isPrimitive = val => { - return val != null && typeof val !== 'object' && typeof val !== 'function'; -}; - -exports.resolve = (context, value, ...rest) => { - if (typeof value === 'function') { - return value.call(context, ...rest); - } - return value; -}; - -exports.scrollDown = (choices = []) => [...choices.slice(1), choices[0]]; -exports.scrollUp = (choices = []) => [choices.pop(), ...choices]; - -exports.reorder = (arr = []) => { - let res = arr.slice(); - res.sort((a, b) => { - if (a.index > b.index) return 1; - if (a.index < b.index) return -1; - return 0; - }); - return res; -}; - -exports.swap = (arr, index, pos) => { - let len = arr.length; - let idx = pos === len ? 0 : pos < 0 ? len - 1 : pos; - let choice = arr[index]; - arr[index] = arr[idx]; - arr[idx] = choice; -}; - -exports.width = (stream, fallback = 80) => { - let columns = (stream && stream.columns) ? stream.columns : fallback; - if (stream && typeof stream.getWindowSize === 'function') { - columns = stream.getWindowSize()[0]; - } - if (process.platform === 'win32') { - return columns - 1; - } - return columns; -}; - -exports.height = (stream, fallback = 20) => { - let rows = (stream && stream.rows) ? stream.rows : fallback; - if (stream && typeof stream.getWindowSize === 'function') { - rows = stream.getWindowSize()[1]; - } - return rows; -}; - -exports.wordWrap = (str, options = {}) => { - if (!str) return str; - - if (typeof options === 'number') { - options = { width: options }; - } - - let { indent = '', newline = ('\n' + indent), width = 80 } = options; - let spaces = (newline + indent).match(/[^\S\n]/g) || []; - width -= spaces.length; - let source = `.{1,${width}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`; - let output = str.trim(); - let regex = new RegExp(source, 'g'); - let lines = output.match(regex) || []; - lines = lines.map(line => line.replace(/\n$/, '')); - if (options.padEnd) lines = lines.map(line => line.padEnd(width, ' ')); - if (options.padStart) lines = lines.map(line => line.padStart(width, ' ')); - return indent + lines.join(newline); -}; - -exports.unmute = color => { - let name = color.stack.find(n => colors.keys.color.includes(n)); - if (name) { - return colors[name]; - } - let bg = color.stack.find(n => n.slice(2) === 'bg'); - if (bg) { - return colors[name.slice(2)]; - } - return str => str; -}; - -exports.pascal = str => str ? str[0].toUpperCase() + str.slice(1) : ''; - -exports.inverse = color => { - if (!color || !color.stack) return color; - let name = color.stack.find(n => colors.keys.color.includes(n)); - if (name) { - let col = colors['bg' + exports.pascal(name)]; - return col ? col.black : color; - } - let bg = color.stack.find(n => n.slice(0, 2) === 'bg'); - if (bg) { - return colors[bg.slice(2).toLowerCase()] || color; - } - return colors.none; -}; - -exports.complement = color => { - if (!color || !color.stack) return color; - let name = color.stack.find(n => colors.keys.color.includes(n)); - let bg = color.stack.find(n => n.slice(0, 2) === 'bg'); - if (name && !bg) { - return colors[complements[name] || name]; - } - if (bg) { - let lower = bg.slice(2).toLowerCase(); - let comp = complements[lower]; - if (!comp) return color; - return colors['bg' + exports.pascal(comp)] || color; - } - return colors.none; -}; - -exports.meridiem = date => { - let hours = date.getHours(); - let minutes = date.getMinutes(); - let ampm = hours >= 12 ? 'pm' : 'am'; - hours = hours % 12; - let hrs = hours === 0 ? 12 : hours; - let min = minutes < 10 ? '0' + minutes : minutes; - return hrs + ':' + min + ' ' + ampm; -}; - -/** - * Set a value on the given object. - * @param {Object} obj - * @param {String} prop - * @param {any} value - */ - -exports.set = (obj = {}, prop = '', val) => { - return prop.split('.').reduce((acc, k, i, arr) => { - let value = arr.length - 1 > i ? (acc[k] || {}) : val; - if (!exports.isObject(value) && i < arr.length - 1) value = {}; - return (acc[k] = value); - }, obj); -}; - -/** - * Get a value from the given object. - * @param {Object} obj - * @param {String} prop - */ - -exports.get = (obj = {}, prop = '', fallback) => { - let value = obj[prop] == null - ? prop.split('.').reduce((acc, k) => acc && acc[k], obj) - : obj[prop]; - return value == null ? fallback : value; -}; - -exports.mixin = (target, b) => { - if (!isObject(target)) return b; - if (!isObject(b)) return target; - for (let key of Object.keys(b)) { - let desc = Object.getOwnPropertyDescriptor(b, key); - if (desc.hasOwnProperty('value')) { - if (target.hasOwnProperty(key) && isObject(desc.value)) { - let existing = Object.getOwnPropertyDescriptor(target, key); - if (isObject(existing.value)) { - target[key] = exports.merge({}, target[key], b[key]); - } else { - Reflect.defineProperty(target, key, desc); - } - } else { - Reflect.defineProperty(target, key, desc); - } - } else { - Reflect.defineProperty(target, key, desc); - } - } - return target; -}; - -exports.merge = (...args) => { - let target = {}; - for (let ele of args) exports.mixin(target, ele); - return target; -}; - -exports.mixinEmitter = (obj, emitter) => { - let proto = emitter.constructor.prototype; - for (let key of Object.keys(proto)) { - let val = proto[key]; - if (typeof val === 'function') { - exports.define(obj, key, val.bind(emitter)); - } else { - exports.define(obj, key, val); - } - } -}; - -exports.onExit = callback => { - const onExit = (quit, code) => { - if (called) return; - - called = true; - fns.forEach(fn => fn()); - - if (quit === true) { - process.exit(128 + code); - } - }; - - if (fns.length === 0) { - process.once('SIGTERM', onExit.bind(null, true, 15)); - process.once('SIGINT', onExit.bind(null, true, 2)); - process.once('exit', onExit); - } - - fns.push(callback); -}; - -exports.define = (obj, key, value) => { - Reflect.defineProperty(obj, key, { value }); -}; - -exports.defineExport = (obj, key, fn) => { - let custom; - Reflect.defineProperty(obj, key, { - enumerable: true, - configurable: true, - set(val) { - custom = val; - }, - get() { - return custom ? custom() : fn(); - } - }); -}; diff --git a/node_modules/enquirer/package.json b/node_modules/enquirer/package.json deleted file mode 100644 index bc8a960cd..000000000 --- a/node_modules/enquirer/package.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "_from": "enquirer@^2.3.5", - "_id": "enquirer@2.3.6", - "_inBundle": false, - "_integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "_location": "/enquirer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "enquirer@^2.3.5", - "name": "enquirer", - "escapedName": "enquirer", - "rawSpec": "^2.3.5", - "saveSpec": null, - "fetchSpec": "^2.3.5" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "_shasum": "2a7fe5dd634a1e4125a975ec994ff5456dc3734d", - "_spec": "enquirer@^2.3.5", - "_where": "/Users/pozil/poz/git/auto-assign-issue/node_modules/eslint", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/enquirer/enquirer/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "deprecated": false, - "description": "Stylish, intuitive and user-friendly prompt system. Fast and lightweight enough for small projects, powerful and extensible enough for the most advanced use cases.", - "devDependencies": { - "@types/node": "^8", - "gulp-format-md": "^2.0.0", - "inquirer": "^6.2.0", - "mocha": "^5.2.0", - "nyc": "^13.1.0", - "prompts": "^1.2.1", - "time-require": "github:jonschlinkert/time-require", - "typescript": "^3.1.6" - }, - "engines": { - "node": ">=8.6" - }, - "files": [ - "index.js", - "index.d.ts", - "lib" - ], - "homepage": "https://github.com/enquirer/enquirer", - "keywords": [ - "answer", - "answers", - "ask", - "base", - "cli", - "command", - "command-line", - "confirm", - "enquirer", - "generator", - "generate", - "hyper", - "input", - "inquire", - "inquirer", - "interface", - "iterm", - "javascript", - "node", - "nodejs", - "prompt", - "prompts", - "promptly", - "question", - "readline", - "scaffold", - "scaffolding", - "scaffolder", - "stdin", - "stdout", - "terminal", - "tty", - "ui", - "yeoman", - "yo", - "zsh" - ], - "license": "MIT", - "lintDeps": { - "devDependencies": { - "files": { - "patterns": [ - "examples/**/*.js", - "perf/*.js", - "recipes/*.js" - ] - } - } - }, - "main": "index.js", - "name": "enquirer", - "repository": { - "type": "git", - "url": "git+https://github.com/enquirer/enquirer.git" - }, - "scripts": { - "cover": "nyc --reporter=text --reporter=html mocha", - "test": "mocha && tsc -p ./test/types" - }, - "verb": { - "toc": false, - "layout": false, - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "helpers": [ - "./docs/helpers.js" - ], - "lint": { - "reflinks": true - }, - "reflinks": [ - "inquirer", - "prompt-skeleton" - ] - }, - "version": "2.3.6" -} diff --git a/node_modules/eslint-visitor-keys/README.md b/node_modules/eslint-visitor-keys/README.md index 8bc9149dc..8eda5c7cb 100644 --- a/node_modules/eslint-visitor-keys/README.md +++ b/node_modules/eslint-visitor-keys/README.md @@ -60,7 +60,7 @@ This will be used to traverse unknown nodes. For example: -``` +```js const node = { type: "AssignmentExpression", left: { type: "Identifier", name: "foo" }, @@ -80,7 +80,7 @@ Make the union set with `evk.KEYS` and the given keys. For example: -``` +```js console.log(evk.unionWith({ MethodDefinition: ["decorators"] })) // → { ..., MethodDefinition: ["decorators", "key", "value"], ... } diff --git a/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs b/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs index 6f104196a..38f45f94a 100644 --- a/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +++ b/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs @@ -184,6 +184,8 @@ const KEYS = { "children", "closingFragment" ], + JSXClosingFragment: [], + JSXOpeningFragment: [], Literal: [], LabeledStatement: [ "label", diff --git a/node_modules/eslint-visitor-keys/lib/visitor-keys.js b/node_modules/eslint-visitor-keys/lib/visitor-keys.js index bd3900286..4c7be3da4 100644 --- a/node_modules/eslint-visitor-keys/lib/visitor-keys.js +++ b/node_modules/eslint-visitor-keys/lib/visitor-keys.js @@ -180,6 +180,8 @@ const KEYS = { "children", "closingFragment" ], + JSXClosingFragment: [], + JSXOpeningFragment: [], Literal: [], LabeledStatement: [ "label", diff --git a/node_modules/eslint-visitor-keys/package.json b/node_modules/eslint-visitor-keys/package.json index f195c437d..9cc4e19bc 100644 --- a/node_modules/eslint-visitor-keys/package.json +++ b/node_modules/eslint-visitor-keys/package.json @@ -1,28 +1,34 @@ { - "_from": "eslint-visitor-keys@^3.1.0", - "_id": "eslint-visitor-keys@3.1.0", + "_args": [ + [ + "eslint-visitor-keys@3.2.0", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_development": true, + "_from": "eslint-visitor-keys@3.2.0", + "_id": "eslint-visitor-keys@3.2.0", "_inBundle": false, - "_integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "_integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "_location": "/eslint-visitor-keys", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "eslint-visitor-keys@^3.1.0", + "raw": "eslint-visitor-keys@3.2.0", "name": "eslint-visitor-keys", "escapedName": "eslint-visitor-keys", - "rawSpec": "^3.1.0", + "rawSpec": "3.2.0", "saveSpec": null, - "fetchSpec": "^3.1.0" + "fetchSpec": "3.2.0" }, "_requiredBy": [ "/eslint", "/espree" ], - "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "_shasum": "eee4acea891814cda67a7d8812d9647dd0179af2", - "_spec": "eslint-visitor-keys@^3.1.0", - "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue/node_modules/eslint", + "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "_spec": "3.2.0", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", "author": { "name": "Toru Nagashima", "url": "https://github.com/mysticatea" @@ -30,8 +36,6 @@ "bugs": { "url": "https://github.com/eslint/eslint-visitor-keys/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Constants and utilities about visitor keys to traverse AST.", "devDependencies": { "c8": "^7.7.3", @@ -83,5 +87,5 @@ "test": "mocha tests/lib/**/*.cjs && c8 mocha tests/lib/**/*.js" }, "type": "module", - "version": "3.1.0" + "version": "3.2.0" } diff --git a/node_modules/eslint/README.md b/node_modules/eslint/README.md index 088e19694..6c6a855ec 100644 --- a/node_modules/eslint/README.md +++ b/node_modules/eslint/README.md @@ -54,7 +54,7 @@ $ npm install eslint --save-dev You should then set up a configuration file: ```sh -$ ./node_modules/.bin/eslint --init +$ npm init @eslint/config ``` After that, you can run ESLint on any file or directory like this: @@ -65,7 +65,7 @@ $ ./node_modules/.bin/eslint yourfile.js ## Configuration -After running `eslint --init`, you'll have a `.eslintrc` file in your directory. In it, you'll see some rules configured like this: +After running `npm init @eslint/config`, you'll have a `.eslintrc` file in your directory. In it, you'll see some rules configured like this: ```json { @@ -294,7 +294,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic

Gold Sponsors

Contra Nx (by Nrwl) Chrome's Web Framework & Tools Performance Fund Salesforce Airbnb Coinbase American Express Substack

Silver Sponsors

Liftoff

Bronze Sponsors

-

launchdarkly Anagram Solver VPS Server Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Fire Stick Tricks Practice Ignition

+

launchdarkly Anagram Solver VPS Server Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Practice Ignition

## Technology Sponsors diff --git a/node_modules/eslint/bin/eslint.js b/node_modules/eslint/bin/eslint.js index 6b05356b9..d00a870c0 100755 --- a/node_modules/eslint/bin/eslint.js +++ b/node_modules/eslint/bin/eslint.js @@ -124,7 +124,13 @@ ${message}`); // Call the config initializer if `--init` is present. if (process.argv.includes("--init")) { - await require("../lib/init/config-initializer").initializeConfig(); + + // `eslint --init` has been moved to `@eslint/create-config` + console.warn("You can also run this command directly using 'npm init @eslint/config'."); + + const spawn = require("cross-spawn"); + + spawn.sync("npm", ["init", "@eslint/config"], { encoding: "utf8", stdio: "inherit" }); return; } diff --git a/node_modules/eslint/lib/cli-engine/cli-engine.js b/node_modules/eslint/lib/cli-engine/cli-engine.js index e3647018d..3ae8b685c 100644 --- a/node_modules/eslint/lib/cli-engine/cli-engine.js +++ b/node_modules/eslint/lib/cli-engine/cli-engine.js @@ -51,6 +51,7 @@ const validFixTypes = new Set(["directive", "problem", "suggestion", "layout"]); /** @typedef {import("../shared/types").ConfigData} ConfigData */ /** @typedef {import("../shared/types").DeprecatedRuleInfo} DeprecatedRuleInfo */ /** @typedef {import("../shared/types").LintMessage} LintMessage */ +/** @typedef {import("../shared/types").SuppressedLintMessage} SuppressedLintMessage */ /** @typedef {import("../shared/types").ParserOptions} ParserOptions */ /** @typedef {import("../shared/types").Plugin} Plugin */ /** @typedef {import("../shared/types").RuleConf} RuleConf */ @@ -91,7 +92,9 @@ const validFixTypes = new Set(["directive", "problem", "suggestion", "layout"]); * @typedef {Object} LintResult * @property {string} filePath The path to the file that was linted. * @property {LintMessage[]} messages All of the messages for the result. + * @property {SuppressedLintMessage[]} suppressedMessages All of the suppressed messages for the result. * @property {number} errorCount Number of errors for the result. + * @property {number} fatalErrorCount Number of fatal errors for the result. * @property {number} warningCount Number of warnings for the result. * @property {number} fixableErrorCount Number of fixable errors for the result. * @property {number} fixableWarningCount Number of fixable warnings for the result. @@ -104,6 +107,7 @@ const validFixTypes = new Set(["directive", "problem", "suggestion", "layout"]); * @typedef {Object} LintReport * @property {LintResult[]} results All of the result. * @property {number} errorCount Number of errors for the result. + * @property {number} fatalErrorCount Number of fatal errors for the result. * @property {number} warningCount Number of warnings for the result. * @property {number} fixableErrorCount Number of fixable errors for the result. * @property {number} fixableWarningCount Number of fixable warnings for the result. @@ -261,6 +265,7 @@ function verifyText({ const result = { filePath, messages, + suppressedMessages: linter.getSuppressedMessages(), ...calculateStatsPerFile(messages) }; @@ -307,7 +312,9 @@ function createIgnoreResult(filePath, baseDir) { message } ], + suppressedMessages: [], errorCount: 0, + fatalErrorCount: 0, warningCount: 1, fixableErrorCount: 0, fixableWarningCount: 0 @@ -408,7 +415,7 @@ function isErrorMessage(message) { * a directory or looks like a directory (ends in `path.sep`), in which case the file * name will be the `cacheFile/.cache_hashOfCWD` * - * if cacheFile points to a file or looks like a file then in will just use that file + * if cacheFile points to a file or looks like a file then it will just use that file * @param {string} cacheFile The name of file to be used to store the cache * @param {string} cwd Current working directory * @returns {string} the resolved path to the cache file @@ -680,11 +687,13 @@ class CLIEngine { results.forEach(result => { const filteredMessages = result.messages.filter(isErrorMessage); + const filteredSuppressedMessages = result.suppressedMessages.filter(isErrorMessage); if (filteredMessages.length > 0) { filtered.push({ ...result, messages: filteredMessages, + suppressedMessages: filteredSuppressedMessages, errorCount: filteredMessages.length, warningCount: 0, fixableErrorCount: result.fixableErrorCount, diff --git a/node_modules/eslint/lib/eslint/eslint.js b/node_modules/eslint/lib/eslint/eslint.js index 6274772ad..1e5a8f8b1 100644 --- a/node_modules/eslint/lib/eslint/eslint.js +++ b/node_modules/eslint/lib/eslint/eslint.js @@ -32,6 +32,7 @@ const { version } = require("../../package.json"); /** @typedef {import("../shared/types").DeprecatedRuleInfo} DeprecatedRuleInfo */ /** @typedef {import("../shared/types").ConfigData} ConfigData */ /** @typedef {import("../shared/types").LintMessage} LintMessage */ +/** @typedef {import("../shared/types").SuppressedLintMessage} SuppressedLintMessage */ /** @typedef {import("../shared/types").Plugin} Plugin */ /** @typedef {import("../shared/types").Rule} Rule */ @@ -78,7 +79,9 @@ const { version } = require("../../package.json"); * @typedef {Object} LintResult * @property {string} filePath The path to the file that was linted. * @property {LintMessage[]} messages All of the messages for the result. + * @property {SuppressedLintMessage[]} suppressedMessages All of the suppressed messages for the result. * @property {number} errorCount Number of errors for the result. + * @property {number} fatalErrorCount Number of fatal errors for the result. * @property {number} warningCount Number of warnings for the result. * @property {number} fixableErrorCount Number of fixable errors for the result. * @property {number} fixableWarningCount Number of fixable warnings for the result. @@ -525,6 +528,9 @@ class ESLint { for (const { ruleId } of result.messages) { resultRuleIds.add(ruleId); } + for (const { ruleId } of result.suppressedMessages) { + resultRuleIds.add(ruleId); + } } // create a map of all rules in the results diff --git a/node_modules/eslint/lib/init/autoconfig.js b/node_modules/eslint/lib/init/autoconfig.js deleted file mode 100644 index ea2523421..000000000 --- a/node_modules/eslint/lib/init/autoconfig.js +++ /dev/null @@ -1,351 +0,0 @@ -/** - * @fileoverview Used for creating a suggested configuration based on project code. - * @author Ian VanSchooten - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const equal = require("fast-deep-equal"), - recConfig = require("../../conf/eslint-recommended"), - { - Legacy: { - ConfigOps - } - } = require("@eslint/eslintrc"), - { Linter } = require("../linter"), - configRule = require("./config-rule"); - -const debug = require("debug")("eslint:autoconfig"); -const linter = new Linter(); - -//------------------------------------------------------------------------------ -// Data -//------------------------------------------------------------------------------ - -const MAX_CONFIG_COMBINATIONS = 17, // 16 combinations + 1 for severity only - RECOMMENDED_CONFIG_NAME = "eslint:recommended"; - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/** - * Information about a rule configuration, in the context of a Registry. - * @typedef {Object} registryItem - * @property {ruleConfig} config A valid configuration for the rule - * @property {number} specificity The number of elements in the ruleConfig array - * @property {number} errorCount The number of errors encountered when linting with the config - */ - -/** - * This callback is used to measure execution status in a progress bar - * @callback progressCallback - * @param {number} The total number of times the callback will be called. - */ - -/** - * Create registryItems for rules - * @param {rulesConfig} rulesConfig Hash of rule names and arrays of ruleConfig items - * @returns {Object} registryItems for each rule in provided rulesConfig - */ -function makeRegistryItems(rulesConfig) { - return Object.keys(rulesConfig).reduce((accumulator, ruleId) => { - accumulator[ruleId] = rulesConfig[ruleId].map(config => ({ - config, - specificity: config.length || 1, - errorCount: void 0 - })); - return accumulator; - }, {}); -} - -/** - * Creates an object in which to store rule configs and error counts - * - * Unless a rulesConfig is provided at construction, the registry will not contain - * any rules, only methods. This will be useful for building up registries manually. - * - * Registry class - */ -class Registry { - - /** - * @param {rulesConfig} [rulesConfig] Hash of rule names and arrays of possible configurations - */ - constructor(rulesConfig) { - this.rules = (rulesConfig) ? makeRegistryItems(rulesConfig) : {}; - } - - /** - * Populate the registry with core rule configs. - * - * It will set the registry's `rule` property to an object having rule names - * as keys and an array of registryItems as values. - * @returns {void} - */ - populateFromCoreRules() { - const rulesConfig = configRule.createCoreRuleConfigs(/* noDeprecated = */ true); - - this.rules = makeRegistryItems(rulesConfig); - } - - /** - * Creates sets of rule configurations which can be used for linting - * and initializes registry errors to zero for those configurations (side effect). - * - * This combines as many rules together as possible, such that the first sets - * in the array will have the highest number of rules configured, and later sets - * will have fewer and fewer, as not all rules have the same number of possible - * configurations. - * - * The length of the returned array will be <= MAX_CONFIG_COMBINATIONS. - * @returns {Object[]} "rules" configurations to use for linting - */ - buildRuleSets() { - let idx = 0; - const ruleIds = Object.keys(this.rules), - ruleSets = []; - - /** - * Add a rule configuration from the registry to the ruleSets - * - * This is broken out into its own function so that it doesn't need to be - * created inside of the while loop. - * @param {string} rule The ruleId to add. - * @returns {void} - */ - const addRuleToRuleSet = function(rule) { - - /* - * This check ensures that there is a rule configuration and that - * it has fewer than the max combinations allowed. - * If it has too many configs, we will only use the most basic of - * the possible configurations. - */ - const hasFewCombos = (this.rules[rule].length <= MAX_CONFIG_COMBINATIONS); - - if (this.rules[rule][idx] && (hasFewCombos || this.rules[rule][idx].specificity <= 2)) { - - /* - * If the rule has too many possible combinations, only take - * simple ones, avoiding objects. - */ - if (!hasFewCombos && typeof this.rules[rule][idx].config[1] === "object") { - return; - } - - ruleSets[idx] = ruleSets[idx] || {}; - ruleSets[idx][rule] = this.rules[rule][idx].config; - - /* - * Initialize errorCount to zero, since this is a config which - * will be linted. - */ - this.rules[rule][idx].errorCount = 0; - } - }.bind(this); - - while (ruleSets.length === idx) { - ruleIds.forEach(addRuleToRuleSet); - idx += 1; - } - - return ruleSets; - } - - /** - * Remove all items from the registry with a non-zero number of errors - * - * Note: this also removes rule configurations which were not linted - * (meaning, they have an undefined errorCount). - * @returns {void} - */ - stripFailingConfigs() { - const ruleIds = Object.keys(this.rules), - newRegistry = new Registry(); - - newRegistry.rules = Object.assign({}, this.rules); - ruleIds.forEach(ruleId => { - const errorFreeItems = newRegistry.rules[ruleId].filter(registryItem => (registryItem.errorCount === 0)); - - if (errorFreeItems.length > 0) { - newRegistry.rules[ruleId] = errorFreeItems; - } else { - delete newRegistry.rules[ruleId]; - } - }); - - return newRegistry; - } - - /** - * Removes rule configurations which were not included in a ruleSet - * @returns {void} - */ - stripExtraConfigs() { - const ruleIds = Object.keys(this.rules), - newRegistry = new Registry(); - - newRegistry.rules = Object.assign({}, this.rules); - ruleIds.forEach(ruleId => { - newRegistry.rules[ruleId] = newRegistry.rules[ruleId].filter(registryItem => (typeof registryItem.errorCount !== "undefined")); - }); - - return newRegistry; - } - - /** - * Creates a registry of rules which had no error-free configs. - * The new registry is intended to be analyzed to determine whether its rules - * should be disabled or set to warning. - * @returns {Registry} A registry of failing rules. - */ - getFailingRulesRegistry() { - const ruleIds = Object.keys(this.rules), - failingRegistry = new Registry(); - - ruleIds.forEach(ruleId => { - const failingConfigs = this.rules[ruleId].filter(registryItem => (registryItem.errorCount > 0)); - - if (failingConfigs && failingConfigs.length === this.rules[ruleId].length) { - failingRegistry.rules[ruleId] = failingConfigs; - } - }); - - return failingRegistry; - } - - /** - * Create an eslint config for any rules which only have one configuration - * in the registry. - * @returns {Object} An eslint config with rules section populated - */ - createConfig() { - const ruleIds = Object.keys(this.rules), - config = { rules: {} }; - - ruleIds.forEach(ruleId => { - if (this.rules[ruleId].length === 1) { - config.rules[ruleId] = this.rules[ruleId][0].config; - } - }); - - return config; - } - - /** - * Return a cloned registry containing only configs with a desired specificity - * @param {number} specificity Only keep configs with this specificity - * @returns {Registry} A registry of rules - */ - filterBySpecificity(specificity) { - const ruleIds = Object.keys(this.rules), - newRegistry = new Registry(); - - newRegistry.rules = Object.assign({}, this.rules); - ruleIds.forEach(ruleId => { - newRegistry.rules[ruleId] = this.rules[ruleId].filter(registryItem => (registryItem.specificity === specificity)); - }); - - return newRegistry; - } - - /** - * Lint SourceCodes against all configurations in the registry, and record results - * @param {Object[]} sourceCodes SourceCode objects for each filename - * @param {Object} config ESLint config object - * @param {progressCallback} [cb] Optional callback for reporting execution status - * @returns {Registry} New registry with errorCount populated - */ - lintSourceCode(sourceCodes, config, cb) { - let lintedRegistry = new Registry(); - - lintedRegistry.rules = Object.assign({}, this.rules); - - const ruleSets = lintedRegistry.buildRuleSets(); - - lintedRegistry = lintedRegistry.stripExtraConfigs(); - - debug("Linting with all possible rule combinations"); - - const filenames = Object.keys(sourceCodes); - const totalFilesLinting = filenames.length * ruleSets.length; - - filenames.forEach(filename => { - debug(`Linting file: ${filename}`); - - let ruleSetIdx = 0; - - ruleSets.forEach(ruleSet => { - const lintConfig = Object.assign({}, config, { rules: ruleSet }); - const lintResults = linter.verify(sourceCodes[filename], lintConfig); - - lintResults.forEach(result => { - - /* - * It is possible that the error is from a configuration comment - * in a linted file, in which case there may not be a config - * set in this ruleSetIdx. - * (https://github.com/eslint/eslint/issues/5992) - * (https://github.com/eslint/eslint/issues/7860) - */ - if ( - lintedRegistry.rules[result.ruleId] && - lintedRegistry.rules[result.ruleId][ruleSetIdx] - ) { - lintedRegistry.rules[result.ruleId][ruleSetIdx].errorCount += 1; - } - }); - - ruleSetIdx += 1; - - if (cb) { - cb(totalFilesLinting); // eslint-disable-line node/callback-return -- End of function - } - }); - - // Deallocate for GC - sourceCodes[filename] = null; - }); - - return lintedRegistry; - } -} - -/** - * Extract rule configuration into eslint:recommended where possible. - * - * This will return a new config with `["extends": [ ..., "eslint:recommended"]` and - * only the rules which have configurations different from the recommended config. - * @param {Object} config config object - * @returns {Object} config object using `"extends": ["eslint:recommended"]` - */ -function extendFromRecommended(config) { - const newConfig = Object.assign({}, config); - - ConfigOps.normalizeToStrings(newConfig); - - const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId])); - - recRules.forEach(ruleId => { - if (equal(recConfig.rules[ruleId], newConfig.rules[ruleId])) { - delete newConfig.rules[ruleId]; - } - }); - newConfig.extends.unshift(RECOMMENDED_CONFIG_NAME); - return newConfig; -} - - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - Registry, - extendFromRecommended -}; diff --git a/node_modules/eslint/lib/init/config-file.js b/node_modules/eslint/lib/init/config-file.js deleted file mode 100644 index 9eb10fab3..000000000 --- a/node_modules/eslint/lib/init/config-file.js +++ /dev/null @@ -1,144 +0,0 @@ -/** - * @fileoverview Helper to locate and load configuration files. - * @author Nicholas C. Zakas - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const fs = require("fs"), - path = require("path"), - stringify = require("json-stable-stringify-without-jsonify"); - -const debug = require("debug")("eslint:config-file"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Determines sort order for object keys for json-stable-stringify - * - * see: https://github.com/samn/json-stable-stringify#cmp - * @param {Object} a The first comparison object ({key: akey, value: avalue}) - * @param {Object} b The second comparison object ({key: bkey, value: bvalue}) - * @returns {number} 1 or -1, used in stringify cmp method - */ -function sortByKey(a, b) { - return a.key > b.key ? 1 : -1; -} - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/** - * Writes a configuration file in JSON format. - * @param {Object} config The configuration object to write. - * @param {string} filePath The filename to write to. - * @returns {void} - * @private - */ -function writeJSONConfigFile(config, filePath) { - debug(`Writing JSON config file: ${filePath}`); - - const content = `${stringify(config, { cmp: sortByKey, space: 4 })}\n`; - - fs.writeFileSync(filePath, content, "utf8"); -} - -/** - * Writes a configuration file in YAML format. - * @param {Object} config The configuration object to write. - * @param {string} filePath The filename to write to. - * @returns {void} - * @private - */ -function writeYAMLConfigFile(config, filePath) { - debug(`Writing YAML config file: ${filePath}`); - - // lazy load YAML to improve performance when not used - const yaml = require("js-yaml"); - - const content = yaml.dump(config, { sortKeys: true }); - - fs.writeFileSync(filePath, content, "utf8"); -} - -/** - * Writes a configuration file in JavaScript format. - * @param {Object} config The configuration object to write. - * @param {string} filePath The filename to write to. - * @throws {Error} If an error occurs linting the config file contents. - * @returns {void} - * @private - */ -function writeJSConfigFile(config, filePath) { - debug(`Writing JS config file: ${filePath}`); - - let contentToWrite; - const stringifiedContent = `module.exports = ${stringify(config, { cmp: sortByKey, space: 4 })};\n`; - - try { - const { CLIEngine } = require("../cli-engine"); - const linter = new CLIEngine({ - baseConfig: config, - fix: true, - useEslintrc: false - }); - const report = linter.executeOnText(stringifiedContent); - - contentToWrite = report.results[0].output || stringifiedContent; - } catch (e) { - debug("Error linting JavaScript config file, writing unlinted version"); - const errorMessage = e.message; - - contentToWrite = stringifiedContent; - e.message = "An error occurred while generating your JavaScript config file. "; - e.message += "A config file was still generated, but the config file itself may not follow your linting rules."; - e.message += `\nError: ${errorMessage}`; - throw e; - } finally { - fs.writeFileSync(filePath, contentToWrite, "utf8"); - } -} - -/** - * Writes a configuration file. - * @param {Object} config The configuration object to write. - * @param {string} filePath The filename to write to. - * @returns {void} - * @throws {Error} When an unknown file type is specified. - * @private - */ -function write(config, filePath) { - switch (path.extname(filePath)) { - case ".js": - case ".cjs": - writeJSConfigFile(config, filePath); - break; - - case ".json": - writeJSONConfigFile(config, filePath); - break; - - case ".yaml": - case ".yml": - writeYAMLConfigFile(config, filePath); - break; - - default: - throw new Error("Can't write to unknown file type."); - } -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - write -}; diff --git a/node_modules/eslint/lib/init/config-initializer.js b/node_modules/eslint/lib/init/config-initializer.js deleted file mode 100644 index 3c244b7bc..000000000 --- a/node_modules/eslint/lib/init/config-initializer.js +++ /dev/null @@ -1,709 +0,0 @@ -/** - * @fileoverview Config initialization wizard. - * @author Ilya Volodin - */ - - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const util = require("util"), - path = require("path"), - fs = require("fs"), - enquirer = require("enquirer"), - ProgressBar = require("progress"), - semver = require("semver"), - espree = require("espree"), - recConfig = require("../../conf/eslint-recommended"), - { - Legacy: { - ConfigOps, - naming - } - } = require("@eslint/eslintrc"), - log = require("../shared/logging"), - ModuleResolver = require("../shared/relative-module-resolver"), - autoconfig = require("./autoconfig.js"), - ConfigFile = require("./config-file"), - npmUtils = require("./npm-utils"), - { getSourceCodeOfFiles } = require("./source-code-utils"); - -const debug = require("debug")("eslint:config-initializer"); - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/* istanbul ignore next: hard to test fs function */ -/** - * Create .eslintrc file in the current working directory - * @param {Object} config object that contains user's answers - * @param {string} format The file format to write to. - * @returns {void} - */ -function writeFile(config, format) { - - // default is .js - let extname = ".js"; - - if (format === "YAML") { - extname = ".yml"; - } else if (format === "JSON") { - extname = ".json"; - } else if (format === "JavaScript") { - const pkgJSONPath = npmUtils.findPackageJson(); - - if (pkgJSONPath) { - const pkgJSONContents = JSON.parse(fs.readFileSync(pkgJSONPath, "utf8")); - - if (pkgJSONContents.type === "module") { - extname = ".cjs"; - } - } - } - - const installedESLint = config.installedESLint; - - delete config.installedESLint; - - ConfigFile.write(config, `./.eslintrc${extname}`); - log.info(`Successfully created .eslintrc${extname} file in ${process.cwd()}`); - - if (installedESLint) { - log.info("ESLint was installed locally. We recommend using this local copy instead of your globally-installed copy."); - } -} - -/** - * Get the peer dependencies of the given module. - * This adds the gotten value to cache at the first time, then reuses it. - * In a process, this function is called twice, but `npmUtils.fetchPeerDependencies` needs to access network which is relatively slow. - * @param {string} moduleName The module name to get. - * @returns {Object} The peer dependencies of the given module. - * This object is the object of `peerDependencies` field of `package.json`. - * Returns null if npm was not found. - */ -function getPeerDependencies(moduleName) { - let result = getPeerDependencies.cache.get(moduleName); - - if (!result) { - log.info(`Checking peerDependencies of ${moduleName}`); - - result = npmUtils.fetchPeerDependencies(moduleName); - getPeerDependencies.cache.set(moduleName, result); - } - - return result; -} -getPeerDependencies.cache = new Map(); - -/** - * Return necessary plugins, configs, parsers, etc. based on the config - * @param {Object} config config object - * @param {boolean} [installESLint=true] If `false` is given, it does not install eslint. - * @returns {string[]} An array of modules to be installed. - */ -function getModulesList(config, installESLint) { - const modules = {}; - - // Create a list of modules which should be installed based on config - if (config.plugins) { - for (const plugin of config.plugins) { - const moduleName = naming.normalizePackageName(plugin, "eslint-plugin"); - - modules[moduleName] = "latest"; - } - } - if (config.extends) { - const extendList = Array.isArray(config.extends) ? config.extends : [config.extends]; - - for (const extend of extendList) { - if (extend.startsWith("eslint:") || extend.startsWith("plugin:")) { - continue; - } - const moduleName = naming.normalizePackageName(extend, "eslint-config"); - - modules[moduleName] = "latest"; - Object.assign( - modules, - getPeerDependencies(`${moduleName}@latest`) - ); - } - } - - const parser = config.parser || (config.parserOptions && config.parserOptions.parser); - - if (parser) { - modules[parser] = "latest"; - } - - if (installESLint === false) { - delete modules.eslint; - } else { - const installStatus = npmUtils.checkDevDeps(["eslint"]); - - // Mark to show messages if it's new installation of eslint. - if (installStatus.eslint === false) { - log.info("Local ESLint installation not found."); - modules.eslint = modules.eslint || "latest"; - config.installedESLint = true; - } - } - - return Object.keys(modules).map(name => `${name}@${modules[name]}`); -} - -/** - * Set the `rules` of a config by examining a user's source code - * - * Note: This clones the config object and returns a new config to avoid mutating - * the original config parameter. - * @param {Object} answers answers received from enquirer - * @param {Object} config config object - * @throws {Error} If source code retrieval fails or source code file count is 0. - * @returns {Object} config object with configured rules - */ -function configureRules(answers, config) { - const BAR_TOTAL = 20, - BAR_SOURCE_CODE_TOTAL = 4, - newConfig = Object.assign({}, config), - disabledConfigs = {}; - let sourceCodes, - registry; - - // Set up a progress bar, as this process can take a long time - const bar = new ProgressBar("Determining Config: :percent [:bar] :elapseds elapsed, eta :etas ", { - width: 30, - total: BAR_TOTAL - }); - - bar.tick(0); // Shows the progress bar - - // Get the SourceCode of all chosen files - const patterns = answers.patterns.split(/[\s]+/u); - - try { - sourceCodes = getSourceCodeOfFiles(patterns, { baseConfig: newConfig, useEslintrc: false }, total => { - bar.tick((BAR_SOURCE_CODE_TOTAL / total)); - }); - } catch (e) { - log.info("\n"); - throw e; - } - const fileQty = Object.keys(sourceCodes).length; - - if (fileQty === 0) { - log.info("\n"); - throw new Error("Automatic Configuration failed. No files were able to be parsed."); - } - - // Create a registry of rule configs - registry = new autoconfig.Registry(); - registry.populateFromCoreRules(); - - // Lint all files with each rule config in the registry - registry = registry.lintSourceCode(sourceCodes, newConfig, total => { - bar.tick((BAR_TOTAL - BAR_SOURCE_CODE_TOTAL) / total); // Subtract out ticks used at beginning - }); - debug(`\nRegistry: ${util.inspect(registry.rules, { depth: null })}`); - - // Create a list of recommended rules, because we don't want to disable them - const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId])); - - // Find and disable rules which had no error-free configuration - const failingRegistry = registry.getFailingRulesRegistry(); - - Object.keys(failingRegistry.rules).forEach(ruleId => { - - // If the rule is recommended, set it to error, otherwise disable it - disabledConfigs[ruleId] = (recRules.indexOf(ruleId) !== -1) ? 2 : 0; - }); - - // Now that we know which rules to disable, strip out configs with errors - registry = registry.stripFailingConfigs(); - - /* - * If there is only one config that results in no errors for a rule, we should use it. - * createConfig will only add rules that have one configuration in the registry. - */ - const singleConfigs = registry.createConfig().rules; - - /* - * The "sweet spot" for number of options in a config seems to be two (severity plus one option). - * Very often, a third option (usually an object) is available to address - * edge cases, exceptions, or unique situations. We will prefer to use a config with - * specificity of two. - */ - const specTwoConfigs = registry.filterBySpecificity(2).createConfig().rules; - - // Maybe a specific combination using all three options works - const specThreeConfigs = registry.filterBySpecificity(3).createConfig().rules; - - // If all else fails, try to use the default (severity only) - const defaultConfigs = registry.filterBySpecificity(1).createConfig().rules; - - // Combine configs in reverse priority order (later take precedence) - newConfig.rules = Object.assign({}, disabledConfigs, defaultConfigs, specThreeConfigs, specTwoConfigs, singleConfigs); - - // Make sure progress bar has finished (floating point rounding) - bar.update(BAR_TOTAL); - - // Log out some stats to let the user know what happened - const finalRuleIds = Object.keys(newConfig.rules); - const totalRules = finalRuleIds.length; - const enabledRules = finalRuleIds.filter(ruleId => (newConfig.rules[ruleId] !== 0)).length; - const resultMessage = [ - `\nEnabled ${enabledRules} out of ${totalRules}`, - `rules based on ${fileQty}`, - `file${(fileQty === 1) ? "." : "s."}` - ].join(" "); - - log.info(resultMessage); - - ConfigOps.normalizeToStrings(newConfig); - return newConfig; -} - -/** - * process user's answers and create config object - * @param {Object} answers answers received from enquirer - * @returns {Object} config object - */ -function processAnswers(answers) { - let config = { - rules: {}, - env: {}, - parserOptions: {}, - extends: [] - }; - - config.parserOptions.ecmaVersion = espree.latestEcmaVersion; - config.env.es2021 = true; - - // set the module type - if (answers.moduleType === "esm") { - config.parserOptions.sourceType = "module"; - } else if (answers.moduleType === "commonjs") { - config.env.commonjs = true; - } - - // add in browser and node environments if necessary - answers.env.forEach(env => { - config.env[env] = true; - }); - - // add in library information - if (answers.framework === "react") { - config.parserOptions.ecmaFeatures = { - jsx: true - }; - config.plugins = ["react"]; - config.extends.push("plugin:react/recommended"); - } else if (answers.framework === "vue") { - config.plugins = ["vue"]; - config.extends.push("plugin:vue/essential"); - } - - if (answers.typescript) { - if (answers.framework === "vue") { - config.parserOptions.parser = "@typescript-eslint/parser"; - } else { - config.parser = "@typescript-eslint/parser"; - } - - if (Array.isArray(config.plugins)) { - config.plugins.push("@typescript-eslint"); - } else { - config.plugins = ["@typescript-eslint"]; - } - } - - // setup rules based on problems/style enforcement preferences - if (answers.purpose === "problems") { - config.extends.unshift("eslint:recommended"); - } else if (answers.purpose === "style") { - if (answers.source === "prompt") { - config.extends.unshift("eslint:recommended"); - config.rules.indent = ["error", answers.indent]; - config.rules.quotes = ["error", answers.quotes]; - config.rules["linebreak-style"] = ["error", answers.linebreak]; - config.rules.semi = ["error", answers.semi ? "always" : "never"]; - } else if (answers.source === "auto") { - config = configureRules(answers, config); - config = autoconfig.extendFromRecommended(config); - } - } - if (answers.typescript && config.extends.includes("eslint:recommended")) { - config.extends.push("plugin:@typescript-eslint/recommended"); - } - - // normalize extends - if (config.extends.length === 0) { - delete config.extends; - } else if (config.extends.length === 1) { - config.extends = config.extends[0]; - } - - ConfigOps.normalizeToStrings(config); - return config; -} - -/** - * Get the version of the local ESLint. - * @returns {string|null} The version. If the local ESLint was not found, returns null. - */ -function getLocalESLintVersion() { - try { - const eslintPath = ModuleResolver.resolve("eslint", path.join(process.cwd(), "__placeholder__.js")); - const eslint = require(eslintPath); - - return eslint.linter.version || null; - } catch { - return null; - } -} - -/** - * Get the shareable config name of the chosen style guide. - * @param {Object} answers The answers object. - * @returns {string} The shareable config name. - */ -function getStyleGuideName(answers) { - if (answers.styleguide === "airbnb" && answers.framework !== "react") { - return "airbnb-base"; - } - return answers.styleguide; -} - -/** - * Check whether the local ESLint version conflicts with the required version of the chosen shareable config. - * @param {Object} answers The answers object. - * @returns {boolean} `true` if the local ESLint is found then it conflicts with the required version of the chosen shareable config. - */ -function hasESLintVersionConflict(answers) { - - // Get the local ESLint version. - const localESLintVersion = getLocalESLintVersion(); - - if (!localESLintVersion) { - return false; - } - - // Get the required range of ESLint version. - const configName = getStyleGuideName(answers); - const moduleName = `eslint-config-${configName}@latest`; - const peerDependencies = getPeerDependencies(moduleName) || {}; - const requiredESLintVersionRange = peerDependencies.eslint; - - if (!requiredESLintVersionRange) { - return false; - } - - answers.localESLintVersion = localESLintVersion; - answers.requiredESLintVersionRange = requiredESLintVersionRange; - - // Check the version. - if (semver.satisfies(localESLintVersion, requiredESLintVersionRange)) { - answers.installESLint = false; - return false; - } - - return true; -} - -/** - * Install modules. - * @param {string[]} modules Modules to be installed. - * @returns {void} - */ -function installModules(modules) { - log.info(`Installing ${modules.join(", ")}`); - npmUtils.installSyncSaveDev(modules); -} - -/* istanbul ignore next: no need to test enquirer */ -/** - * Ask user to install modules. - * @param {string[]} modules Array of modules to be installed. - * @param {boolean} packageJsonExists Indicates if package.json is existed. - * @returns {Promise} Answer that indicates if user wants to install. - */ -function askInstallModules(modules, packageJsonExists) { - - // If no modules, do nothing. - if (modules.length === 0) { - return Promise.resolve(); - } - - log.info("The config that you've selected requires the following dependencies:\n"); - log.info(modules.join(" ")); - return enquirer.prompt([ - { - type: "toggle", - name: "executeInstallation", - message: "Would you like to install them now with npm?", - enabled: "Yes", - disabled: "No", - initial: 1, - skip() { - return !(modules.length && packageJsonExists); - }, - result(input) { - return this.skipped ? null : input; - } - } - ]).then(({ executeInstallation }) => { - if (executeInstallation) { - installModules(modules); - } - }); -} - -/* istanbul ignore next: no need to test enquirer */ -/** - * Ask use a few questions on command prompt - * @returns {Promise} The promise with the result of the prompt - */ -function promptUser() { - - return enquirer.prompt([ - { - type: "select", - name: "purpose", - message: "How would you like to use ESLint?", - - // The returned number matches the name value of nth in the choices array. - initial: 1, - choices: [ - { message: "To check syntax only", name: "syntax" }, - { message: "To check syntax and find problems", name: "problems" }, - { message: "To check syntax, find problems, and enforce code style", name: "style" } - ] - }, - { - type: "select", - name: "moduleType", - message: "What type of modules does your project use?", - initial: 0, - choices: [ - { message: "JavaScript modules (import/export)", name: "esm" }, - { message: "CommonJS (require/exports)", name: "commonjs" }, - { message: "None of these", name: "none" } - ] - }, - { - type: "select", - name: "framework", - message: "Which framework does your project use?", - initial: 0, - choices: [ - { message: "React", name: "react" }, - { message: "Vue.js", name: "vue" }, - { message: "None of these", name: "none" } - ] - }, - { - type: "toggle", - name: "typescript", - message: "Does your project use TypeScript?", - enabled: "Yes", - disabled: "No", - initial: 0 - }, - { - type: "multiselect", - name: "env", - message: "Where does your code run?", - hint: "(Press to select, to toggle all, to invert selection)", - initial: 0, - choices: [ - { message: "Browser", name: "browser" }, - { message: "Node", name: "node" } - ] - }, - { - type: "select", - name: "source", - message: "How would you like to define a style for your project?", - choices: [ - { message: "Use a popular style guide", name: "guide" }, - { message: "Answer questions about your style", name: "prompt" }, - { message: "Inspect your JavaScript file(s)", name: "auto" } - ], - skip() { - return this.state.answers.purpose !== "style"; - }, - result(input) { - return this.skipped ? null : input; - } - }, - { - type: "select", - name: "styleguide", - message: "Which style guide do you want to follow?", - choices: [ - { message: "Airbnb: https://github.com/airbnb/javascript", name: "airbnb" }, - { message: "Standard: https://github.com/standard/standard", name: "standard" }, - { message: "Google: https://github.com/google/eslint-config-google", name: "google" }, - { message: "XO: https://github.com/xojs/eslint-config-xo", name: "xo" } - ], - skip() { - this.state.answers.packageJsonExists = npmUtils.checkPackageJson(); - return !(this.state.answers.source === "guide" && this.state.answers.packageJsonExists); - }, - result(input) { - return this.skipped ? null : input; - } - }, - { - type: "input", - name: "patterns", - message: "Which file(s), path(s), or glob(s) should be examined?", - skip() { - return this.state.answers.source !== "auto"; - }, - validate(input) { - if (!this.skipped && input.trim().length === 0 && input.trim() !== ",") { - return "You must tell us what code to examine. Try again."; - } - return true; - } - }, - { - type: "select", - name: "format", - message: "What format do you want your config file to be in?", - initial: 0, - choices: ["JavaScript", "YAML", "JSON"] - }, - { - type: "toggle", - name: "installESLint", - message() { - const { answers } = this.state; - const verb = semver.ltr(answers.localESLintVersion, answers.requiredESLintVersionRange) - ? "upgrade" - : "downgrade"; - - return `The style guide "${answers.styleguide}" requires eslint@${answers.requiredESLintVersionRange}. You are currently using eslint@${answers.localESLintVersion}.\n Do you want to ${verb}?`; - }, - enabled: "Yes", - disabled: "No", - initial: 1, - skip() { - return !(this.state.answers.source === "guide" && this.state.answers.packageJsonExists && hasESLintVersionConflict(this.state.answers)); - }, - result(input) { - return this.skipped ? null : input; - } - } - ]).then(earlyAnswers => { - - // early exit if no style guide is necessary - if (earlyAnswers.purpose !== "style") { - const config = processAnswers(earlyAnswers); - const modules = getModulesList(config); - - return askInstallModules(modules, earlyAnswers.packageJsonExists) - .then(() => writeFile(config, earlyAnswers.format)); - } - - // early exit if you are using a style guide - if (earlyAnswers.source === "guide") { - if (!earlyAnswers.packageJsonExists) { - log.info("A package.json is necessary to install plugins such as style guides. Run `npm init` to create a package.json file and try again."); - return void 0; - } - if (earlyAnswers.installESLint === false && !semver.satisfies(earlyAnswers.localESLintVersion, earlyAnswers.requiredESLintVersionRange)) { - log.info(`Note: it might not work since ESLint's version is mismatched with the ${earlyAnswers.styleguide} config.`); - } - if (earlyAnswers.styleguide === "airbnb" && earlyAnswers.framework !== "react") { - earlyAnswers.styleguide = "airbnb-base"; - } - - const config = processAnswers(earlyAnswers); - - if (Array.isArray(config.extends)) { - config.extends.push(earlyAnswers.styleguide); - } else if (config.extends) { - config.extends = [config.extends, earlyAnswers.styleguide]; - } else { - config.extends = [earlyAnswers.styleguide]; - } - - const modules = getModulesList(config); - - return askInstallModules(modules, earlyAnswers.packageJsonExists) - .then(() => writeFile(config, earlyAnswers.format)); - - } - - if (earlyAnswers.source === "auto") { - const combinedAnswers = Object.assign({}, earlyAnswers); - const config = processAnswers(combinedAnswers); - const modules = getModulesList(config); - - return askInstallModules(modules).then(() => writeFile(config, earlyAnswers.format)); - } - - // continue with the style questions otherwise... - return enquirer.prompt([ - { - type: "select", - name: "indent", - message: "What style of indentation do you use?", - initial: 0, - choices: [{ message: "Tabs", name: "tab" }, { message: "Spaces", name: 4 }] - }, - { - type: "select", - name: "quotes", - message: "What quotes do you use for strings?", - initial: 0, - choices: [{ message: "Double", name: "double" }, { message: "Single", name: "single" }] - }, - { - type: "select", - name: "linebreak", - message: "What line endings do you use?", - initial: 0, - choices: [{ message: "Unix", name: "unix" }, { message: "Windows", name: "windows" }] - }, - { - type: "toggle", - name: "semi", - message: "Do you require semicolons?", - enabled: "Yes", - disabled: "No", - initial: 1 - } - ]).then(answers => { - const totalAnswers = Object.assign({}, earlyAnswers, answers); - - const config = processAnswers(totalAnswers); - const modules = getModulesList(config); - - return askInstallModules(modules).then(() => writeFile(config, earlyAnswers.format)); - }); - }); -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -const init = { - getModulesList, - hasESLintVersionConflict, - installModules, - processAnswers, - writeFile, - /* istanbul ignore next */initializeConfig() { - return promptUser(); - } -}; - -module.exports = init; diff --git a/node_modules/eslint/lib/init/config-rule.js b/node_modules/eslint/lib/init/config-rule.js deleted file mode 100644 index 131e84a60..000000000 --- a/node_modules/eslint/lib/init/config-rule.js +++ /dev/null @@ -1,316 +0,0 @@ -/** - * @fileoverview Create configurations for a rule - * @author Ian VanSchooten - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const builtInRules = require("../rules"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Wrap all of the elements of an array into arrays. - * @param {*[]} xs Any array. - * @returns {Array[]} An array of arrays. - */ -function explodeArray(xs) { - return xs.reduce((accumulator, x) => { - accumulator.push([x]); - return accumulator; - }, []); -} - -/** - * Mix two arrays such that each element of the second array is concatenated - * onto each element of the first array. - * - * For example: - * combineArrays([a, [b, c]], [x, y]); // -> [[a, x], [a, y], [b, c, x], [b, c, y]] - * @param {Array} arr1 The first array to combine. - * @param {Array} arr2 The second array to combine. - * @returns {Array} A mixture of the elements of the first and second arrays. - */ -function combineArrays(arr1, arr2) { - const res = []; - - if (arr1.length === 0) { - return explodeArray(arr2); - } - if (arr2.length === 0) { - return explodeArray(arr1); - } - arr1.forEach(x1 => { - arr2.forEach(x2 => { - res.push([].concat(x1, x2)); - }); - }); - return res; -} - -/** - * Group together valid rule configurations based on object properties - * - * e.g.: - * groupByProperty([ - * {before: true}, - * {before: false}, - * {after: true}, - * {after: false} - * ]); - * - * will return: - * [ - * [{before: true}, {before: false}], - * [{after: true}, {after: false}] - * ] - * @param {Object[]} objects Array of objects, each with one property/value pair - * @returns {Array[]} Array of arrays of objects grouped by property - */ -function groupByProperty(objects) { - const groupedObj = objects.reduce((accumulator, obj) => { - const prop = Object.keys(obj)[0]; - - accumulator[prop] = accumulator[prop] ? accumulator[prop].concat(obj) : [obj]; - return accumulator; - }, {}); - - return Object.keys(groupedObj).map(prop => groupedObj[prop]); -} - - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/** - * Configuration settings for a rule. - * - * A configuration can be a single number (severity), or an array where the first - * element in the array is the severity, and is the only required element. - * Configs may also have one or more additional elements to specify rule - * configuration or options. - * @typedef {Array|number} ruleConfig - * @param {number} 0 The rule's severity (0, 1, 2). - */ - -/** - * Object whose keys are rule names and values are arrays of valid ruleConfig items - * which should be linted against the target source code to determine error counts. - * (a ruleConfigSet.ruleConfigs). - * - * e.g. rulesConfig = { - * "comma-dangle": [2, [2, "always"], [2, "always-multiline"], [2, "never"]], - * "no-console": [2] - * } - * @typedef rulesConfig - */ - - -/** - * Create valid rule configurations by combining two arrays, - * with each array containing multiple objects each with a - * single property/value pair and matching properties. - * - * e.g.: - * combinePropertyObjects( - * [{before: true}, {before: false}], - * [{after: true}, {after: false}] - * ); - * - * will return: - * [ - * {before: true, after: true}, - * {before: true, after: false}, - * {before: false, after: true}, - * {before: false, after: false} - * ] - * @param {Object[]} objArr1 Single key/value objects, all with the same key - * @param {Object[]} objArr2 Single key/value objects, all with another key - * @returns {Object[]} Combined objects for each combination of input properties and values - */ -function combinePropertyObjects(objArr1, objArr2) { - const res = []; - - if (objArr1.length === 0) { - return objArr2; - } - if (objArr2.length === 0) { - return objArr1; - } - objArr1.forEach(obj1 => { - objArr2.forEach(obj2 => { - const combinedObj = {}; - const obj1Props = Object.keys(obj1); - const obj2Props = Object.keys(obj2); - - obj1Props.forEach(prop1 => { - combinedObj[prop1] = obj1[prop1]; - }); - obj2Props.forEach(prop2 => { - combinedObj[prop2] = obj2[prop2]; - }); - res.push(combinedObj); - }); - }); - return res; -} - -/** - * Creates a new instance of a rule configuration set - * - * A rule configuration set is an array of configurations that are valid for a - * given rule. For example, the configuration set for the "semi" rule could be: - * - * ruleConfigSet.ruleConfigs // -> [[2], [2, "always"], [2, "never"]] - * - * Rule configuration set class - */ -class RuleConfigSet { - - /** - * @param {ruleConfig[]} configs Valid rule configurations - */ - constructor(configs) { - - /** - * Stored valid rule configurations for this instance - * @type {Array} - */ - this.ruleConfigs = configs || []; - } - - /** - * Add a severity level to the front of all configs in the instance. - * This should only be called after all configs have been added to the instance. - * @returns {void} - */ - addErrorSeverity() { - const severity = 2; - - this.ruleConfigs = this.ruleConfigs.map(config => { - config.unshift(severity); - return config; - }); - - // Add a single config at the beginning consisting of only the severity - this.ruleConfigs.unshift(severity); - } - - /** - * Add rule configs from an array of strings (schema enums) - * @param {string[]} enums Array of valid rule options (e.g. ["always", "never"]) - * @returns {void} - */ - addEnums(enums) { - this.ruleConfigs = this.ruleConfigs.concat(combineArrays(this.ruleConfigs, enums)); - } - - /** - * Add rule configurations from a schema object - * @param {Object} obj Schema item with type === "object" - * @returns {boolean} true if at least one schema for the object could be generated, false otherwise - */ - addObject(obj) { - const objectConfigSet = { - objectConfigs: [], - add(property, values) { - for (let idx = 0; idx < values.length; idx++) { - const optionObj = {}; - - optionObj[property] = values[idx]; - this.objectConfigs.push(optionObj); - } - }, - - combine() { - this.objectConfigs = groupByProperty(this.objectConfigs).reduce((accumulator, objArr) => combinePropertyObjects(accumulator, objArr), []); - } - }; - - /* - * The object schema could have multiple independent properties. - * If any contain enums or booleans, they can be added and then combined - */ - Object.keys(obj.properties).forEach(prop => { - if (obj.properties[prop].enum) { - objectConfigSet.add(prop, obj.properties[prop].enum); - } - if (obj.properties[prop].type && obj.properties[prop].type === "boolean") { - objectConfigSet.add(prop, [true, false]); - } - }); - objectConfigSet.combine(); - - if (objectConfigSet.objectConfigs.length > 0) { - this.ruleConfigs = this.ruleConfigs.concat(combineArrays(this.ruleConfigs, objectConfigSet.objectConfigs)); - return true; - } - - return false; - } -} - -/** - * Generate valid rule configurations based on a schema object - * @param {Object} schema A rule's schema object - * @returns {Array[]} Valid rule configurations - */ -function generateConfigsFromSchema(schema) { - const configSet = new RuleConfigSet(); - - if (Array.isArray(schema)) { - for (const opt of schema) { - if (opt.enum) { - configSet.addEnums(opt.enum); - } else if (opt.type && opt.type === "object") { - if (!configSet.addObject(opt)) { - break; - } - - // TODO (IanVS): support oneOf - } else { - - // If we don't know how to fill in this option, don't fill in any of the following options. - break; - } - } - } - configSet.addErrorSeverity(); - return configSet.ruleConfigs; -} - -/** - * Generate possible rule configurations for all of the core rules - * @param {boolean} noDeprecated Indicates whether ignores deprecated rules or not. - * @returns {rulesConfig} Hash of rule names and arrays of possible configurations - */ -function createCoreRuleConfigs(noDeprecated = false) { - return Array.from(builtInRules).reduce((accumulator, [id, rule]) => { - const schema = (typeof rule === "function") ? rule.schema : rule.meta.schema; - const isDeprecated = (typeof rule === "function") ? rule.deprecated : rule.meta.deprecated; - - if (noDeprecated && isDeprecated) { - return accumulator; - } - - accumulator[id] = generateConfigsFromSchema(schema); - return accumulator; - }, {}); -} - - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - generateConfigsFromSchema, - createCoreRuleConfigs -}; diff --git a/node_modules/eslint/lib/init/npm-utils.js b/node_modules/eslint/lib/init/npm-utils.js deleted file mode 100644 index 4a8efe964..000000000 --- a/node_modules/eslint/lib/init/npm-utils.js +++ /dev/null @@ -1,179 +0,0 @@ -/** - * @fileoverview Utility for executing npm commands. - * @author Ian VanSchooten - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const fs = require("fs"), - spawn = require("cross-spawn"), - path = require("path"), - log = require("../shared/logging"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Find the closest package.json file, starting at process.cwd (by default), - * and working up to root. - * @param {string} [startDir=process.cwd()] Starting directory - * @returns {string} Absolute path to closest package.json file - */ -function findPackageJson(startDir) { - let dir = path.resolve(startDir || process.cwd()); - - do { - const pkgFile = path.join(dir, "package.json"); - - if (!fs.existsSync(pkgFile) || !fs.statSync(pkgFile).isFile()) { - dir = path.join(dir, ".."); - continue; - } - return pkgFile; - } while (dir !== path.resolve(dir, "..")); - return null; -} - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/** - * Install node modules synchronously and save to devDependencies in package.json - * @param {string|string[]} packages Node module or modules to install - * @returns {void} - */ -function installSyncSaveDev(packages) { - const packageList = Array.isArray(packages) ? packages : [packages]; - const npmProcess = spawn.sync("npm", ["i", "--save-dev"].concat(packageList), { stdio: "inherit" }); - const error = npmProcess.error; - - if (error && error.code === "ENOENT") { - const pluralS = packageList.length > 1 ? "s" : ""; - - log.error(`Could not execute npm. Please install the following package${pluralS} with a package manager of your choice: ${packageList.join(", ")}`); - } -} - -/** - * Fetch `peerDependencies` of the given package by `npm show` command. - * @param {string} packageName The package name to fetch peerDependencies. - * @returns {Object} Gotten peerDependencies. Returns null if npm was not found. - */ -function fetchPeerDependencies(packageName) { - const npmProcess = spawn.sync( - "npm", - ["show", "--json", packageName, "peerDependencies"], - { encoding: "utf8" } - ); - - const error = npmProcess.error; - - if (error && error.code === "ENOENT") { - return null; - } - const fetchedText = npmProcess.stdout.trim(); - - return JSON.parse(fetchedText || "{}"); - - -} - -/** - * Check whether node modules are include in a project's package.json. - * @param {string[]} packages Array of node module names - * @param {Object} opt Options Object - * @param {boolean} opt.dependencies Set to true to check for direct dependencies - * @param {boolean} opt.devDependencies Set to true to check for development dependencies - * @param {boolean} opt.startdir Directory to begin searching from - * @throws {Error} If cannot find valid `package.json` file. - * @returns {Object} An object whose keys are the module names - * and values are booleans indicating installation. - */ -function check(packages, opt) { - const deps = new Set(); - const pkgJson = (opt) ? findPackageJson(opt.startDir) : findPackageJson(); - let fileJson; - - if (!pkgJson) { - throw new Error("Could not find a package.json file. Run 'npm init' to create one."); - } - - try { - fileJson = JSON.parse(fs.readFileSync(pkgJson, "utf8")); - } catch (e) { - const error = new Error(e); - - error.messageTemplate = "failed-to-read-json"; - error.messageData = { - path: pkgJson, - message: e.message - }; - throw error; - } - - ["dependencies", "devDependencies"].forEach(key => { - if (opt[key] && typeof fileJson[key] === "object") { - Object.keys(fileJson[key]).forEach(dep => deps.add(dep)); - } - }); - - return packages.reduce((status, pkg) => { - status[pkg] = deps.has(pkg); - return status; - }, {}); -} - -/** - * Check whether node modules are included in the dependencies of a project's - * package.json. - * - * Convenience wrapper around check(). - * @param {string[]} packages Array of node modules to check. - * @param {string} rootDir The directory containing a package.json - * @returns {Object} An object whose keys are the module names - * and values are booleans indicating installation. - */ -function checkDeps(packages, rootDir) { - return check(packages, { dependencies: true, startDir: rootDir }); -} - -/** - * Check whether node modules are included in the devDependencies of a project's - * package.json. - * - * Convenience wrapper around check(). - * @param {string[]} packages Array of node modules to check. - * @returns {Object} An object whose keys are the module names - * and values are booleans indicating installation. - */ -function checkDevDeps(packages) { - return check(packages, { devDependencies: true }); -} - -/** - * Check whether package.json is found in current path. - * @param {string} [startDir] Starting directory - * @returns {boolean} Whether a package.json is found in current path. - */ -function checkPackageJson(startDir) { - return !!findPackageJson(startDir); -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - installSyncSaveDev, - fetchPeerDependencies, - findPackageJson, - checkDeps, - checkDevDeps, - checkPackageJson -}; diff --git a/node_modules/eslint/lib/init/source-code-utils.js b/node_modules/eslint/lib/init/source-code-utils.js deleted file mode 100644 index 08c20e5d5..000000000 --- a/node_modules/eslint/lib/init/source-code-utils.js +++ /dev/null @@ -1,110 +0,0 @@ -/** - * @fileoverview Tools for obtaining SourceCode objects. - * @author Ian VanSchooten - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const { CLIEngine } = require("../cli-engine"); - -/* - * This is used for: - * - * 1. Enumerate target file because we have not expose such a API on `CLIEngine` - * (https://github.com/eslint/eslint/issues/11222). - * 2. Create `SourceCode` instances. Because we don't have any function which - * instantiate `SourceCode` so it needs to take the created `SourceCode` - * instance out after linting. - * - * TODO1: Expose the API that enumerates target files. - * TODO2: Extract the creation logic of `SourceCode` from `Linter` class. - */ -const { getCLIEngineInternalSlots } = require("../cli-engine/cli-engine"); // eslint-disable-line node/no-restricted-require -- Todo - -const debug = require("debug")("eslint:source-code-utils"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Get the SourceCode object for a single file - * @param {string} filename The fully resolved filename to get SourceCode from. - * @param {Object} engine A CLIEngine. - * @throws {Error} Upon fatal errors from execution. - * @returns {Array} Array of the SourceCode object representing the file - * and fatal error message. - */ -function getSourceCodeOfFile(filename, engine) { - debug("getting sourceCode of", filename); - const results = engine.executeOnFiles([filename]); - - if (results && results.results[0] && results.results[0].messages[0] && results.results[0].messages[0].fatal) { - const msg = results.results[0].messages[0]; - - throw new Error(`(${filename}:${msg.line}:${msg.column}) ${msg.message}`); - } - - // TODO: extract the logic that creates source code objects to `SourceCode#parse(text, options)` or something like. - const { linter } = getCLIEngineInternalSlots(engine); - const sourceCode = linter.getSourceCode(); - - return sourceCode; -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - - -/** - * This callback is used to measure execution status in a progress bar - * @callback progressCallback - * @param {number} The total number of times the callback will be called. - */ - -/** - * Gets the SourceCode of a single file, or set of files. - * @param {string[]|string} patterns A filename, directory name, or glob, or an array of them - * @param {Object} options A CLIEngine options object. If not provided, the default cli options will be used. - * @param {progressCallback} callback Callback for reporting execution status - * @returns {Object} The SourceCode of all processed files. - */ -function getSourceCodeOfFiles(patterns, options, callback) { - const sourceCodes = {}; - const globPatternsList = typeof patterns === "string" ? [patterns] : patterns; - const engine = new CLIEngine({ ...options, rules: {} }); - - // TODO: make file iteration as a public API and use it. - const { fileEnumerator } = getCLIEngineInternalSlots(engine); - const filenames = - Array.from(fileEnumerator.iterateFiles(globPatternsList)) - .filter(entry => !entry.ignored) - .map(entry => entry.filePath); - - if (filenames.length === 0) { - debug(`Did not find any files matching pattern(s): ${globPatternsList}`); - } - - filenames.forEach(filename => { - const sourceCode = getSourceCodeOfFile(filename, engine); - - if (sourceCode) { - debug("got sourceCode of", filename); - sourceCodes[filename] = sourceCode; - } - if (callback) { - callback(filenames.length); // eslint-disable-line node/callback-return -- End of function - } - }); - - return sourceCodes; -} - -module.exports = { - getSourceCodeOfFiles -}; diff --git a/node_modules/eslint/lib/linter/apply-disable-directives.js b/node_modules/eslint/lib/linter/apply-disable-directives.js index f6b432399..f8e4aeedb 100644 --- a/node_modules/eslint/lib/linter/apply-disable-directives.js +++ b/node_modules/eslint/lib/linter/apply-disable-directives.js @@ -197,62 +197,52 @@ function processUnusedDisableDirectives(allDirectives) { * for the exported function, except that `reportUnusedDisableDirectives` is not supported * (this function always reports unused disable directives). * @returns {{problems: Problem[], unusedDisableDirectives: Problem[]}} An object with a list - * of filtered problems and unused eslint-disable directives + * of problems (including suppressed ones) and unused eslint-disable directives */ function applyDirectives(options) { const problems = []; - let nextDirectiveIndex = 0; - let currentGlobalDisableDirective = null; - const disabledRuleMap = new Map(); - - // enabledRules is only used when there is a current global disable directive. - const enabledRules = new Set(); const usedDisableDirectives = new Set(); for (const problem of options.problems) { + let disableDirectivesForProblem = []; + let nextDirectiveIndex = 0; + while ( nextDirectiveIndex < options.directives.length && compareLocations(options.directives[nextDirectiveIndex], problem) <= 0 ) { const directive = options.directives[nextDirectiveIndex++]; - switch (directive.type) { - case "disable": - if (directive.ruleId === null) { - currentGlobalDisableDirective = directive; - disabledRuleMap.clear(); - enabledRules.clear(); - } else if (currentGlobalDisableDirective) { - enabledRules.delete(directive.ruleId); - disabledRuleMap.set(directive.ruleId, directive); - } else { - disabledRuleMap.set(directive.ruleId, directive); - } - break; - - case "enable": - if (directive.ruleId === null) { - currentGlobalDisableDirective = null; - disabledRuleMap.clear(); - } else if (currentGlobalDisableDirective) { - enabledRules.add(directive.ruleId); - disabledRuleMap.delete(directive.ruleId); - } else { - disabledRuleMap.delete(directive.ruleId); - } - break; - - // no default + if (directive.ruleId === null || directive.ruleId === problem.ruleId) { + switch (directive.type) { + case "disable": + disableDirectivesForProblem.push(directive); + break; + + case "enable": + disableDirectivesForProblem = []; + break; + + // no default + } } } - if (disabledRuleMap.has(problem.ruleId)) { - usedDisableDirectives.add(disabledRuleMap.get(problem.ruleId)); - } else if (currentGlobalDisableDirective && !enabledRules.has(problem.ruleId)) { - usedDisableDirectives.add(currentGlobalDisableDirective); - } else { - problems.push(problem); + if (disableDirectivesForProblem.length > 0) { + const suppressions = disableDirectivesForProblem.map(directive => ({ + kind: "directive", + justification: directive.unprocessedDirective.justification + })); + + if (problem.suppressions) { + problem.suppressions = problem.suppressions.concat(suppressions); + } else { + problem.suppressions = suppressions; + usedDisableDirectives.add(disableDirectivesForProblem[disableDirectivesForProblem.length - 1]); + } } + + problems.push(problem); } const unusedDisableDirectivesToReport = options.directives @@ -282,13 +272,14 @@ function applyDirectives(options) { /** * Given a list of directive comments (i.e. metadata about eslint-disable and eslint-enable comments) and a list - * of reported problems, determines which problems should be reported. + * of reported problems, adds the suppression information to the problems. * @param {Object} options Information about directives and problems * @param {{ * type: ("disable"|"enable"|"disable-line"|"disable-next-line"), * ruleId: (string|null), * line: number, - * column: number + * column: number, + * justification: string * }} options.directives Directive comments found in the file, with one-based columns. * Two directive comments can only have the same location if they also have the same type (e.g. a single eslint-disable * comment for two different rules is represented as two directives). @@ -296,8 +287,8 @@ function applyDirectives(options) { * A list of problems reported by rules, sorted by increasing location in the file, with one-based columns. * @param {"off" | "warn" | "error"} options.reportUnusedDisableDirectives If `"warn"` or `"error"`, adds additional problems for unused directives * @param {boolean} options.disableFixes If true, it doesn't make `fix` properties. - * @returns {{ruleId: (string|null), line: number, column: number}[]} - * A list of reported problems that were not disabled by the directive comments. + * @returns {{ruleId: (string|null), line: number, column: number, suppressions?: {kind: string, justification: string}}[]} + * An object with a list of reported problems, the suppressed of which contain the suppression information. */ module.exports = ({ directives, disableFixes, problems, reportUnusedDisableDirectives = "off" }) => { const blockDirectives = directives diff --git a/node_modules/eslint/lib/linter/linter.js b/node_modules/eslint/lib/linter/linter.js index 056f9cec9..9b9f49192 100644 --- a/node_modules/eslint/lib/linter/linter.js +++ b/node_modules/eslint/lib/linter/linter.js @@ -59,6 +59,7 @@ const globals = require("../../conf/globals"); /** @typedef {import("../shared/types").Environment} Environment */ /** @typedef {import("../shared/types").GlobalConf} GlobalConf */ /** @typedef {import("../shared/types").LintMessage} LintMessage */ +/** @typedef {import("../shared/types").SuppressedLintMessage} SuppressedLintMessage */ /** @typedef {import("../shared/types").ParserOptions} ParserOptions */ /** @typedef {import("../shared/types").LanguageOptions} LanguageOptions */ /** @typedef {import("../shared/types").Processor} Processor */ @@ -77,6 +78,7 @@ const globals = require("../../conf/globals"); * @property {number} line The line number * @property {number} column The column number * @property {(string|null)} ruleId The rule ID + * @property {string} justification The justification of directive */ /** @@ -84,6 +86,7 @@ const globals = require("../../conf/globals"); * @typedef {Object} LinterInternalSlots * @property {ConfigArray|null} lastConfigArray The `ConfigArray` instance that the last `verify()` call used. * @property {SourceCode|null} lastSourceCode The `SourceCode` instance that the last `verify()` call used. + * @property {SuppressedLintMessage[]} lastSuppressedMessages The `SuppressedLintMessage[]` instance that the last `verify()` call produced. * @property {Map} parserMap The loaded parsers. * @property {Rules} ruleMap The loaded rules. */ @@ -287,11 +290,12 @@ function createLintingProblem(options) { * @param {token} options.commentToken The Comment token * @param {string} options.value The value after the directive in the comment * comment specified no specific rules, so it applies to all rules (e.g. `eslint-disable`) + * @param {string} options.justification The justification of the directive * @param {function(string): {create: Function}} options.ruleMapper A map from rule IDs to defined rules * @returns {Object} Directives and problems from the comment */ function createDisableDirectives(options) { - const { commentToken, type, value, ruleMapper } = options; + const { commentToken, type, value, justification, ruleMapper } = options; const ruleIds = Object.keys(commentParser.parseListConfig(value)); const directiveRules = ruleIds.length ? ruleIds : [null]; const result = { @@ -306,9 +310,23 @@ function createDisableDirectives(options) { // push to directives, if the rule is defined(including null, e.g. /*eslint enable*/) if (ruleId === null || !!ruleMapper(ruleId)) { if (type === "disable-next-line") { - result.directives.push({ parentComment, type, line: commentToken.loc.end.line, column: commentToken.loc.end.column + 1, ruleId }); + result.directives.push({ + parentComment, + type, + line: commentToken.loc.end.line, + column: commentToken.loc.end.column + 1, + ruleId, + justification + }); } else { - result.directives.push({ parentComment, type, line: commentToken.loc.start.line, column: commentToken.loc.start.column + 1, ruleId }); + result.directives.push({ + parentComment, + type, + line: commentToken.loc.start.line, + column: commentToken.loc.start.column + 1, + ruleId, + justification + }); } } else { result.directiveProblems.push(createLintingProblem({ ruleId, loc: commentToken.loc })); @@ -318,12 +336,21 @@ function createDisableDirectives(options) { } /** - * Remove the ignored part from a given directive comment and trim it. - * @param {string} value The comment text to strip. - * @returns {string} The stripped text. + * Extract the directive and the justification from a given directive comment and trim them. + * @param {string} value The comment text to extract. + * @returns {{directivePart: string, justificationPart: string}} The extracted directive and justification. */ -function stripDirectiveComment(value) { - return value.split(/\s-{2,}\s/u)[0].trim(); +function extractDirectiveComment(value) { + const match = /\s-{2,}\s/u.exec(value); + + if (!match) { + return { directivePart: value.trim(), justificationPart: "" }; + } + + const directive = value.slice(0, match.index).trim(); + const justification = value.slice(match.index + match[0].length).trim(); + + return { directivePart: directive, justificationPart: justification }; } /** @@ -347,8 +374,9 @@ function getDirectiveComments(ast, ruleMapper, warnInlineConfig) { }); ast.comments.filter(token => token.type !== "Shebang").forEach(comment => { - const trimmedCommentText = stripDirectiveComment(comment.value); - const match = /^(eslint(?:-env|-enable|-disable(?:(?:-next)?-line)?)?|exported|globals?)(?:\s|$)/u.exec(trimmedCommentText); + const { directivePart, justificationPart } = extractDirectiveComment(comment.value); + + const match = /^(eslint(?:-env|-enable|-disable(?:(?:-next)?-line)?)?|exported|globals?)(?:\s|$)/u.exec(directivePart); if (!match) { return; @@ -383,7 +411,7 @@ function getDirectiveComments(ast, ruleMapper, warnInlineConfig) { return; } - const directiveValue = trimmedCommentText.slice(match.index + directiveText.length); + const directiveValue = directivePart.slice(match.index + directiveText.length); switch (directiveText) { case "eslint-disable": @@ -391,7 +419,7 @@ function getDirectiveComments(ast, ruleMapper, warnInlineConfig) { case "eslint-disable-next-line": case "eslint-disable-line": { const directiveType = directiveText.slice("eslint-".length); - const options = { commentToken: comment, type: directiveType, value: directiveValue, ruleMapper }; + const options = { commentToken: comment, type: directiveType, value: directiveValue, justification: justificationPart, ruleMapper }; const { directives, directiveProblems } = createDisableDirectives(options); disableDirectives.push(...directives); @@ -548,7 +576,7 @@ function findEslintEnv(text) { if (match[0].endsWith("*/")) { retv = Object.assign( retv || {}, - commentParser.parseListConfig(stripDirectiveComment(match[1])) + commentParser.parseListConfig(extractDirectiveComment(match[1]).directivePart) ); } } @@ -1223,6 +1251,7 @@ class Linter { cwd: normalizeCwd(cwd), lastConfigArray: null, lastSourceCode: null, + lastSuppressedMessages: [], configType, // TODO: Remove after flat config conversion parserMap: new Map([["espree", espree]]), ruleMap: new Rules() @@ -1246,7 +1275,7 @@ class Linter { * @param {ConfigData} providedConfig An ESLintConfig instance to configure everything. * @param {VerifyOptions} [providedOptions] The optional filename of the file being checked. * @throws {Error} If during rule execution. - * @returns {LintMessage[]} The results as an array of messages or an empty array if no messages. + * @returns {(LintMessage|SuppressedLintMessage)[]} The results as an array of messages or an empty array if no messages. */ _verifyWithoutProcessors(textOrSourceCode, providedConfig, providedOptions) { const slots = internalSlotsMap.get(this); @@ -1428,11 +1457,11 @@ class Linter { configArray.normalizeSync(); } - return this._verifyWithFlatConfigArray(textOrSourceCode, configArray, options, true); + return this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(textOrSourceCode, configArray, options, true)); } if (typeof config.extractConfig === "function") { - return this._verifyWithConfigArray(textOrSourceCode, config, options); + return this._distinguishSuppressedMessages(this._verifyWithConfigArray(textOrSourceCode, config, options)); } } @@ -1446,9 +1475,9 @@ class Linter { * So we cannot apply multiple processors. */ if (options.preprocess || options.postprocess) { - return this._verifyWithProcessor(textOrSourceCode, config, options); + return this._distinguishSuppressedMessages(this._verifyWithProcessor(textOrSourceCode, config, options)); } - return this._verifyWithoutProcessors(textOrSourceCode, config, options); + return this._distinguishSuppressedMessages(this._verifyWithoutProcessors(textOrSourceCode, config, options)); } /** @@ -1457,7 +1486,7 @@ class Linter { * @param {FlatConfig} config The config array. * @param {VerifyOptions&ProcessorOptions} options The options. * @param {FlatConfigArray} [configForRecursive] The `ConfigArray` object to apply multiple processors recursively. - * @returns {LintMessage[]} The found problems. + * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems. */ _verifyWithFlatConfigArrayAndProcessor(textOrSourceCode, config, options, configForRecursive) { const filename = options.filename || ""; @@ -1514,7 +1543,7 @@ class Linter { * @param {FlatConfig} providedConfig An ESLintConfig instance to configure everything. * @param {VerifyOptions} [providedOptions] The optional filename of the file being checked. * @throws {Error} If during rule execution. - * @returns {LintMessage[]} The results as an array of messages or an empty array if no messages. + * @returns {(LintMessage|SuppressedLintMessage)[]} The results as an array of messages or an empty array if no messages. */ _verifyWithFlatConfigArrayAndWithoutProcessors(textOrSourceCode, providedConfig, providedOptions) { const slots = internalSlotsMap.get(this); @@ -1663,7 +1692,7 @@ class Linter { * @param {string|SourceCode} textOrSourceCode The source code. * @param {ConfigArray} configArray The config array. * @param {VerifyOptions&ProcessorOptions} options The options. - * @returns {LintMessage[]} The found problems. + * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems. */ _verifyWithConfigArray(textOrSourceCode, configArray, options) { debug("With ConfigArray: %s", options.filename); @@ -1700,7 +1729,7 @@ class Linter { * @param {VerifyOptions&ProcessorOptions} options The options. * @param {boolean} [firstCall=false] Indicates if this is being called directly * from verify(). (TODO: Remove once eslintrc is removed.) - * @returns {LintMessage[]} The found problems. + * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems. */ _verifyWithFlatConfigArray(textOrSourceCode, configArray, options, firstCall = false) { debug("With flat config: %s", options.filename); @@ -1740,7 +1769,7 @@ class Linter { * @param {ConfigData|ExtractedConfig} config The config array. * @param {VerifyOptions&ProcessorOptions} options The options. * @param {ConfigArray} [configForRecursive] The `ConfigArray` object to apply multiple processors recursively. - * @returns {LintMessage[]} The found problems. + * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems. */ _verifyWithProcessor(textOrSourceCode, config, options, configForRecursive) { const filename = options.filename || ""; @@ -1792,6 +1821,30 @@ class Linter { return postprocess(messageLists, filenameToExpose); } + /** + * Given a list of reported problems, distinguish problems between normal messages and suppressed messages. + * The normal messages will be returned and the suppressed messages will be stored as lastSuppressedMessages. + * @param {Problem[]} problems A list of reported problems. + * @returns {LintMessage[]} A list of LintMessage. + */ + _distinguishSuppressedMessages(problems) { + const messages = []; + const suppressedMessages = []; + const slots = internalSlotsMap.get(this); + + for (const problem of problems) { + if (problem.suppressions) { + suppressedMessages.push(problem); + } else { + messages.push(problem); + } + } + + slots.lastSuppressedMessages = suppressedMessages; + + return messages; + } + /** * Gets the SourceCode object representing the parsed source. * @returns {SourceCode} The SourceCode object. @@ -1800,6 +1853,14 @@ class Linter { return internalSlotsMap.get(this).lastSourceCode; } + /** + * Gets the list of SuppressedLintMessage produced in the last running. + * @returns {SuppressedLintMessage[]} The list of SuppressedLintMessage + */ + getSuppressedMessages() { + return internalSlotsMap.get(this).lastSuppressedMessages; + } + /** * Defines a new linting rule. * @param {string} ruleId A unique rule identifier diff --git a/node_modules/eslint/lib/rule-tester/rule-tester.js b/node_modules/eslint/lib/rule-tester/rule-tester.js index fe520a58a..398f21013 100644 --- a/node_modules/eslint/lib/rule-tester/rule-tester.js +++ b/node_modules/eslint/lib/rule-tester/rule-tester.js @@ -977,10 +977,10 @@ class RuleTester { * This creates a mocha test suite and pipes all supplied info through * one of the templates above. */ - RuleTester.describe(ruleName, () => { - RuleTester.describe("valid", () => { + this.constructor.describe(ruleName, () => { + this.constructor.describe("valid", () => { test.valid.forEach(valid => { - RuleTester[valid.only ? "itOnly" : "it"]( + this.constructor[valid.only ? "itOnly" : "it"]( sanitize(typeof valid === "object" ? valid.name || valid.code : valid), () => { testValidTemplate(valid); @@ -989,9 +989,9 @@ class RuleTester { }); }); - RuleTester.describe("invalid", () => { + this.constructor.describe("invalid", () => { test.invalid.forEach(invalid => { - RuleTester[invalid.only ? "itOnly" : "it"]( + this.constructor[invalid.only ? "itOnly" : "it"]( sanitize(invalid.name || invalid.code), () => { testInvalidTemplate(invalid); diff --git a/node_modules/eslint/lib/rules/camelcase.js b/node_modules/eslint/lib/rules/camelcase.js index 61dd062ed..6bb1838a7 100644 --- a/node_modules/eslint/lib/rules/camelcase.js +++ b/node_modules/eslint/lib/rules/camelcase.js @@ -5,6 +5,12 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -165,7 +171,7 @@ module.exports = { case "ImportSpecifier": return ( parent.local === node && - parent.imported.name === localName + astUtils.getModuleExportName(parent.imported) === localName ); default: diff --git a/node_modules/eslint/lib/rules/id-match.js b/node_modules/eslint/lib/rules/id-match.js index 977e66a26..8713a5f9f 100644 --- a/node_modules/eslint/lib/rules/id-match.js +++ b/node_modules/eslint/lib/rules/id-match.js @@ -250,7 +250,7 @@ module.exports = { } // never check properties or always ignore destructuring - if (!checkProperties || (ignoreDestructuring && isInsideObjectPattern(node))) { + if ((!checkProperties && !parent.computed) || (ignoreDestructuring && isInsideObjectPattern(node))) { return; } diff --git a/node_modules/eslint/lib/rules/keyword-spacing.js b/node_modules/eslint/lib/rules/keyword-spacing.js index 956fc4265..16a65d786 100644 --- a/node_modules/eslint/lib/rules/keyword-spacing.js +++ b/node_modules/eslint/lib/rules/keyword-spacing.js @@ -469,6 +469,7 @@ module.exports = { const asToken = sourceCode.getTokenBefore(node.exported); checkSpacingBefore(asToken, PREV_TOKEN_M); + checkSpacingAfter(asToken, NEXT_TOKEN_M); } if (node.source) { @@ -479,6 +480,35 @@ module.exports = { } } + /** + * Reports `as` keyword of a given node if usage of spacing around this + * keyword is invalid. + * @param {ASTNode} node An `ImportSpecifier` node to check. + * @returns {void} + */ + function checkSpacingForImportSpecifier(node) { + if (node.imported.range[0] !== node.local.range[0]) { + const asToken = sourceCode.getTokenBefore(node.local); + + checkSpacingBefore(asToken, PREV_TOKEN_M); + } + } + + /** + * Reports `as` keyword of a given node if usage of spacing around this + * keyword is invalid. + * @param {ASTNode} node An `ExportSpecifier` node to check. + * @returns {void} + */ + function checkSpacingForExportSpecifier(node) { + if (node.local.range[0] !== node.exported.range[0]) { + const asToken = sourceCode.getTokenBefore(node.exported); + + checkSpacingBefore(asToken, PREV_TOKEN_M); + checkSpacingAfter(asToken, NEXT_TOKEN_M); + } + } + /** * Reports `as` keyword of a given node if usage of spacing around this * keyword is invalid. @@ -588,6 +618,8 @@ module.exports = { YieldExpression: checkSpacingBeforeFirstToken, // Others + ImportSpecifier: checkSpacingForImportSpecifier, + ExportSpecifier: checkSpacingForExportSpecifier, ImportNamespaceSpecifier: checkSpacingForImportNamespaceSpecifier, MethodDefinition: checkSpacingForProperty, PropertyDefinition: checkSpacingForProperty, diff --git a/node_modules/eslint/lib/rules/no-constant-condition.js b/node_modules/eslint/lib/rules/no-constant-condition.js index 0bcb31931..8adc9bca4 100644 --- a/node_modules/eslint/lib/rules/no-constant-condition.js +++ b/node_modules/eslint/lib/rules/no-constant-condition.js @@ -124,7 +124,8 @@ module.exports = { * Checks if a node has a constant truthiness value. * @param {ASTNode} node The AST node to check. * @param {boolean} inBooleanPosition `false` if checking branch of a condition. - * `true` in all other cases + * `true` in all other cases. When `false`, checks if -- for both string and + * number -- if coerced to that type, the value will be constant. * @returns {Bool} true when node's truthiness is constant * @private */ @@ -138,15 +139,31 @@ module.exports = { case "Literal": case "ArrowFunctionExpression": case "FunctionExpression": - case "ObjectExpression": + return true; case "ClassExpression": + case "ObjectExpression": + + /** + * In theory objects like: + * + * `{toString: () => a}` + * `{valueOf: () => a}` + * + * Or a classes like: + * + * `class { static toString() { return a } }` + * `class { static valueOf() { return a } }` + * + * Are not constant verifiably when `inBooleanPosition` is + * false, but it's an edge case we've opted not to handle. + */ return true; case "TemplateLiteral": return (inBooleanPosition && node.quasis.some(quasi => quasi.value.cooked.length)) || - node.expressions.every(exp => isConstant(exp, inBooleanPosition)); + node.expressions.every(exp => isConstant(exp, false)); case "ArrayExpression": { - if (node.parent.type === "BinaryExpression" && node.parent.operator === "+") { + if (!inBooleanPosition) { return node.elements.every(element => isConstant(element, false)); } return true; @@ -196,6 +213,8 @@ module.exports = { case "SequenceExpression": return isConstant(node.expressions[node.expressions.length - 1], inBooleanPosition); + case "SpreadElement": + return isConstant(node.argument, inBooleanPosition); // no default } diff --git a/node_modules/eslint/lib/rules/no-invalid-this.js b/node_modules/eslint/lib/rules/no-invalid-this.js index 5f9b9f871..64e4d964a 100644 --- a/node_modules/eslint/lib/rules/no-invalid-this.js +++ b/node_modules/eslint/lib/rules/no-invalid-this.js @@ -11,6 +11,21 @@ const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Determines if the given code path is a code path with lexical `this` binding. + * That is, if `this` within the code path refers to `this` of surrounding code path. + * @param {CodePath} codePath Code path. + * @param {ASTNode} node Node that started the code path. + * @returns {boolean} `true` if it is a code path with lexical `this` binding. + */ +function isCodePathWithLexicalThis(codePath, node) { + return codePath.origin === "function" && node.type === "ArrowFunctionExpression"; +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -72,71 +87,53 @@ module.exports = { return current; }; - /** - * Pushs new checking context into the stack. - * - * The checking context is not initialized yet. - * Because most functions don't have `this` keyword. - * When `this` keyword was found, the checking context is initialized. - * @param {ASTNode} node A function node that was entered. - * @returns {void} - */ - function enterFunction(node) { - - // `this` can be invalid only under strict mode. - stack.push({ - init: !context.getScope().isStrict, - node, - valid: true - }); - } + return { - /** - * Pops the current checking context from the stack. - * @returns {void} - */ - function exitFunction() { - stack.pop(); - } + onCodePathStart(codePath, node) { + if (isCodePathWithLexicalThis(codePath, node)) { + return; + } - return { + if (codePath.origin === "program") { + const scope = context.getScope(); + const features = context.parserOptions.ecmaFeatures || {}; + + stack.push({ + init: true, + node, + valid: !( + scope.isStrict || + node.sourceType === "module" || + (features.globalReturn && scope.childScopes[0].isStrict) + ) + }); - /* - * `this` is invalid only under strict mode. - * Modules is always strict mode. - */ - Program(node) { - const scope = context.getScope(), - features = context.parserOptions.ecmaFeatures || {}; + return; + } + /* + * `init: false` means that `valid` isn't determined yet. + * Most functions don't use `this`, and the calculation for `valid` + * is relatively costly, so we'll calculate it lazily when the first + * `this` within the function is traversed. A special case are non-strict + * functions, because `this` refers to the global object and therefore is + * always valid, so we can set `init: true` right away. + */ stack.push({ - init: true, + init: !context.getScope().isStrict, node, - valid: !( - scope.isStrict || - node.sourceType === "module" || - (features.globalReturn && scope.childScopes[0].isStrict) - ) + valid: true }); }, - "Program:exit"() { + onCodePathEnd(codePath, node) { + if (isCodePathWithLexicalThis(codePath, node)) { + return; + } + stack.pop(); }, - FunctionDeclaration: enterFunction, - "FunctionDeclaration:exit": exitFunction, - FunctionExpression: enterFunction, - "FunctionExpression:exit": exitFunction, - - // Field initializers are implicit functions. - "PropertyDefinition > *.value": enterFunction, - "PropertyDefinition > *.value:exit": exitFunction, - - // Class static blocks are implicit functions. - StaticBlock: enterFunction, - "StaticBlock:exit": exitFunction, - // Reports if `this` of the current context is invalid. ThisExpression(node) { const current = stack.getCurrent(); diff --git a/node_modules/eslint/lib/rules/no-restricted-exports.js b/node_modules/eslint/lib/rules/no-restricted-exports.js index 775e505d8..5166cecae 100644 --- a/node_modules/eslint/lib/rules/no-restricted-exports.js +++ b/node_modules/eslint/lib/rules/no-restricted-exports.js @@ -5,6 +5,12 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -44,12 +50,12 @@ module.exports = { const restrictedNames = new Set(context.options[0] && context.options[0].restrictedNamedExports); /** - * Checks and reports given exported identifier. - * @param {ASTNode} node exported `Identifier` node to check. + * Checks and reports given exported name. + * @param {ASTNode} node exported `Identifier` or string `Literal` node to check. * @returns {void} */ function checkExportedName(node) { - const name = node.name; + const name = astUtils.getModuleExportName(node); if (restrictedNames.has(name)) { context.report({ diff --git a/node_modules/eslint/lib/rules/no-restricted-imports.js b/node_modules/eslint/lib/rules/no-restricted-imports.js index 6813037f1..3bb45d715 100644 --- a/node_modules/eslint/lib/rules/no-restricted-imports.js +++ b/node_modules/eslint/lib/rules/no-restricted-imports.js @@ -4,6 +4,12 @@ */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -63,6 +69,9 @@ const arrayOfStringsOrObjectPatterns = { message: { type: "string", minLength: 1 + }, + caseSensitive: { + type: "boolean" } }, additionalProperties: false, @@ -142,10 +151,18 @@ module.exports = { }, {}); // Handle patterns too, either as strings or groups - const restrictedPatterns = (isPathAndPatternsObject ? options[0].patterns : []) || []; - const restrictedPatternGroups = restrictedPatterns.length > 0 && typeof restrictedPatterns[0] === "string" - ? [{ matcher: ignore().add(restrictedPatterns) }] - : restrictedPatterns.map(({ group, message }) => ({ matcher: ignore().add(group), customMessage: message })); + let restrictedPatterns = (isPathAndPatternsObject ? options[0].patterns : []) || []; + + // standardize to array of objects if we have an array of strings + if (restrictedPatterns.length > 0 && typeof restrictedPatterns[0] === "string") { + restrictedPatterns = [{ group: restrictedPatterns }]; + } + + // relative paths are supported for this rule + const restrictedPatternGroups = restrictedPatterns.map(({ group, message, caseSensitive }) => ({ + matcher: ignore({ allowRelativePaths: true, ignorecase: !caseSensitive }).add(group), + customMessage: message + })); // if no imports are restricted we don't need to check if (Object.keys(restrictedPaths).length === 0 && restrictedPatternGroups.length === 0) { @@ -269,12 +286,12 @@ module.exports = { } else if (specifier.type === "ImportNamespaceSpecifier") { name = "*"; } else if (specifier.imported) { - name = specifier.imported.name; + name = astUtils.getModuleExportName(specifier.imported); } else if (specifier.local) { - name = specifier.local.name; + name = astUtils.getModuleExportName(specifier.local); } - if (name) { + if (typeof name === "string") { if (importNames.has(name)) { importNames.get(name).push(specifierData); } else { diff --git a/node_modules/eslint/lib/rules/no-restricted-modules.js b/node_modules/eslint/lib/rules/no-restricted-modules.js index 26e75ef81..d92aa7a86 100644 --- a/node_modules/eslint/lib/rules/no-restricted-modules.js +++ b/node_modules/eslint/lib/rules/no-restricted-modules.js @@ -103,7 +103,8 @@ module.exports = { return {}; } - const ig = ignore().add(restrictedPatterns); + // relative paths are supported for this rule + const ig = ignore({ allowRelativePaths: true }).add(restrictedPatterns); /** diff --git a/node_modules/eslint/lib/rules/no-useless-rename.js b/node_modules/eslint/lib/rules/no-useless-rename.js index 616ec2a43..2489f57bc 100644 --- a/node_modules/eslint/lib/rules/no-useless-rename.js +++ b/node_modules/eslint/lib/rules/no-useless-rename.js @@ -132,8 +132,10 @@ module.exports = { return; } - if (node.imported.name === node.local.name && - node.imported.range[0] !== node.local.range[0]) { + if ( + node.imported.range[0] !== node.local.range[0] && + astUtils.getModuleExportName(node.imported) === node.local.name + ) { reportError(node, node.imported, "Import"); } } @@ -148,8 +150,10 @@ module.exports = { return; } - if (node.local.name === node.exported.name && - node.local.range[0] !== node.exported.range[0]) { + if ( + node.local.range[0] !== node.exported.range[0] && + astUtils.getModuleExportName(node.local) === astUtils.getModuleExportName(node.exported) + ) { reportError(node, node.local, "Export"); } diff --git a/node_modules/eslint/lib/rules/quotes.js b/node_modules/eslint/lib/rules/quotes.js index a9960961e..41bff3c4e 100644 --- a/node_modules/eslint/lib/rules/quotes.js +++ b/node_modules/eslint/lib/rules/quotes.js @@ -223,9 +223,20 @@ module.exports = { // ModuleSpecifier. case "ImportDeclaration": case "ExportNamedDeclaration": - case "ExportAllDeclaration": return parent.source === node; + // ModuleExportName or ModuleSpecifier. + case "ExportAllDeclaration": + return parent.exported === node || parent.source === node; + + // ModuleExportName. + case "ImportSpecifier": + return parent.imported === node; + + // ModuleExportName. + case "ExportSpecifier": + return parent.local === node || parent.exported === node; + // Others don't allow. default: return false; diff --git a/node_modules/eslint/lib/rules/utils/ast-utils.js b/node_modules/eslint/lib/rules/utils/ast-utils.js index 16d7b8115..ecde099fa 100644 --- a/node_modules/eslint/lib/rules/utils/ast-utils.js +++ b/node_modules/eslint/lib/rules/utils/ast-utils.js @@ -769,6 +769,25 @@ function getSwitchCaseColonToken(node, sourceCode) { return sourceCode.getFirstToken(node, 1); } +/** + * Gets ESM module export name represented by the given node. + * @param {ASTNode} node `Identifier` or string `Literal` node in a position + * that represents a module export name: + * - `ImportSpecifier#imported` + * - `ExportSpecifier#local` (if it is a re-export from another module) + * - `ExportSpecifier#exported` + * - `ExportAllDeclaration#exported` + * @returns {string} The module export name. + */ +function getModuleExportName(node) { + if (node.type === "Identifier") { + return node.name; + } + + // string literal + return node.value; +} + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ @@ -1898,5 +1917,6 @@ module.exports = { equalLiteralValue, isSameReference, isLogicalAssignmentOperator, - getSwitchCaseColonToken + getSwitchCaseColonToken, + getModuleExportName }; diff --git a/node_modules/eslint/lib/shared/types.js b/node_modules/eslint/lib/shared/types.js index ab59207a6..c407c4fb1 100644 --- a/node_modules/eslint/lib/shared/types.js +++ b/node_modules/eslint/lib/shared/types.js @@ -105,6 +105,21 @@ module.exports = {}; * @property {Array<{desc?: string, messageId?: string, fix: {range: [number, number], text: string}}>} [suggestions] Information for suggestions. */ +/** + * @typedef {Object} SuppressedLintMessage + * @property {number|undefined} column The 1-based column number. + * @property {number} [endColumn] The 1-based column number of the end location. + * @property {number} [endLine] The 1-based line number of the end location. + * @property {boolean} fatal If `true` then this is a fatal error. + * @property {{range:[number,number], text:string}} [fix] Information for autofix. + * @property {number|undefined} line The 1-based line number. + * @property {string} message The error message. + * @property {string|null} ruleId The ID of the rule which makes this message. + * @property {0|1|2} severity The severity of this message. + * @property {Array<{kind: string, justification: string}>} suppressions The suppression info. + * @property {Array<{desc?: string, messageId?: string, fix: {range: [number, number], text: string}}>} [suggestions] Information for suggestions. + */ + /** * @typedef {Object} SuggestionResult * @property {string} desc A short description. diff --git a/node_modules/eslint/messages/no-config-found.js b/node_modules/eslint/messages/no-config-found.js index 1042143f9..c2f7ac73b 100644 --- a/node_modules/eslint/messages/no-config-found.js +++ b/node_modules/eslint/messages/no-config-found.js @@ -6,7 +6,7 @@ module.exports = function(it) { return ` ESLint couldn't find a configuration file. To set up a configuration file for this project, please run: - eslint --init + npm init @eslint/config ESLint looked for configuration files in ${directoryPath} and its ancestors. If it found none, it then looked in your home directory. diff --git a/node_modules/eslint/package.json b/node_modules/eslint/package.json index c24005a18..7328b6fe3 100644 --- a/node_modules/eslint/package.json +++ b/node_modules/eslint/package.json @@ -1,26 +1,32 @@ { - "_from": "eslint@^8.6.0", - "_id": "eslint@8.6.0", + "_args": [ + [ + "eslint@8.8.0", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_development": true, + "_from": "eslint@8.8.0", + "_id": "eslint@8.8.0", "_inBundle": false, - "_integrity": "sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==", + "_integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", "_location": "/eslint", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "eslint@^8.6.0", + "raw": "eslint@8.8.0", "name": "eslint", "escapedName": "eslint", - "rawSpec": "^8.6.0", + "rawSpec": "8.8.0", "saveSpec": null, - "fetchSpec": "^8.6.0" + "fetchSpec": "8.8.0" }, "_requiredBy": [ "#DEV:/" ], - "_resolved": "https://registry.npmjs.org/eslint/-/eslint-8.6.0.tgz", - "_shasum": "4318c6a31c5584838c1a2e940c478190f58d558e", - "_spec": "eslint@^8.6.0", + "_resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", + "_spec": "8.8.0", "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", "author": { "name": "Nicholas C. Zakas", @@ -32,7 +38,6 @@ "bugs": { "url": "https://github.com/eslint/eslint/issues/" }, - "bundleDependencies": false, "dependencies": { "@eslint/eslintrc": "^1.0.5", "@humanwhocodes/config-array": "^0.9.2", @@ -41,11 +46,10 @@ "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.1.0", + "eslint-visitor-keys": "^3.2.0", "espree": "^9.3.0", "esquery": "^1.4.0", "esutils": "^2.0.2", @@ -54,7 +58,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -65,15 +69,12 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, - "deprecated": false, "description": "An AST-based pattern checker for JavaScript.", "devDependencies": { "@babel/core": "^7.4.3", @@ -114,10 +115,12 @@ "node-polyfill-webpack-plugin": "^1.0.3", "npm-license": "^0.3.3", "nyc": "^15.0.1", + "progress": "^2.0.3", "proxyquire": "^2.0.1", "puppeteer": "^9.1.1", "recast": "^0.20.4", "regenerator-runtime": "^0.13.2", + "semver": "^7.3.5", "shelljs": "^0.8.2", "sinon": "^11.0.0", "temp": "^0.9.0", @@ -179,5 +182,5 @@ "test:cli": "mocha", "webpack": "node Makefile.js webpack" }, - "version": "8.6.0" + "version": "8.8.0" } diff --git a/node_modules/flatted/README.md b/node_modules/flatted/README.md index 78763277c..2e466b63c 100644 --- a/node_modules/flatted/README.md +++ b/node_modules/flatted/README.md @@ -8,13 +8,13 @@ ## Announcement 📣 -There is a standard approach to recursion and more data-types than what JSON allow, and it's part of this [Structured Clone Module](https://github.com/ungap/structured-clone/#readme). +There is a standard approach to recursion and more data-types than what JSON allows, and it's part of the [Structured Clone polyfill](https://github.com/ungap/structured-clone/#readme). -Beside acting as a polyfill, its `@ungap/structured-clone/json` export provides both `stringify` and `parse`, and it's been tested for being faster than *flatted*, but its produced output is also smaller than *flatted*. +Beside acting as a polyfill, its `@ungap/structured-clone/json` export provides both `stringify` and `parse`, and it's been tested for being faster than *flatted*, but its produced output is also smaller than *flatted* in general. The *@ungap/structured-clone* module is, in short, a drop in replacement for *flatted*, but it's not compatible with *flatted* specialized syntax. -However, if recursion, as well as more data-types, are what you are after, or interesting for your projects, consider switching to this new module whenever you can 👍 +However, if recursion, as well as more data-types, are what you are after, or interesting for your projects/use cases, consider switching to this new module whenever you can 👍 - - - @@ -42,7 +42,7 @@ a.push(a); stringify(a); // [["1","0"],{"a":"0"}] ``` -## toJSON and from JSON +## toJSON and fromJSON If you'd like to implicitly survive JSON serialization, these two helpers helps: diff --git a/node_modules/flatted/package.json b/node_modules/flatted/package.json index a5f479231..a06716773 100644 --- a/node_modules/flatted/package.json +++ b/node_modules/flatted/package.json @@ -1,35 +1,39 @@ { - "_from": "flatted@^3.1.0", - "_id": "flatted@3.2.4", + "_args": [ + [ + "flatted@3.2.5", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_development": true, + "_from": "flatted@3.2.5", + "_id": "flatted@3.2.5", "_inBundle": false, - "_integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "_integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "_location": "/flatted", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "flatted@^3.1.0", + "raw": "flatted@3.2.5", "name": "flatted", "escapedName": "flatted", - "rawSpec": "^3.1.0", + "rawSpec": "3.2.5", "saveSpec": null, - "fetchSpec": "^3.1.0" + "fetchSpec": "3.2.5" }, "_requiredBy": [ "/flat-cache" ], - "_resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", - "_shasum": "28d9969ea90661b5134259f312ab6aa7929ac5e2", - "_spec": "flatted@^3.1.0", - "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue/node_modules/flat-cache", + "_resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "_spec": "3.2.5", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", "author": { "name": "Andrea Giammarchi" }, "bugs": { "url": "https://github.com/WebReflection/flatted/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "A super light and fast circular JSON parser.", "devDependencies": { "@babel/core": "^7.16.0", @@ -48,8 +52,11 @@ "terser": "^5.9.0" }, "exports": { - "import": "./esm/index.js", - "default": "./cjs/index.js" + ".": { + "import": "./esm/index.js", + "default": "./cjs/index.js" + }, + "./package.json": "./package.json" }, "homepage": "https://github.com/WebReflection/flatted#readme", "keywords": [ @@ -81,5 +88,5 @@ "type": "module", "types": "types.d.ts", "unpkg": "min.js", - "version": "3.2.4" + "version": "3.2.5" } diff --git a/node_modules/ignore/LICENSE-MIT b/node_modules/ignore/LICENSE-MIT old mode 100755 new mode 100644 diff --git a/node_modules/ignore/README.md b/node_modules/ignore/README.md old mode 100755 new mode 100644 index c4d8230cc..584508ce4 --- a/node_modules/ignore/README.md +++ b/node_modules/ignore/README.md @@ -35,11 +35,19 @@ # ignore -`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the .gitignore [spec](http://git-scm.com/docs/gitignore). +`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the [.gitignore spec 2.22.1](http://git-scm.com/docs/gitignore). -Pay attention that [`minimatch`](https://www.npmjs.org/package/minimatch) does not work in the gitignore way. To filter filenames according to .gitignore file, I recommend this module. +`ignore` is used by eslint, gitbook and [many others](https://www.npmjs.com/browse/depended/ignore). -##### Tested on +Pay **ATTENTION** that [`minimatch`](https://www.npmjs.org/package/minimatch) (which used by `fstream-ignore`) does not follow the gitignore spec. + +To filter filenames according to a .gitignore file, I recommend this npm package, `ignore`. + +To parse an `.npmignore` file, you should use `minimatch`, because an `.npmignore` file is parsed by npm using `minimatch` and it does not work in the .gitignore way. + +### Tested on + +`ignore` is fully tested, and has more than **five hundreds** of unit tests. - Linux + Node: `0.8` - `7.x` - Windows + Node: `0.10` - `7.x`, node < `0.10` is not tested due to the lack of support of appveyor. @@ -52,10 +60,15 @@ Since `4.0.0`, ignore will no longer support `node < 6` by default, to use in no - [Usage](#usage) - [`Pathname` Conventions](#pathname-conventions) -- [Guide for 2.x -> 3.x](#upgrade-2x---3x) -- [Guide for 3.x -> 4.x](#upgrade-3x---4x) - See Also: - [`glob-gitignore`](https://www.npmjs.com/package/glob-gitignore) matches files using patterns and filters them according to gitignore rules. +- [Upgrade Guide](#upgrade-guide) + +## Install + +```sh +npm i ignore +``` ## Usage @@ -152,7 +165,7 @@ if (fs.existsSync(filename)) { instead. -## .filter(paths: Array): Array +## .filter(paths: Array<Pathname>): Array<Pathname> ```ts type Pathname = string @@ -166,13 +179,13 @@ Filters the given array of pathnames, and returns the filtered array. #### 1. `Pathname` should be a `path.relative()`d pathname -`Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory. +`Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory, ```js -// WRONG +// WRONG, an error will be thrown ig.ignores('./abc') -// WRONG, for it will never happen. +// WRONG, for it will never happen, and an error will be thrown // If the gitignore rule locates at the root directory, // `'/abc'` should be changed to `'abc'`. // ``` @@ -180,6 +193,9 @@ ig.ignores('./abc') // ``` ig.ignores('/abc') +// WRONG, that it is an absolute path on Windows, an error will be thrown +ig.ignores('C:\\abc') + // Right ig.ignores('abc') @@ -212,6 +228,26 @@ Then the `paths` might be like this: ] ``` +#### 2. filenames and dirnames + +`node-ignore` does NO `fs.stat` during path matching, so for the example below: + +```js +// First, we add a ignore pattern to ignore a directory +ig.add('config/') + +// `ig` does NOT know if 'config', in the real world, +// is a normal file, directory or something. + +ig.ignores('config') +// `ig` treats `config` as a file, so it returns `false` + +ig.ignores('config/') +// returns `true` +``` + +Specially for people who develop some library based on `node-ignore`, it is important to understand that. + Usually, you could use [`glob`](http://npmjs.org/package/glob) with `option.mark = true` to fetch the structure of the current directory: ```js @@ -230,21 +266,6 @@ glob('**', { }) ``` -#### 2. filenames and dirnames - -`node-ignore` does NO `fs.stat` during path matching, so for the example below: - -```js -ig.add('config/') - -// `ig` does NOT know if 'config' is a normal file, directory or something -ig.ignores('config') // And it returns `false` - -ig.ignores('config/') // returns `true` -``` - -Specially for people who develop some library based on `node-ignore`, it is important to understand that. - ## .ignores(pathname: Pathname): boolean > new in 3.2.0 @@ -261,9 +282,37 @@ Creates a filter function which could filter an array of paths with `Array.proto Returns `function(path)` the filter function. -## `options.ignorecase` since 4.0.0 +## .test(pathname: Pathname) since 5.0.0 + +Returns `TestResult` + +```ts +interface TestResult { + ignored: boolean + // true if the `pathname` is finally unignored by some negative pattern + unignored: boolean +} +``` + +- `{ignored: true, unignored: false}`: the `pathname` is ignored +- `{ignored: false, unignored: true}`: the `pathname` is unignored +- `{ignored: false, unignored: false}`: the `pathname` is never matched by any ignore rules. + +## static `ignore.isPathValid(pathname): boolean` since 5.0.0 + +Check whether the `pathname` is an valid `path.relative()`d path according to the [convention](#1-pathname-should-be-a-pathrelatived-pathname). -Similar as the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (default value), otherwise case sensitive. +This method is **NOT** used to check if an ignore pattern is valid. + +```js +ignore.isPathValid('./foo') // false +``` + +## ignore(options) + +### `options.ignorecase` since 4.0.0 + +Similar as the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (the default value), otherwise case sensitive. ```js const ig = ignore({ @@ -275,15 +324,65 @@ ig.add('*.png') ig.ignores('*.PNG') // false ``` +### `options.ignoreCase?: boolean` since 5.2.0 + +Which is alternative to `options.ignoreCase` + +### `options.allowRelativePaths?: boolean` since 5.2.0 + +This option brings backward compatibility with projects which based on `ignore@4.x`. If `options.allowRelativePaths` is `true`, `ignore` will not check whether the given path to be tested is [`path.relative()`d](#pathname-conventions). + +However, passing a relative path, such as `'./foo'` or `'../foo'`, to test if it is ignored or not is not a good practise, which might lead to unexpected behavior + +```js +ignore({ + allowRelativePaths: true +}).ignores('../foo/bar.js') // And it will not throw +``` + **** # Upgrade Guide -## Upgrade 2.x -> 3.x +## Upgrade 4.x -> 5.x -- All `options` of 2.x are unnecessary and removed, so just remove them. -- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed. -- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details. +Since `5.0.0`, if an invalid `Pathname` passed into `ig.ignores()`, an error will be thrown, unless `options.allowRelative = true` is passed to the `Ignore` factory. + +While `ignore < 5.0.0` did not make sure what the return value was, as well as + +```ts +.ignores(pathname: Pathname): boolean + +.filter(pathnames: Array): Array + +.createFilter(): (pathname: Pathname) => boolean + +.test(pathname: Pathname): {ignored: boolean, unignored: boolean} +``` + +See the convention [here](#1-pathname-should-be-a-pathrelatived-pathname) for details. + +If there are invalid pathnames, the conversion and filtration should be done by users. + +```js +import {isPathValid} from 'ignore' // introduced in 5.0.0 + +const paths = [ + // invalid + ////////////////// + '', + false, + '../foo', + '.', + ////////////////// + + // valid + 'foo' +] +.filter(isValidPath) + +ig.filter(paths) +``` ## Upgrade 3.x -> 4.x @@ -293,6 +392,12 @@ Since `4.0.0`, `ignore` will no longer support node < 6, to use `ignore` in node var ignore = require('ignore/legacy') ``` +## Upgrade 2.x -> 3.x + +- All `options` of 2.x are unnecessary and removed, so just remove them. +- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed. +- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details. + **** # Collaborators diff --git a/node_modules/ignore/index.d.ts b/node_modules/ignore/index.d.ts index be9d5f8ea..520eafa77 100644 --- a/node_modules/ignore/index.d.ts +++ b/node_modules/ignore/index.d.ts @@ -1,16 +1,17 @@ -interface Ignore { - /** - * Adds a rule rules to the current manager. - * @param {string | Ignore} pattern - * @returns IgnoreBase - */ - add(pattern: string | Ignore): Ignore +type Pathname = string + +interface TestResult { + ignored: boolean + unignored: boolean +} + +export interface Ignore { /** - * Adds several rules to the current manager. + * Adds one or several rules to the current manager. * @param {string[]} patterns * @returns IgnoreBase */ - add(patterns: (string | Ignore)[]): Ignore + add(patterns: string | Ignore | readonly (string | Ignore)[]): this /** * Filters the given array of pathnames, and returns the filtered array. @@ -18,23 +19,34 @@ interface Ignore { * @param paths the array of paths to be filtered. * @returns The filtered array of paths */ - filter(paths: string[]): string[] + filter(pathnames: readonly Pathname[]): Pathname[] + /** * Creates a filter function which could filter * an array of paths with Array.prototype.filter. */ - createFilter(): (path: string) => boolean + createFilter(): (pathname: Pathname) => boolean /** * Returns Boolean whether pathname should be ignored. * @param {string} pathname a path to check * @returns boolean */ - ignores(pathname: string): boolean + ignores(pathname: Pathname): boolean + + /** + * Returns whether pathname should be ignored or unignored + * @param {string} pathname a path to check + * @returns TestResult + */ + test(pathname: Pathname): TestResult } interface Options { ignorecase?: boolean + // For compatibility + ignoreCase?: boolean + allowRelativePaths?: boolean } /** @@ -42,4 +54,8 @@ interface Options { */ declare function ignore(options?: Options): Ignore +declare namespace ignore { + export function isPathValid (pathname: string): boolean +} + export default ignore diff --git a/node_modules/ignore/index.js b/node_modules/ignore/index.js old mode 100755 new mode 100644 index 62c5cf71e..d935eb159 --- a/node_modules/ignore/index.js +++ b/node_modules/ignore/index.js @@ -1,13 +1,24 @@ // A simple implementation of make-array -function make_array (subject) { +function makeArray (subject) { return Array.isArray(subject) ? subject : [subject] } -const REGEX_BLANK_LINE = /^\s+$/ -const REGEX_LEADING_EXCAPED_EXCLAMATION = /^\\!/ -const REGEX_LEADING_EXCAPED_HASH = /^\\#/ +const EMPTY = '' +const SPACE = ' ' +const ESCAPE = '\\' +const REGEX_TEST_BLANK_LINE = /^\s+$/ +const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/ +const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/ +const REGEX_SPLITALL_CRLF = /\r?\n/g +// /foo, +// ./foo, +// ../foo, +// . +// .. +const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/ + const SLASH = '/' const KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('node-ignore') @@ -19,6 +30,8 @@ const define = (object, key, value) => const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g +const RETURN_FALSE = () => false + // Sanitize the range of a regular expression // The cases are complicated, see test cases for details const sanitizeRange = range => range.replace( @@ -27,9 +40,15 @@ const sanitizeRange = range => range.replace( ? match // Invalid range (out of order) which is ok for gitignore rules but // fatal for JavaScript regular expression, so eliminate it. - : '' + : EMPTY ) +// See fixtures #59 +const cleanRangeBackSlash = slashes => { + const {length} = slashes + return slashes.slice(0, length - length % 2) +} + // > If the pattern ends with a slash, // > it is removed for the purpose of the following description, // > but it would only find a match with a directory. @@ -41,7 +60,7 @@ const sanitizeRange = range => range.replace( // you could use option `mark: true` with `glob` // '`foo/`' should not continue with the '`..`' -const DEFAULT_REPLACER_PREFIX = [ +const REPLACERS = [ // > Trailing spaces are ignored unless they are quoted with backslash ("\") [ @@ -50,14 +69,14 @@ const DEFAULT_REPLACER_PREFIX = [ // (a \ ) -> (a ) /\\?\s+$/, match => match.indexOf('\\') === 0 - ? ' ' - : '' + ? SPACE + : EMPTY ], // replace (\ ) with ' ' [ /\\\s/g, - () => ' ' + () => SPACE ], // Escape metacharacters @@ -78,19 +97,10 @@ const DEFAULT_REPLACER_PREFIX = [ // > - the opening curly brace {, // > These special characters are often called "metacharacters". [ - /[\\^$.|*+(){]/g, + /[\\$.|*+(){^]/g, match => `\\${match}` ], - [ - // > [abc] matches any character inside the brackets - // > (in this case a, b, or c); - /\[([^\]/]*)($|\])/g, - (match, p1, p2) => p2 === ']' - ? `[${sanitizeRange(p1)}]` - : `\\${match}` - ], - [ // > a question mark (?) matches a single character /(?!\\)\?/g, @@ -124,10 +134,8 @@ const DEFAULT_REPLACER_PREFIX = [ // '**/foo' <-> 'foo' () => '^(?:.*\\/)?' - ] -] + ], -const DEFAULT_REPLACER_SUFFIX = [ // starting [ // there will be no leading '/' @@ -135,11 +143,20 @@ const DEFAULT_REPLACER_SUFFIX = [ // If starts with '**', adding a '^' to the regular expression also works /^(?=[^^])/, function startingReplacer () { + // If has a slash `/` at the beginning or middle return !/\/(?!$)/.test(this) + // > Prior to 2.22.1 // > If the pattern does not contain a slash /, // > Git treats it as a shell glob pattern // Actually, if there is only a trailing slash, // git also treats it as a shell glob pattern + + // After 2.22.1 (compatible but clearer) + // > If there is a separator at the beginning or middle (or both) + // > of the pattern, then the pattern is relative to the directory + // > level of the particular .gitignore file itself. + // > Otherwise the pattern may also match at any level below + // > the .gitignore level. ? '(?:^|\\/)' // > Otherwise, Git treats the pattern as a shell glob suitable for @@ -157,7 +174,7 @@ const DEFAULT_REPLACER_SUFFIX = [ // should not use '*', or it will be replaced by the next replacer // Check if it is not the last `'/**'` - (match, index, str) => index + 6 < str.length + (_, index, str) => index + 6 < str.length // case: /**/ // > A slash followed by two consecutive asterisks then a slash matches @@ -184,119 +201,138 @@ const DEFAULT_REPLACER_SUFFIX = [ // '*.js' matches '.js' // '*.js' doesn't match 'abc' - (match, p1) => `${p1}[^\\/]*` + (_, p1) => `${p1}[^\\/]*` ], - // trailing wildcard [ - /(\^|\\\/)?\\\*$/, - (match, p1) => { - const prefix = p1 - // '\^': - // '/*' does not match '' - // '/*' does not match everything - - // '\\\/': - // 'abc/*' does not match 'abc/' - ? `${p1}[^/]+` - - // 'a*' matches 'a' - // 'a*' matches 'aa' - : '[^/]*' - - return `${prefix}(?=$|\\/$)` - } + // unescape, revert step 3 except for back slash + // For example, if a user escape a '\\*', + // after step 3, the result will be '\\\\\\*' + /\\\\\\(?=[$.|*+(){^])/g, + () => ESCAPE ], [ - // unescape - /\\\\\\/g, - () => '\\' - ] -] + // '\\\\' -> '\\' + /\\\\/g, + () => ESCAPE + ], -const POSITIVE_REPLACERS = [ - ...DEFAULT_REPLACER_PREFIX, - - // 'f' - // matches - // - /f(end) - // - /f/ - // - (start)f(end) - // - (start)f/ - // doesn't match - // - oof - // - foo - // pseudo: - // -> (^|/)f(/|$) + [ + // > The range notation, e.g. [a-zA-Z], + // > can be used to match one of the characters in a range. + + // `\` is escaped by step 3 + /(\\)?\[([^\]/]*?)(\\*)($|\])/g, + (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE + // '\\[bar]' -> '\\\\[bar\\]' + ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` + : close === ']' + ? endEscape.length % 2 === 0 + // A normal case, and it is a range notation + // '[bar]' + // '[bar\\\\]' + ? `[${sanitizeRange(range)}${endEscape}]` + // Invalid range notaton + // '[bar\\]' -> '[bar\\\\]' + : '[]' + : '[]' + ], // ending [ // 'js' will not match 'js.' // 'ab' will not match 'abc' - /(?:[^*/])$/, + /(?:[^*])$/, + + // WTF! + // https://git-scm.com/docs/gitignore + // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) + // which re-fixes #24, #38 + + // > If there is a separator at the end of the pattern then the pattern + // > will only match directories, otherwise the pattern can match both + // > files and directories. // 'js*' will not match 'a.js' // 'js/' will not match 'a.js' // 'js' will match 'a.js' and 'a.js/' - match => `${match}(?=$|\\/)` + match => /\/$/.test(match) + // foo/ will not match 'foo' + ? `${match}$` + // foo matches 'foo' and 'foo/' + : `${match}(?=$|\\/$)` ], - ...DEFAULT_REPLACER_SUFFIX -] + // trailing wildcard + [ + /(\^|\\\/)?\\\*$/, + (_, p1) => { + const prefix = p1 + // '\^': + // '/*' does not match EMPTY + // '/*' does not match everything -const NEGATIVE_REPLACERS = [ - ...DEFAULT_REPLACER_PREFIX, + // '\\\/': + // 'abc/*' does not match 'abc/' + ? `${p1}[^/]+` - // #24, #38 - // The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore) - // A negative pattern without a trailing wildcard should not - // re-include the things inside that directory. + // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*' - // eg: - // ['node_modules/*', '!node_modules'] - // should ignore `node_modules/a.js` - [ - /(?:[^*])$/, - match => `${match}(?=$|\\/$)` + return `${prefix}(?=$|\\/$)` + } ], - - ...DEFAULT_REPLACER_SUFFIX ] // A simple cache, because an ignore rule only has only one certain meaning -const cache = Object.create(null) +const regexCache = Object.create(null) // @param {pattern} -const make_regex = (pattern, negative, ignorecase) => { - const r = cache[pattern] - if (r) { - return r +const makeRegex = (pattern, ignoreCase) => { + let source = regexCache[pattern] + + if (!source) { + source = REPLACERS.reduce( + (prev, current) => prev.replace(current[0], current[1].bind(pattern)), + pattern + ) + regexCache[pattern] = source } - const replacers = negative - ? NEGATIVE_REPLACERS - : POSITIVE_REPLACERS - - const source = replacers.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ) - - return cache[pattern] = ignorecase + return ignoreCase ? new RegExp(source, 'i') : new RegExp(source) } +const isString = subject => typeof subject === 'string' + // > A blank line matches no files, so it can serve as a separator for readability. const checkPattern = pattern => pattern - && typeof pattern === 'string' - && !REGEX_BLANK_LINE.test(pattern) + && isString(pattern) + && !REGEX_TEST_BLANK_LINE.test(pattern) // > A line starting with # serves as a comment. && pattern.indexOf('#') !== 0 -const createRule = (pattern, ignorecase) => { +const splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF) + +class IgnoreRule { + constructor ( + origin, + pattern, + negative, + regex + ) { + this.origin = origin + this.pattern = pattern + this.negative = negative + this.regex = regex + } +} + +const createRule = (pattern, ignoreCase) => { const origin = pattern let negative = false @@ -309,44 +345,98 @@ const createRule = (pattern, ignorecase) => { pattern = pattern // > Put a backslash ("\") in front of the first "!" for patterns that // > begin with a literal "!", for example, `"\!important!.txt"`. - .replace(REGEX_LEADING_EXCAPED_EXCLAMATION, '!') + .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') // > Put a backslash ("\") in front of the first hash for patterns that // > begin with a hash. - .replace(REGEX_LEADING_EXCAPED_HASH, '#') + .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#') - const regex = make_regex(pattern, negative, ignorecase) + const regex = makeRegex(pattern, ignoreCase) - return { + return new IgnoreRule( origin, pattern, negative, regex + ) +} + +const throwError = (message, Ctor) => { + throw new Ctor(message) +} + +const checkPath = (path, originalPath, doThrow) => { + if (!isString(path)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ) + } + + // We don't know if we should ignore EMPTY, so throw + if (!path) { + return doThrow(`path must not be empty`, TypeError) + } + + // Check if it is a relative path + if (checkPath.isNotRelative(path)) { + const r = '`path.relative()`d' + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ) } + + return true } -class IgnoreBase { +const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path) + +checkPath.isNotRelative = isNotRelative +checkPath.convert = p => p + +class Ignore { constructor ({ - ignorecase = true + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false } = {}) { - this._rules = [] - this._ignorecase = ignorecase define(this, KEY_IGNORE, true) + + this._rules = [] + this._ignoreCase = ignoreCase + this._allowRelativePaths = allowRelativePaths this._initCache() } _initCache () { - this._cache = Object.create(null) + this._ignoreCache = Object.create(null) + this._testCache = Object.create(null) } - // @param {Array.|string|Ignore} pattern - add (pattern) { - this._added = false + _addPattern (pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules) + this._added = true + return + } - if (typeof pattern === 'string') { - pattern = pattern.split(/\r?\n/g) + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignoreCase) + this._added = true + this._rules.push(rule) } + } + + // @param {Array | string | Ignore} pattern + add (pattern) { + this._added = false - make_array(pattern).forEach(this._addPattern, this) + makeArray( + isString(pattern) + ? splitPattern(pattern) + : pattern + ).forEach(this._addPattern, this) // Some rules have just added to the ignore, // making the behavior changed. @@ -362,41 +452,69 @@ class IgnoreBase { return this.add(pattern) } - _addPattern (pattern) { - // #32 - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules) - this._added = true - return - } + // | ignored : unignored + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignorecase) - this._added = true - this._rules.push(rule) - } - } + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen - filter (paths) { - return make_array(paths).filter(path => this._filter(path)) - } + // @param {boolean} whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. - createFilter () { - return path => this._filter(path) - } + // @returns {TestResult} true if a file is ignored + _testOne (path, checkUnignored) { + let ignored = false + let unignored = false - ignores (path) { - return !this._filter(path) - } + this._rules.forEach(rule => { + const {negative} = rule + if ( + unignored === negative && ignored !== unignored + || negative && !ignored && !unignored && !checkUnignored + ) { + return + } + + const matched = rule.regex.test(path) + + if (matched) { + ignored = !negative + unignored = negative + } + }) - // @returns `Boolean` true if the `path` is NOT ignored - _filter (path, slices) { - if (!path) { - return false + return { + ignored, + unignored } + } + + // @returns {TestResult} + _test (originalPath, cache, checkUnignored, slices) { + const path = originalPath + // Supports nullable path + && checkPath.convert(originalPath) + + checkPath( + path, + originalPath, + this._allowRelativePaths + ? RETURN_FALSE + : throwError + ) + + return this._t(path, cache, checkUnignored, slices) + } - if (path in this._cache) { - return this._cache[path] + _t (path, cache, checkUnignored, slices) { + if (path in cache) { + return cache[path] } if (!slices) { @@ -407,34 +525,56 @@ class IgnoreBase { slices.pop() - return this._cache[path] = slices.length + // If the path has no parent directory, just test it + if (!slices.length) { + return cache[path] = this._testOne(path, checkUnignored) + } + + const parent = this._t( + slices.join(SLASH) + SLASH, + cache, + checkUnignored, + slices + ) + + // If the path contains a parent directory, check the parent first + return cache[path] = parent.ignored // > It is not possible to re-include a file if a parent directory of // > that file is excluded. - // If the path contains a parent directory, check the parent first - ? this._filter(slices.join(SLASH) + SLASH, slices) - && this._test(path) + ? parent + : this._testOne(path, checkUnignored) + } - // Or only test the path - : this._test(path) + ignores (path) { + return this._test(path, this._ignoreCache, false).ignored } - // @returns {Boolean} true if a file is NOT ignored - _test (path) { - // Explicitly define variable type by setting matched to `0` - let matched = 0 + createFilter () { + return path => !this.ignores(path) + } - this._rules.forEach(rule => { - // if matched = true, then we only test negative rules - // if matched = false, then we test non-negative rules - if (!(matched ^ rule.negative)) { - matched = rule.negative ^ rule.regex.test(path) - } - }) + filter (paths) { + return makeArray(paths).filter(this.createFilter()) + } - return !matched + // @returns {TestResult} + test (path) { + return this._test(path, this._testCache, true) } } +const factory = options => new Ignore(options) + +const isPathValid = path => + checkPath(path && checkPath.convert(path), path, RETURN_FALSE) + +factory.isPathValid = isPathValid + +// Fixes typescript +factory.default = factory + +module.exports = factory + // Windows // -------------------------------------------------------------- /* istanbul ignore if */ @@ -446,18 +586,18 @@ if ( || process.platform === 'win32' ) ) { - const filter = IgnoreBase.prototype._filter - /* eslint no-control-regex: "off" */ - const make_posix = str => /^\\\\\?\\/.test(str) - || /[^\x00-\x80]+/.test(str) + const makePosix = str => /^\\\\\?\\/.test(str) + || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, '/') - IgnoreBase.prototype._filter = function filterWin32 (path, slices) { - path = make_posix(path) - return filter.call(this, path, slices) - } -} + checkPath.convert = makePosix -module.exports = options => new IgnoreBase(options) + // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' + // 'd:\\foo' + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i + checkPath.isNotRelative = path => + REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) + || isNotRelative(path) +} diff --git a/node_modules/ignore/legacy.js b/node_modules/ignore/legacy.js index 14f377d77..b579d6f4e 100644 --- a/node_modules/ignore/legacy.js +++ b/node_modules/ignore/legacy.js @@ -1,40 +1,61 @@ -'use strict'; +"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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } // A simple implementation of make-array -function make_array(subject) { +function makeArray(subject) { return Array.isArray(subject) ? subject : [subject]; } -var REGEX_BLANK_LINE = /^\s+$/; -var REGEX_LEADING_EXCAPED_EXCLAMATION = /^\\!/; -var REGEX_LEADING_EXCAPED_HASH = /^\\#/; +var EMPTY = ''; +var SPACE = ' '; +var ESCAPE = '\\'; +var REGEX_TEST_BLANK_LINE = /^\s+$/; +var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; +var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; +var REGEX_SPLITALL_CRLF = /\r?\n/g; // /foo, +// ./foo, +// ../foo, +// . +// .. + +var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; var SLASH = '/'; -var KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('node-ignore') +var KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol["for"]('node-ignore') /* istanbul ignore next */ : 'node-ignore'; var define = function define(object, key, value) { - return Object.defineProperty(object, key, { value }); + return Object.defineProperty(object, key, { + value: value + }); }; var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; -// Sanitize the range of a regular expression +var RETURN_FALSE = function RETURN_FALSE() { + return false; +}; // Sanitize the range of a regular expression // The cases are complicated, see test cases for details + + var sanitizeRange = function sanitizeRange(range) { return range.replace(REGEX_REGEXP_RANGE, function (match, from, to) { - return from.charCodeAt(0) <= to.charCodeAt(0) ? match - // Invalid range (out of order) which is ok for gitignore rules but + return from.charCodeAt(0) <= to.charCodeAt(0) ? match // Invalid range (out of order) which is ok for gitignore rules but // fatal for JavaScript regular expression, so eliminate it. - : ''; + : EMPTY; }); -}; +}; // See fixtures #59 -// > If the pattern ends with a slash, + +var cleanRangeBackSlash = function cleanRangeBackSlash(slashes) { + var length = slashes.length; + return slashes.slice(0, length - length % 2); +}; // > If the pattern ends with a slash, // > it is removed for the purpose of the following description, // > but it would only find a match with a directory. // > In other words, foo/ will match a directory foo and paths underneath it, @@ -43,27 +64,20 @@ var sanitizeRange = function sanitizeRange(range) { // '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' // -> ignore-rules will not deal with it, because it costs extra `fs.stat` call // you could use option `mark: true` with `glob` - // '`foo/`' should not continue with the '`..`' -var DEFAULT_REPLACER_PREFIX = [ -// > Trailing spaces are ignored unless they are quoted with backslash ("\") -[ -// (a\ ) -> (a ) + +var REPLACERS = [// > Trailing spaces are ignored unless they are quoted with backslash ("\") +[// (a\ ) -> (a ) // (a ) -> (a) // (a \ ) -> (a ) /\\?\s+$/, function (match) { - return match.indexOf('\\') === 0 ? ' ' : ''; -}], - -// replace (\ ) with ' ' + return match.indexOf('\\') === 0 ? SPACE : EMPTY; +}], // replace (\ ) with ' ' [/\\\s/g, function () { - return ' '; -}], - -// Escape metacharacters + return SPACE; +}], // Escape metacharacters // which is written down by users but means special for regular expressions. - // > There are 12 characters with special meanings: // > - the backslash \, // > - the caret ^, @@ -78,324 +92,327 @@ var DEFAULT_REPLACER_PREFIX = [ // > - and the opening square bracket [, // > - the opening curly brace {, // > These special characters are often called "metacharacters". -[/[\\^$.|*+(){]/g, function (match) { - return `\\${match}`; -}], [ -// > [abc] matches any character inside the brackets -// > (in this case a, b, or c); -/\[([^\]/]*)($|\])/g, function (match, p1, p2) { - return p2 === ']' ? `[${sanitizeRange(p1)}]` : `\\${match}`; -}], [ -// > a question mark (?) matches a single character +[/[\\$.|*+(){^]/g, function (match) { + return "\\".concat(match); +}], [// > a question mark (?) matches a single character /(?!\\)\?/g, function () { return '[^/]'; -}], - -// leading slash -[ - -// > A leading slash matches the beginning of the pathname. +}], // leading slash +[// > A leading slash matches the beginning of the pathname. // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". // A leading slash matches the beginning of the pathname /^\//, function () { return '^'; -}], - -// replace special metacharacter slash after the leading slash +}], // replace special metacharacter slash after the leading slash [/\//g, function () { return '\\/'; -}], [ -// > A leading "**" followed by a slash means match in all directories. +}], [// > A leading "**" followed by a slash means match in all directories. // > For example, "**/foo" matches file or directory "foo" anywhere, // > the same as pattern "foo". // > "**/foo/bar" matches file or directory "bar" anywhere that is directly // > under directory "foo". // Notice that the '*'s have been replaced as '\\*' -/^\^*\\\*\\\*\\\//, - -// '**/foo' <-> 'foo' +/^\^*\\\*\\\*\\\//, // '**/foo' <-> 'foo' function () { return '^(?:.*\\/)?'; -}]]; - -var DEFAULT_REPLACER_SUFFIX = [ -// starting -[ -// there will be no leading '/' +}], // starting +[// there will be no leading '/' // (which has been replaced by section "leading slash") // If starts with '**', adding a '^' to the regular expression also works /^(?=[^^])/, function startingReplacer() { - return !/\/(?!$)/.test(this) + // If has a slash `/` at the beginning or middle + return !/\/(?!$)/.test(this) // > Prior to 2.22.1 // > If the pattern does not contain a slash /, // > Git treats it as a shell glob pattern // Actually, if there is only a trailing slash, // git also treats it as a shell glob pattern - ? '(?:^|\\/)' - - // > Otherwise, Git treats the pattern as a shell glob suitable for + // After 2.22.1 (compatible but clearer) + // > If there is a separator at the beginning or middle (or both) + // > of the pattern, then the pattern is relative to the directory + // > level of the particular .gitignore file itself. + // > Otherwise the pattern may also match at any level below + // > the .gitignore level. + ? '(?:^|\\/)' // > Otherwise, Git treats the pattern as a shell glob suitable for // > consumption by fnmatch(3) : '^'; -}], - -// two globstars -[ -// Use lookahead assertions so that we could match more than one `'/**'` -/\\\/\\\*\\\*(?=\\\/|$)/g, - -// Zero, one or several directories +}], // two globstars +[// Use lookahead assertions so that we could match more than one `'/**'` +/\\\/\\\*\\\*(?=\\\/|$)/g, // Zero, one or several directories // should not use '*', or it will be replaced by the next replacer - // Check if it is not the last `'/**'` -function (match, index, str) { - return index + 6 < str.length - - // case: /**/ +function (_, index, str) { + return index + 6 < str.length // case: /**/ // > A slash followed by two consecutive asterisks then a slash matches // > zero or more directories. // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. // '/**/' - ? '(?:\\/[^\\/]+)*' - - // case: /** + ? '(?:\\/[^\\/]+)*' // case: /** // > A trailing `"/**"` matches everything inside. - // #21: everything inside but it should not include the current folder : '\\/.+'; -}], - -// intermediate wildcards -[ -// Never replace escaped '*' +}], // intermediate wildcards +[// Never replace escaped '*' // ignore rule '\*' will match the path '*' - // 'abc.*/' -> go // 'abc.*' -> skip this rule -/(^|[^\\]+)\\\*(?=.+)/g, - -// '*.js' matches '.js' +/(^|[^\\]+)\\\*(?=.+)/g, // '*.js' matches '.js' // '*.js' doesn't match 'abc' -function (match, p1) { - return `${p1}[^\\/]*`; -}], - -// trailing wildcard -[/(\^|\\\/)?\\\*$/, function (match, p1) { - var prefix = p1 - // '\^': - // '/*' does not match '' +function (_, p1) { + return "".concat(p1, "[^\\/]*"); +}], [// unescape, revert step 3 except for back slash +// For example, if a user escape a '\\*', +// after step 3, the result will be '\\\\\\*' +/\\\\\\(?=[$.|*+(){^])/g, function () { + return ESCAPE; +}], [// '\\\\' -> '\\' +/\\\\/g, function () { + return ESCAPE; +}], [// > The range notation, e.g. [a-zA-Z], +// > can be used to match one of the characters in a range. +// `\` is escaped by step 3 +/(\\)?\[([^\]/]*?)(\\*)($|\])/g, function (match, leadEscape, range, endEscape, close) { + return leadEscape === ESCAPE // '\\[bar]' -> '\\\\[bar\\]' + ? "\\[".concat(range).concat(cleanRangeBackSlash(endEscape)).concat(close) : close === ']' ? endEscape.length % 2 === 0 // A normal case, and it is a range notation + // '[bar]' + // '[bar\\\\]' + ? "[".concat(sanitizeRange(range)).concat(endEscape, "]") // Invalid range notaton + // '[bar\\]' -> '[bar\\\\]' + : '[]' : '[]'; +}], // ending +[// 'js' will not match 'js.' +// 'ab' will not match 'abc' +/(?:[^*])$/, // WTF! +// https://git-scm.com/docs/gitignore +// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) +// which re-fixes #24, #38 +// > If there is a separator at the end of the pattern then the pattern +// > will only match directories, otherwise the pattern can match both +// > files and directories. +// 'js*' will not match 'a.js' +// 'js/' will not match 'a.js' +// 'js' will match 'a.js' and 'a.js/' +function (match) { + return /\/$/.test(match) // foo/ will not match 'foo' + ? "".concat(match, "$") // foo matches 'foo' and 'foo/' + : "".concat(match, "(?=$|\\/$)"); +}], // trailing wildcard +[/(\^|\\\/)?\\\*$/, function (_, p1) { + var prefix = p1 // '\^': + // '/*' does not match EMPTY // '/*' does not match everything - // '\\\/': // 'abc/*' does not match 'abc/' - ? `${p1}[^/]+` - - // 'a*' matches 'a' + ? "".concat(p1, "[^/]+") // 'a*' matches 'a' // 'a*' matches 'aa' : '[^/]*'; + return "".concat(prefix, "(?=$|\\/$)"); +}]]; // A simple cache, because an ignore rule only has only one certain meaning - return `${prefix}(?=$|\\/$)`; -}], [ -// unescape -/\\\\\\/g, function () { - return '\\'; -}]]; - -var POSITIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [ - -// 'f' -// matches -// - /f(end) -// - /f/ -// - (start)f(end) -// - (start)f/ -// doesn't match -// - oof -// - foo -// pseudo: -// -> (^|/)f(/|$) - -// ending -[ -// 'js' will not match 'js.' -// 'ab' will not match 'abc' -/(?:[^*/])$/, +var regexCache = Object.create(null); // @param {pattern} -// 'js*' will not match 'a.js' -// 'js/' will not match 'a.js' -// 'js' will match 'a.js' and 'a.js/' -function (match) { - return `${match}(?=$|\\/)`; -}]], DEFAULT_REPLACER_SUFFIX); - -var NEGATIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [ - -// #24, #38 -// The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore) -// A negative pattern without a trailing wildcard should not -// re-include the things inside that directory. - -// eg: -// ['node_modules/*', '!node_modules'] -// should ignore `node_modules/a.js` -[/(?:[^*])$/, function (match) { - return `${match}(?=$|\\/$)`; -}]], DEFAULT_REPLACER_SUFFIX); - -// A simple cache, because an ignore rule only has only one certain meaning -var cache = Object.create(null); - -// @param {pattern} -var make_regex = function make_regex(pattern, negative, ignorecase) { - var r = cache[pattern]; - if (r) { - return r; +var makeRegex = function makeRegex(pattern, ignoreCase) { + var source = regexCache[pattern]; + + if (!source) { + source = REPLACERS.reduce(function (prev, current) { + return prev.replace(current[0], current[1].bind(pattern)); + }, pattern); + regexCache[pattern] = source; } - var replacers = negative ? NEGATIVE_REPLACERS : POSITIVE_REPLACERS; + return ignoreCase ? new RegExp(source, 'i') : new RegExp(source); +}; - var source = replacers.reduce(function (prev, current) { - return prev.replace(current[0], current[1].bind(pattern)); - }, pattern); +var isString = function isString(subject) { + return typeof subject === 'string'; +}; // > A blank line matches no files, so it can serve as a separator for readability. - return cache[pattern] = ignorecase ? new RegExp(source, 'i') : new RegExp(source); -}; -// > A blank line matches no files, so it can serve as a separator for readability. var checkPattern = function checkPattern(pattern) { - return pattern && typeof pattern === 'string' && !REGEX_BLANK_LINE.test(pattern) - - // > A line starting with # serves as a comment. + return pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) // > A line starting with # serves as a comment. && pattern.indexOf('#') !== 0; }; -var createRule = function createRule(pattern, ignorecase) { +var splitPattern = function splitPattern(pattern) { + return pattern.split(REGEX_SPLITALL_CRLF); +}; + +var IgnoreRule = function IgnoreRule(origin, pattern, negative, regex) { + _classCallCheck(this, IgnoreRule); + + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex; +}; + +var createRule = function createRule(pattern, ignoreCase) { var origin = pattern; - var negative = false; + var negative = false; // > An optional prefix "!" which negates the pattern; - // > An optional prefix "!" which negates the pattern; if (pattern.indexOf('!') === 0) { negative = true; pattern = pattern.substr(1); } - pattern = pattern - // > Put a backslash ("\") in front of the first "!" for patterns that + pattern = pattern // > Put a backslash ("\") in front of the first "!" for patterns that // > begin with a literal "!", for example, `"\!important!.txt"`. - .replace(REGEX_LEADING_EXCAPED_EXCLAMATION, '!') - // > Put a backslash ("\") in front of the first hash for patterns that + .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') // > Put a backslash ("\") in front of the first hash for patterns that // > begin with a hash. - .replace(REGEX_LEADING_EXCAPED_HASH, '#'); + .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#'); + var regex = makeRegex(pattern, ignoreCase); + return new IgnoreRule(origin, pattern, negative, regex); +}; - var regex = make_regex(pattern, negative, ignorecase); +var throwError = function throwError(message, Ctor) { + throw new Ctor(message); +}; - return { - origin, - pattern, - negative, - regex - }; +var checkPath = function checkPath(path, originalPath, doThrow) { + if (!isString(path)) { + return doThrow("path must be a string, but got `".concat(originalPath, "`"), TypeError); + } // We don't know if we should ignore EMPTY, so throw + + + if (!path) { + return doThrow("path must not be empty", TypeError); + } // Check if it is a relative path + + + if (checkPath.isNotRelative(path)) { + var r = '`path.relative()`d'; + return doThrow("path should be a ".concat(r, " string, but got \"").concat(originalPath, "\""), RangeError); + } + + return true; }; -var IgnoreBase = function () { - function IgnoreBase() { +var isNotRelative = function isNotRelative(path) { + return REGEX_TEST_INVALID_PATH.test(path); +}; + +checkPath.isNotRelative = isNotRelative; + +checkPath.convert = function (p) { + return p; +}; + +var Ignore = /*#__PURE__*/function () { + function Ignore() { var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, _ref$ignorecase = _ref.ignorecase, - ignorecase = _ref$ignorecase === undefined ? true : _ref$ignorecase; + ignorecase = _ref$ignorecase === void 0 ? true : _ref$ignorecase, + _ref$ignoreCase = _ref.ignoreCase, + ignoreCase = _ref$ignoreCase === void 0 ? ignorecase : _ref$ignoreCase, + _ref$allowRelativePat = _ref.allowRelativePaths, + allowRelativePaths = _ref$allowRelativePat === void 0 ? false : _ref$allowRelativePat; - _classCallCheck(this, IgnoreBase); + _classCallCheck(this, Ignore); - this._rules = []; - this._ignorecase = ignorecase; define(this, KEY_IGNORE, true); + this._rules = []; + this._ignoreCase = ignoreCase; + this._allowRelativePaths = allowRelativePaths; + this._initCache(); } - _createClass(IgnoreBase, [{ - key: '_initCache', + _createClass(Ignore, [{ + key: "_initCache", value: function _initCache() { - this._cache = Object.create(null); + this._ignoreCache = Object.create(null); + this._testCache = Object.create(null); } + }, { + key: "_addPattern", + value: function _addPattern(pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + + if (checkPattern(pattern)) { + var rule = createRule(pattern, this._ignoreCase); + this._added = true; - // @param {Array.|string|Ignore} pattern + this._rules.push(rule); + } + } // @param {Array | string | Ignore} pattern }, { - key: 'add', + key: "add", value: function add(pattern) { this._added = false; - - if (typeof pattern === 'string') { - pattern = pattern.split(/\r?\n/g); - } - - make_array(pattern).forEach(this._addPattern, this); - - // Some rules have just added to the ignore, + makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this); // Some rules have just added to the ignore, // making the behavior changed. + if (this._added) { this._initCache(); } return this; - } - - // legacy + } // legacy }, { - key: 'addPattern', + key: "addPattern", value: function addPattern(pattern) { return this.add(pattern); - } - }, { - key: '_addPattern', - value: function _addPattern(pattern) { - // #32 - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } + } // | ignored : unignored + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen + // @param {boolean} whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // @returns {TestResult} true if a file is ignored - if (checkPattern(pattern)) { - var rule = createRule(pattern, this._ignorecase); - this._added = true; - this._rules.push(rule); - } - } }, { - key: 'filter', - value: function filter(paths) { - var _this = this; + key: "_testOne", + value: function _testOne(path, checkUnignored) { + var ignored = false; + var unignored = false; + + this._rules.forEach(function (rule) { + var negative = rule.negative; - return make_array(paths).filter(function (path) { - return _this._filter(path); + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + + var matched = rule.regex.test(path); + + if (matched) { + ignored = !negative; + unignored = negative; + } }); - } - }, { - key: 'createFilter', - value: function createFilter() { - var _this2 = this; - return function (path) { - return _this2._filter(path); + return { + ignored: ignored, + unignored: unignored }; - } + } // @returns {TestResult} + }, { - key: 'ignores', - value: function ignores(path) { - return !this._filter(path); + key: "_test", + value: function _test(originalPath, cache, checkUnignored, slices) { + var path = originalPath // Supports nullable path + && checkPath.convert(originalPath); + checkPath(path, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError); + return this._t(path, cache, checkUnignored, slices); } - - // @returns `Boolean` true if the `path` is NOT ignored - }, { - key: '_filter', - value: function _filter(path, slices) { - if (!path) { - return false; - } - - if (path in this._cache) { - return this._cache[path]; + key: "_t", + value: function _t(path, cache, checkUnignored, slices) { + if (path in cache) { + return cache[path]; } if (!slices) { @@ -404,63 +421,78 @@ var IgnoreBase = function () { slices = path.split(SLASH); } - slices.pop(); + slices.pop(); // If the path has no parent directory, just test it - return this._cache[path] = slices.length - // > It is not possible to re-include a file if a parent directory of - // > that file is excluded. - // If the path contains a parent directory, check the parent first - ? this._filter(slices.join(SLASH) + SLASH, slices) && this._test(path) + if (!slices.length) { + return cache[path] = this._testOne(path, checkUnignored); + } - // Or only test the path - : this._test(path); - } + var parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices); // If the path contains a parent directory, check the parent first - // @returns {Boolean} true if a file is NOT ignored + return cache[path] = parent.ignored // > It is not possible to re-include a file if a parent directory of + // > that file is excluded. + ? parent : this._testOne(path, checkUnignored); + } }, { - key: '_test', - value: function _test(path) { - // Explicitly define variable type by setting matched to `0` - var matched = 0; + key: "ignores", + value: function ignores(path) { + return this._test(path, this._ignoreCache, false).ignored; + } + }, { + key: "createFilter", + value: function createFilter() { + var _this = this; - this._rules.forEach(function (rule) { - // if matched = true, then we only test negative rules - // if matched = false, then we test non-negative rules - if (!(matched ^ rule.negative)) { - matched = rule.negative ^ rule.regex.test(path); - } - }); + return function (path) { + return !_this.ignores(path); + }; + } + }, { + key: "filter", + value: function filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } // @returns {TestResult} - return !matched; + }, { + key: "test", + value: function test(path) { + return this._test(path, this._testCache, true); } }]); - return IgnoreBase; + return Ignore; }(); -// Windows +var factory = function factory(options) { + return new Ignore(options); +}; + +var isPathValid = function isPathValid(path) { + return checkPath(path && checkPath.convert(path), path, RETURN_FALSE); +}; + +factory.isPathValid = isPathValid; // Fixes typescript + +factory["default"] = factory; +module.exports = factory; // Windows // -------------------------------------------------------------- -/* istanbul ignore if */ +/* istanbul ignore if */ -if ( -// Detect `process` so that it can run in browsers. +if ( // Detect `process` so that it can run in browsers. typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32')) { - var filter = IgnoreBase.prototype._filter; - /* eslint no-control-regex: "off" */ - var make_posix = function make_posix(str) { - return (/^\\\\\?\\/.test(str) || /[^\x00-\x80]+/.test(str) ? str : str.replace(/\\/g, '/') - ); + var makePosix = function makePosix(str) { + return /^\\\\\?\\/.test(str) || /[\0-\x1F"<>\|]+/.test(str) ? str : str.replace(/\\/g, '/'); }; - IgnoreBase.prototype._filter = function filterWin32(path, slices) { - path = make_posix(path); - return filter.call(this, path, slices); + checkPath.convert = makePosix; // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' + // 'd:\\foo' + + var REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + + checkPath.isNotRelative = function (path) { + return REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path); }; } - -module.exports = function (options) { - return new IgnoreBase(options); -}; diff --git a/node_modules/ignore/package.json b/node_modules/ignore/package.json index 2957d7346..a0eaaa338 100644 --- a/node_modules/ignore/package.json +++ b/node_modules/ignore/package.json @@ -1,50 +1,56 @@ { - "_from": "ignore@^4.0.6", - "_id": "ignore@4.0.6", + "_args": [ + [ + "ignore@5.2.0", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_development": true, + "_from": "ignore@5.2.0", + "_id": "ignore@5.2.0", "_inBundle": false, - "_integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "_integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "_location": "/ignore", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "ignore@^4.0.6", + "raw": "ignore@5.2.0", "name": "ignore", "escapedName": "ignore", - "rawSpec": "^4.0.6", + "rawSpec": "5.2.0", "saveSpec": null, - "fetchSpec": "^4.0.6" + "fetchSpec": "5.2.0" }, "_requiredBy": [ "/eslint" ], - "_resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "_shasum": "750e3db5862087b4737ebac8207ffd1ef27b25fc", - "_spec": "ignore@^4.0.6", - "_where": "/Users/pozil/poz/git/auto-assign-issue/node_modules/eslint", + "_resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "_spec": "5.2.0", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", "author": { "name": "kael" }, "bugs": { "url": "https://github.com/kaelzhang/node-ignore/issues" }, - "bundleDependencies": false, - "deprecated": false, - "description": "Ignore is a manager and filter for .gitignore rules.", + "description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.", "devDependencies": { - "babel-cli": "^6.26.0", - "babel-preset-env": "^1.7.0", - "codecov": "^3.0.4", - "eslint": "^5.3.0", - "eslint-config-ostai": "^1.3.2", - "eslint-plugin-import": "^2.13.0", - "mkdirp": "^0.5.1", - "pre-suf": "^1.1.0", - "rimraf": "^2.6.2", + "@babel/cli": "^7.8.4", + "@babel/core": "^7.9.6", + "@babel/preset-env": "^7.9.6", + "codecov": "^3.7.0", + "debug": "^4.1.1", + "eslint": "^7.0.0", + "eslint-config-ostai": "^3.0.0", + "eslint-plugin-import": "^2.20.2", + "mkdirp": "^1.0.4", + "pre-suf": "^1.1.1", + "rimraf": "^3.0.2", "spawn-sync": "^2.0.0", - "tap": "^12.0.1", - "tmp": "0.0.33", - "typescript": "^3.0.1" + "tap": "^14.10.7", + "tmp": "0.2.1", + "typescript": "^3.9.3" }, "engines": { "node": ">= 4" @@ -80,13 +86,18 @@ "scripts": { "build": "babel -o legacy.js index.js", "posttest": "tap --coverage-report=html && codecov", - "prepublish": "npm run build", - "test": "npm run test-no-cov", - "test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage", - "test:git": "tap test/git-check-ignore.js", - "test:ignore": "tap test/ignore.js --coverage", + "prepublishOnly": "npm run build", + "tap": "tap --reporter classic", + "test": "npm run test:only", + "test:cases": "npm run tap test/*.js -- --coverage", + "test:git": "npm run tap test/git-check-ignore.js", + "test:ignore": "npm run tap test/ignore.js", "test:lint": "eslint .", - "test:tsc": "tsc ./test/ts/simple.ts" + "test:only": "npm run test:lint && npm run test:tsc && npm run test:ts && npm run test:cases", + "test:others": "npm run tap test/others.js", + "test:ts": "node ./test/ts/simple.js", + "test:tsc": "tsc ./test/ts/simple.ts --lib ES6", + "test:win32": "IGNORE_TEST_WIN32=1 npm run test" }, - "version": "4.0.6" + "version": "5.2.0" } diff --git a/node_modules/lint-staged/README.md b/node_modules/lint-staged/README.md index 813b3f09b..cb74fac78 100644 --- a/node_modules/lint-staged/README.md +++ b/node_modules/lint-staged/README.md @@ -2,8 +2,30 @@ Run linters against staged git files and don't let :poop: slip into your code base! +``` +$ git commit + +✔ Preparing lint-staged... +❯ Running tasks for staged files... + ❯ packages/frontend/.lintstagedrc.json — 1 file + ↓ *.js — no files [SKIPPED] + ❯ *.{json,md} — 1 file + ⠹ prettier --write + ↓ packages/backend/.lintstagedrc.json — 2 files + ❯ *.js — 2 files + ⠼ eslint --fix + ↓ *.{json,md} — no files [SKIPPED] +◼ Applying modifications from tasks... +◼ Cleaning up temporary files... +``` + +
+See asciinema video + [![asciicast](https://asciinema.org/a/199934.svg)](https://asciinema.org/a/199934) +
+ ## Why Linting makes more sense when run before committing your code. By doing so you can ensure no errors go into the repository and enforce code style. But running a lint process on a whole project is slow, and linting results can be irrelevant. Ultimately you only want to lint files that will be committed. @@ -59,38 +81,36 @@ See [Releases](https://github.com/okonet/lint-staged/releases). ## Command line flags -```bash +``` ❯ npx lint-staged --help Usage: lint-staged [options] Options: -V, --version output the version number - --allow-empty allow empty commits when tasks revert all staged changes - (default: false) + --allow-empty allow empty commits when tasks revert all staged changes (default: false) + -p, --concurrent the number of tasks to run concurrently, or false for serial (default: true) -c, --config [path] path to configuration file, or - to read from stdin + --cwd [path] run all tasks in specific directory, instead of the current -d, --debug print additional debug information (default: false) - --no-stash disable the backup stash, and do not revert in case of - errors - -p, --concurrent the number of tasks to run concurrently, or false to run - tasks serially (default: true) + --no-stash disable the backup stash, and do not revert in case of errors -q, --quiet disable lint-staged’s own console output (default: false) -r, --relative pass relative filepaths to tasks (default: false) - -x, --shell [path] skip parsing of tasks for better shell support (default: - false) - -v, --verbose show task output even when tasks succeed; by default only - failed output is shown (default: false) + -x, --shell [path] skip parsing of tasks for better shell support (default: false) + -v, --verbose show task output even when tasks succeed; by default only failed output is shown + (default: false) -h, --help display help for command ``` - **`--allow-empty`**: By default, when linter tasks undo all staged changes, lint-staged will exit with an error and abort the commit. Use this flag to allow creating empty git commits. +- **`--concurrent [number|boolean]`**: Controls the concurrency of tasks being run by lint-staged. **NOTE**: This does NOT affect the concurrency of subtasks (they will always be run sequentially). Possible values are: + - `false`: Run all tasks serially + - `true` (default) : _Infinite_ concurrency. Runs as many tasks in parallel as possible. + - `{number}`: Run the specified number of tasks in parallel, where `1` is equivalent to `false`. - **`--config [path]`**: Manually specify a path to a config file or npm package name. Note: when used, lint-staged won't perform the config file search and will print an error if the specified file cannot be found. If '-' is provided as the filename then the config will be read from stdin, allowing piping in the config like `cat my-config.json | npx lint-staged --config -`. +- **`--cwd [path]`**: By default tasks run in the current working directory. Use the `--cwd some/directory` to override this. The path can be absolute or relative to the current working directory. - **`--debug`**: Run in debug mode. When set, it does the following: - uses [debug](https://github.com/visionmedia/debug) internally to log additional information about staged files, commands being executed, location of binaries, etc. Debug logs, which are automatically enabled by passing the flag, can also be enabled by setting the environment variable `$DEBUG` to `lint-staged*`. - uses [`verbose` renderer](https://github.com/SamVerschueren/listr-verbose-renderer) for `listr`; this causes serial, uncoloured output to the terminal, instead of the default (beautified, dynamic) output. -- **`--concurrent [number | (true/false)]`**: Controls the concurrency of tasks being run by lint-staged. **NOTE**: This does NOT affect the concurrency of subtasks (they will always be run sequentially). Possible values are: - - `false`: Run all tasks serially - - `true` (default) : _Infinite_ concurrency. Runs as many tasks in parallel as possible. - - `{number}`: Run the specified number of tasks in parallel, where `1` is equivalent to `false`. - **`--no-stash`**: By default a backup stash will be created before running the tasks, and all task modifications will be reverted in case of an error. This option will disable creating the stash, and instead leave all modifications in the index when aborting the commit. - **`--quiet`**: Supress all CLI output, except from tasks. - **`--relative`**: Pass filepaths relative to `process.cwd()` (where `lint-staged` runs) to tasks. Default is `false`. @@ -116,6 +136,8 @@ Starting with v3.1 you can now use different ways of configuring lint-staged: Configuration should be an object where each value is a command to run and its key is a glob pattern to use for this command. This package uses [micromatch](https://github.com/micromatch/micromatch) for glob patterns. JavaScript files can also export advanced configuration as a function. See [Using JS configuration files](#using-js-configuration-files) for more info. +You can also place multiple configuration files in different directories inside a project. For a given staged file, the closest configuration file will always be used. See ["How to use `lint-staged` in a multi-package monorepo?"](#how-to-use-lint-staged-in-a-multi-package-monorepo) for more info and an example. + #### `package.json` example: ```json @@ -644,12 +666,32 @@ _Thanks to [this comment](https://youtrack.jetbrains.com/issue/IDEA-135454#comme
Click to expand -Starting with v5.0, `lint-staged` automatically resolves the git root **without any** additional configuration. You configure `lint-staged` as you normally would if your project root and git root were the same directory. +Install _lint-staged_ on the monorepo root level, and add separate configuration files in each package. When running, _lint-staged_ will always use the configuration closest to a staged file, so having separate configuration files makes sure linters do not "leak" into other packages. + +For example, in a monorepo with `packages/frontend/.lintstagedrc.json` and `packages/backend/.lintstagedrc.json`, a staged file inside `packages/frontend/` will only match that configuration, and not the one in `packages/backend/`. + +**Note**: _lint-staged_ discovers the closest configuration to each staged file, even if that configuration doesn't include any matching globs. Given these example configurations: + +```js +// ./.lintstagedrc.json +{ "*.md": "prettier --write" } +``` + +```js +// ./packages/frontend/.lintstagedrc.json +{ "*.js": "eslint --fix" } +``` + +When committing `./packages/frontend/README.md`, it **will not run** _prettier_, because the configuration in the `frontend/` directory is closer to the file and doesn't include it. You should treat all _lint-staged_ configuration files as isolated and separated from each other. You can always use JS files to "extend" configurations, for example: -If you wish to use `lint-staged` in a multi package monorepo, it is recommended to install [`husky`](https://github.com/typicode/husky) in the root package.json. -[`lerna`](https://github.com/lerna/lerna) can be used to execute the `precommit` script in all sub-packages. +```js +import baseConfig from '../.lintstagedrc.js' -Example repo: [sudo-suhas/lint-staged-multi-pkg](https://github.com/sudo-suhas/lint-staged-multi-pkg). +export default { + ...baseConfig, + '*.js': 'eslint --fix', +} +```
diff --git a/node_modules/lint-staged/bin/lint-staged.js b/node_modules/lint-staged/bin/lint-staged.js index 1383a3933..9a6f6ebd9 100755 --- a/node_modules/lint-staged/bin/lint-staged.js +++ b/node_modules/lint-staged/bin/lint-staged.js @@ -26,14 +26,15 @@ const version = packageJson.version cmdline .version(version) .option('--allow-empty', 'allow empty commits when tasks revert all staged changes', false) - .option('-c, --config [path]', 'path to configuration file, or - to read from stdin') - .option('-d, --debug', 'print additional debug information', false) - .option('--no-stash', 'disable the backup stash, and do not revert in case of errors', false) .option( - '-p, --concurrent ', - 'the number of tasks to run concurrently, or false to run tasks serially', + '-p, --concurrent ', + 'the number of tasks to run concurrently, or false for serial', true ) + .option('-c, --config [path]', 'path to configuration file, or - to read from stdin') + .option('--cwd [path]', 'run all tasks in specific directory, instead of the current') + .option('-d, --debug', 'print additional debug information', false) + .option('--no-stash', 'disable the backup stash, and do not revert in case of errors', false) .option('-q, --quiet', 'disable lint-staged’s own console output', false) .option('-r, --relative', 'pass relative filepaths to tasks', false) .option('-x, --shell [path]', 'skip parsing of tasks for better shell support', false) @@ -75,12 +76,13 @@ const options = { allowEmpty: !!cmdlineOptions.allowEmpty, concurrent: JSON.parse(cmdlineOptions.concurrent), configPath: cmdlineOptions.config, + cwd: cmdlineOptions.cwd, debug: !!cmdlineOptions.debug, maxArgLength: getMaxArgLength() / 2, - stash: !!cmdlineOptions.stash, // commander inverts `no-` flags to `!x` quiet: !!cmdlineOptions.quiet, relative: !!cmdlineOptions.relative, shell: cmdlineOptions.shell /* Either a boolean or a string pointing to the shell */, + stash: !!cmdlineOptions.stash, // commander inverts `no-` flags to `!x` verbose: !!cmdlineOptions.verbose, } diff --git a/node_modules/lint-staged/lib/dynamicImport.js b/node_modules/lint-staged/lib/dynamicImport.js new file mode 100644 index 000000000..75e228fc2 --- /dev/null +++ b/node_modules/lint-staged/lib/dynamicImport.js @@ -0,0 +1,3 @@ +import { pathToFileURL } from 'url' + +export const dynamicImport = (path) => import(pathToFileURL(path)).then((module) => module.default) diff --git a/node_modules/lint-staged/lib/generateTasks.js b/node_modules/lint-staged/lib/generateTasks.js index d31413703..164d69b49 100644 --- a/node_modules/lint-staged/lib/generateTasks.js +++ b/node_modules/lint-staged/lib/generateTasks.js @@ -16,11 +16,10 @@ const debugLog = debug('lint-staged:generateTasks') * @param {boolean} [options.files] - Staged filepaths * @param {boolean} [options.relative] - Whether filepaths to should be relative to gitDir */ -export const generateTasks = ({ config, cwd = process.cwd(), gitDir, files, relative = false }) => { +export const generateTasks = ({ config, cwd = process.cwd(), files, relative = false }) => { debugLog('Generating linter tasks') - const absoluteFiles = files.map((file) => normalize(path.resolve(gitDir, file))) - const relativeFiles = absoluteFiles.map((file) => normalize(path.relative(cwd, file))) + const relativeFiles = files.map((file) => normalize(path.relative(cwd, file))) return Object.entries(config).map(([rawPattern, commands]) => { let pattern = rawPattern diff --git a/node_modules/lint-staged/lib/getConfigGroups.js b/node_modules/lint-staged/lib/getConfigGroups.js new file mode 100644 index 000000000..db1ce142a --- /dev/null +++ b/node_modules/lint-staged/lib/getConfigGroups.js @@ -0,0 +1,112 @@ +/** @typedef {import('./index').Logger} Logger */ + +import path from 'path' + +import debug from 'debug' +import objectInspect from 'object-inspect' + +import { loadConfig } from './loadConfig.js' +import { ConfigNotFoundError } from './symbols.js' +import { validateConfig } from './validateConfig.js' + +const debugLog = debug('lint-staged:getConfigGroups') + +/** + * Return matched files grouped by their configuration. + * + * @param {object} options + * @param {Object} [options.configObject] - Explicit config object from the js API + * @param {string} [options.configPath] - Explicit path to a config file + * @param {string} [options.cwd] - Current working directory + * @param {string} [options.files] - List of staged files + * @param {Logger} logger + */ +export const getConfigGroups = async ( + { configObject, configPath, cwd, files }, + logger = console +) => { + debugLog('Grouping configuration files...') + + // Return explicit config object from js API + if (configObject) { + debugLog('Using single direct configuration object...') + + const config = validateConfig(configObject, 'config object', logger) + return { '': { config, files } } + } + + // Use only explicit config path instead of discovering multiple + if (configPath) { + debugLog('Using single configuration path...') + + const { config, filepath } = await loadConfig({ configPath }, logger) + + if (!config) { + logger.error(`${ConfigNotFoundError.message}.`) + throw ConfigNotFoundError + } + + const validatedConfig = validateConfig(config, filepath, logger) + return { [configPath]: { config: validatedConfig, files } } + } + + debugLog('Grouping staged files by their directories...') + + // Group files by their base directory + const filesByDir = files.reduce((acc, file) => { + const dir = path.normalize(path.dirname(file)) + + if (dir in acc) { + acc[dir].push(file) + } else { + acc[dir] = [file] + } + + return acc + }, {}) + + debugLog('Grouped staged files into %d directories:', Object.keys(filesByDir).length) + debugLog(objectInspect(filesByDir, { indent: 2 })) + + // Group files by their discovered config + // { '.lintstagedrc.json': { config: {...}, files: [...] } } + const configGroups = {} + + debugLog('Searching config files...') + + const searchConfig = async (cwd, files = []) => { + const { config, filepath } = await loadConfig({ cwd }, logger) + if (!config) { + debugLog('Found no config from "%s"!', cwd) + return + } + + if (filepath in configGroups) { + debugLog('Found existing config "%s" from "%s"!', filepath, cwd) + // Re-use cached config and skip validation + configGroups[filepath].files.push(...files) + } else { + debugLog('Found new config "%s" from "%s"!', filepath, cwd) + + const validatedConfig = validateConfig(config, filepath, logger) + configGroups[filepath] = { config: validatedConfig, files } + } + } + + // Start by searching from cwd + await searchConfig(cwd) + + // Discover configs from the base directory of each file + await Promise.all(Object.entries(filesByDir).map(([dir, files]) => searchConfig(dir, files))) + + // Throw if no configurations were found + if (Object.keys(configGroups).length === 0) { + debugLog('Found no config groups!') + logger.error(`${ConfigNotFoundError.message}.`) + throw ConfigNotFoundError + } + + debugLog('Grouped staged files into %d groups!', Object.keys(configGroups).length) + + return configGroups +} diff --git a/node_modules/lint-staged/lib/getStagedFiles.js b/node_modules/lint-staged/lib/getStagedFiles.js index 69d79aac5..a6a557383 100644 --- a/node_modules/lint-staged/lib/getStagedFiles.js +++ b/node_modules/lint-staged/lib/getStagedFiles.js @@ -1,16 +1,28 @@ +import path from 'path' + +import normalize from 'normalize-path' + import { execGit } from './execGit.js' -export const getStagedFiles = async (options) => { +export const getStagedFiles = async ({ cwd = process.cwd() } = {}) => { try { // Docs for --diff-filter option: https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---diff-filterACDMRTUXB82308203 // Docs for -z option: https://git-scm.com/docs/git-diff#Documentation/git-diff.txt--z - const lines = await execGit( - ['diff', '--staged', '--diff-filter=ACMR', '--name-only', '-z'], - options + const lines = await execGit(['diff', '--staged', '--diff-filter=ACMR', '--name-only', '-z'], { + cwd, + }) + + if (!lines) return [] + + // With `-z`, git prints `fileA\u0000fileB\u0000fileC\u0000` so we need to + // remove the last occurrence of `\u0000` before splitting + return ( + lines + // eslint-disable-next-line no-control-regex + .replace(/\u0000$/, '') + .split('\u0000') + .map((file) => normalize(path.resolve(cwd, file))) ) - // With `-z`, git prints `fileA\u0000fileB\u0000fileC\u0000` so we need to remove the last occurrence of `\u0000` before splitting - // eslint-disable-next-line no-control-regex - return lines ? lines.replace(/\u0000$/, '').split('\u0000') : [] } catch { return null } diff --git a/node_modules/lint-staged/lib/index.js b/node_modules/lint-staged/lib/index.js index 4048b444d..4d2c25744 100644 --- a/node_modules/lint-staged/lib/index.js +++ b/node_modules/lint-staged/lib/index.js @@ -1,17 +1,9 @@ import debug from 'debug' -import inspect from 'object-inspect' -import { loadConfig } from './loadConfig.js' import { PREVENTED_EMPTY_COMMIT, GIT_ERROR, RESTORE_STASH_EXAMPLE } from './messages.js' import { printTaskOutput } from './printTaskOutput.js' import { runAll } from './runAll.js' -import { - ApplyEmptyCommitError, - ConfigNotFoundError, - GetBackupStashError, - GitError, -} from './symbols.js' -import { validateConfig } from './validateConfig.js' +import { ApplyEmptyCommitError, GetBackupStashError, GitError } from './symbols.js' import { validateOptions } from './validateOptions.js' const debugLog = debug('lint-staged') @@ -45,7 +37,7 @@ const lintStaged = async ( concurrent = true, config: configObject, configPath, - cwd = process.cwd(), + cwd, debug = false, maxArgLength, quiet = false, @@ -56,26 +48,7 @@ const lintStaged = async ( } = {}, logger = console ) => { - await validateOptions({ shell }, logger) - - const inputConfig = configObject || (await loadConfig({ configPath, cwd }, logger)) - - if (!inputConfig) { - logger.error(`${ConfigNotFoundError.message}.`) - throw ConfigNotFoundError - } - - const config = validateConfig(inputConfig, logger) - - if (debug) { - // Log using logger to be able to test through `consolemock`. - logger.log('Running lint-staged with the following config:') - logger.log(inspect(config, { indent: 2 })) - } else { - // We might not be in debug mode but `DEBUG=lint-staged*` could have - // been set. - debugLog('lint-staged config:\n%O', config) - } + await validateOptions({ cwd, shell }, logger) // Unset GIT_LITERAL_PATHSPECS to not mess with path interpretation debugLog('Unset GIT_LITERAL_PATHSPECS (was `%s`)', process.env.GIT_LITERAL_PATHSPECS) @@ -86,7 +59,8 @@ const lintStaged = async ( { allowEmpty, concurrent, - config, + configObject, + configPath, cwd, debug, maxArgLength, diff --git a/node_modules/lint-staged/lib/loadConfig.js b/node_modules/lint-staged/lib/loadConfig.js index 8c9b8c55e..78fa3c767 100644 --- a/node_modules/lint-staged/lib/loadConfig.js +++ b/node_modules/lint-staged/lib/loadConfig.js @@ -1,11 +1,10 @@ /** @typedef {import('./index').Logger} Logger */ -import { pathToFileURL } from 'url' - import debug from 'debug' import { lilconfig } from 'lilconfig' import YAML from 'yaml' +import { dynamicImport } from './dynamicImport.js' import { resolveConfig } from './resolveConfig.js' const debugLog = debug('lint-staged:loadConfig') @@ -28,9 +27,6 @@ const searchPlaces = [ 'lint-staged.config.cjs', ] -/** exported for tests */ -export const dynamicImport = (path) => import(pathToFileURL(path)).then((module) => module.default) - const jsonParse = (path, content) => JSON.parse(content) const yamlParse = (path, content) => YAML.parse(content) @@ -51,6 +47,8 @@ const loaders = { noExt: yamlParse, } +const explorer = lilconfig('lint-staged', { searchPlaces, loaders }) + /** * @param {object} options * @param {string} [options.configPath] - Explicit path to a config file @@ -64,22 +62,22 @@ export const loadConfig = async ({ configPath, cwd }, logger) => { debugLog('Searching for configuration from `%s`...', cwd) } - const explorer = lilconfig('lint-staged', { searchPlaces, loaders }) - const result = await (configPath ? explorer.load(resolveConfig(configPath)) : explorer.search(cwd)) - if (!result) return null + + if (!result) return {} // config is a promise when using the `dynamicImport` loader const config = await result.config + const filepath = result.filepath - debugLog('Successfully loaded config from `%s`:\n%O', result.filepath, config) + debugLog('Successfully loaded config from `%s`:\n%O', filepath, config) - return config + return { config, filepath } } catch (error) { debugLog('Failed to load configuration!') logger.error(error) - return null + return {} } } diff --git a/node_modules/lint-staged/lib/resolveGitRepo.js b/node_modules/lint-staged/lib/resolveGitRepo.js index 23b03832c..3e7460369 100644 --- a/node_modules/lint-staged/lib/resolveGitRepo.js +++ b/node_modules/lint-staged/lib/resolveGitRepo.js @@ -14,7 +14,8 @@ const debugLog = debug('lint-staged:resolveGitRepo') * submodules and worktrees */ const resolveGitConfigDir = async (gitDir) => { - const defaultDir = normalize(path.join(gitDir, '.git')) + // Get the real path in case it's a symlink + const defaultDir = normalize(await fs.realpath(path.join(gitDir, '.git'))) const stats = await fs.lstat(defaultDir) // If .git is a directory, use it if (stats.isDirectory()) return defaultDir diff --git a/node_modules/lint-staged/lib/runAll.js b/node_modules/lint-staged/lib/runAll.js index 1ba726004..4604fdb52 100644 --- a/node_modules/lint-staged/lib/runAll.js +++ b/node_modules/lint-staged/lib/runAll.js @@ -1,11 +1,16 @@ /** @typedef {import('./index').Logger} Logger */ +import path from 'path' + +import { dim } from 'colorette' import debug from 'debug' import { Listr } from 'listr2' +import normalize from 'normalize-path' import { chunkFiles } from './chunkFiles.js' import { execGit } from './execGit.js' import { generateTasks } from './generateTasks.js' +import { getConfigGroups } from './getConfigGroups.js' import { getRenderer } from './getRenderer.js' import { getStagedFiles } from './getStagedFiles.js' import { GitWorkflow } from './gitWorkflow.js' @@ -40,10 +45,11 @@ const createError = (ctx) => Object.assign(new Error('lint-staged failed'), { ct * Executes all tasks and either resolves or rejects the promise * * @param {object} options - * @param {Object} [options.allowEmpty] - Allow empty commits when tasks revert all staged changes + * @param {boolean} [options.allowEmpty] - Allow empty commits when tasks revert all staged changes * @param {boolean | number} [options.concurrent] - The number of tasks to run concurrently, or false to run tasks serially - * @param {Object} [options.config] - Task configuration - * @param {Object} [options.cwd] - Current working directory + * @param {Object} [options.configObject] - Explicit config object from the js API + * @param {string} [options.configPath] - Explicit path to a config file + * @param {string} [options.cwd] - Current working directory * @param {boolean} [options.debug] - Enable debug mode * @param {number} [options.maxArgLength] - Maximum argument string length * @param {boolean} [options.quiet] - Disable lint-staged’s own console output @@ -58,8 +64,9 @@ export const runAll = async ( { allowEmpty = false, concurrent = true, - config, - cwd = process.cwd(), + configObject, + configPath, + cwd, debug = false, maxArgLength, quiet = false, @@ -70,7 +77,11 @@ export const runAll = async ( }, logger = console ) => { - debugLog('Running all linter scripts') + debugLog('Running all linter scripts...') + + // Resolve relative CWD option + cwd = cwd ? path.resolve(cwd) : process.cwd() + debugLog('Using working directory `%s`', cwd) const ctx = getInitialState({ quiet }) @@ -107,9 +118,7 @@ export const runAll = async ( return ctx } - const stagedFileChunks = chunkFiles({ baseDir: gitDir, files, maxArgLength, relative }) - const chunkCount = stagedFileChunks.length - if (chunkCount > 1) debugLog(`Chunked staged files into ${chunkCount} part`, chunkCount) + const configGroups = await getConfigGroups({ configObject, configPath, cwd, files }, logger) // lint-staged 10 will automatically add modifications to index // Warn user when their command includes `git add` @@ -128,62 +137,76 @@ export const runAll = async ( // Set of all staged files that matched a task glob. Values in a set are unique. const matchedFiles = new Set() - for (const [index, files] of stagedFileChunks.entries()) { - const chunkTasks = generateTasks({ config, cwd, gitDir, files, relative }) - const chunkListrTasks = [] - - for (const task of chunkTasks) { - const subTasks = await makeCmdTasks({ - commands: task.commands, - cwd, - files: task.fileList, - gitDir, - renderer: listrOptions.renderer, - shell, - verbose, - }) + for (const [configPath, { config, files }] of Object.entries(configGroups)) { + const stagedFileChunks = chunkFiles({ baseDir: gitDir, files, maxArgLength, relative }) - // Add files from task to match set - task.fileList.forEach((file) => { - matchedFiles.add(file) - }) + const chunkCount = stagedFileChunks.length + if (chunkCount > 1) { + debugLog('Chunked staged files from `%s` into %d part', configPath, chunkCount) + } + + for (const [index, files] of stagedFileChunks.entries()) { + const relativeConfig = normalize(path.relative(cwd, configPath)) + + const chunkListrTasks = await Promise.all( + generateTasks({ config, cwd, files, relative }).map((task) => + makeCmdTasks({ + commands: task.commands, + cwd, + files: task.fileList, + gitDir, + renderer: listrOptions.renderer, + shell, + verbose, + }).then((subTasks) => { + // Add files from task to match set + task.fileList.forEach((file) => { + matchedFiles.add(file) + }) - hasDeprecatedGitAdd = - hasDeprecatedGitAdd || subTasks.some((subTask) => subTask.command === 'git add') - - chunkListrTasks.push({ - title: `Running tasks for ${task.pattern}`, - task: async () => - new Listr(subTasks, { - // In sub-tasks we don't want to run concurrently - // and we want to abort on errors - ...listrOptions, - concurrent: false, - exitOnError: true, - }), + hasDeprecatedGitAdd = + hasDeprecatedGitAdd || subTasks.some((subTask) => subTask.command === 'git add') + + const fileCount = task.fileList.length + + return { + title: `${task.pattern}${dim(` — ${fileCount} ${fileCount > 1 ? 'files' : 'file'}`)}`, + task: async () => + new Listr(subTasks, { + // In sub-tasks we don't want to run concurrently + // and we want to abort on errors + ...listrOptions, + concurrent: false, + exitOnError: true, + }), + skip: () => { + // Skip task when no files matched + if (fileCount === 0) { + return `${task.pattern}${dim(' — no files')}` + } + return false + }, + } + }) + ) + ) + + listrTasks.push({ + title: + `${relativeConfig}${dim(` — ${files.length} ${files.length > 1 ? 'files' : 'file'}`)}` + + (chunkCount > 1 ? dim(` (chunk ${index + 1}/${chunkCount})...`) : ''), + task: () => new Listr(chunkListrTasks, { ...listrOptions, concurrent, exitOnError: true }), skip: () => { - // Skip task when no files matched - if (task.fileList.length === 0) { - return `No staged files match ${task.pattern}` + // Skip if the first step (backup) failed + if (ctx.errors.has(GitError)) return SKIPPED_GIT_ERROR + // Skip chunk when no every task is skipped (due to no matches) + if (chunkListrTasks.every((task) => task.skip())) { + return `${relativeConfig}${dim(' — no tasks to run')}` } return false }, }) } - - listrTasks.push({ - // No need to show number of task chunks when there's only one - title: - chunkCount > 1 ? `Running tasks (chunk ${index + 1}/${chunkCount})...` : 'Running tasks...', - task: () => new Listr(chunkListrTasks, { ...listrOptions, concurrent }), - skip: () => { - // Skip if the first step (backup) failed - if (ctx.errors.has(GitError)) return SKIPPED_GIT_ERROR - // Skip chunk when no every task is skipped (due to no matches) - if (chunkListrTasks.every((task) => task.skip())) return 'No tasks to run.' - return false - }, - }) } if (hasDeprecatedGitAdd) { @@ -211,7 +234,7 @@ export const runAll = async ( const runner = new Listr( [ { - title: 'Preparing...', + title: 'Preparing lint-staged...', task: (ctx) => git.prepare(ctx), }, { @@ -219,9 +242,13 @@ export const runAll = async ( task: (ctx) => git.hideUnstagedChanges(ctx), enabled: hasPartiallyStagedFiles, }, - ...listrTasks, { - title: 'Applying modifications...', + title: `Running tasks for staged files...`, + task: () => new Listr(listrTasks, { ...listrOptions, concurrent }), + skip: () => listrTasks.every((task) => task.skip()), + }, + { + title: 'Applying modifications from tasks...', task: (ctx) => git.applyModifications(ctx), skip: applyModificationsSkipped, }, @@ -238,7 +265,7 @@ export const runAll = async ( skip: restoreOriginalStateSkipped, }, { - title: 'Cleaning up...', + title: 'Cleaning up temporary files...', task: (ctx) => git.cleanup(ctx), enabled: cleanupEnabled, skip: cleanupSkipped, diff --git a/node_modules/lint-staged/lib/validateConfig.js b/node_modules/lint-staged/lib/validateConfig.js index 11e1ceea0..d09382462 100644 --- a/node_modules/lint-staged/lib/validateConfig.js +++ b/node_modules/lint-staged/lib/validateConfig.js @@ -1,4 +1,7 @@ +/** @typedef {import('./index').Logger} Logger */ + import debug from 'debug' +import inspect from 'object-inspect' import { configurationError } from './messages.js' import { ConfigEmptyError, ConfigFormatError } from './symbols.js' @@ -21,11 +24,13 @@ const TEST_DEPRECATED_KEYS = new Map([ /** * Runs config validation. Throws error if the config is not valid. - * @param config {Object} - * @returns config {Object} + * @param {Object} config + * @param {string} configPath + * @param {Logger} logger + * @returns {Object} config */ -export const validateConfig = (config, logger) => { - debugLog('Validating config') +export const validateConfig = (config, configPath, logger) => { + debugLog('Validating config from `%s`...', configPath) if (!config || (typeof config !== 'object' && typeof config !== 'function')) { throw ConfigFormatError @@ -103,5 +108,8 @@ See https://github.com/okonet/lint-staged#configuration.`) throw new Error(message) } + debugLog('Validated config from `%s`:', configPath) + debugLog(inspect(config, { indent: 2 })) + return validatedConfig } diff --git a/node_modules/lint-staged/lib/validateOptions.js b/node_modules/lint-staged/lib/validateOptions.js index 5e140f09b..78b4c01e1 100644 --- a/node_modules/lint-staged/lib/validateOptions.js +++ b/node_modules/lint-staged/lib/validateOptions.js @@ -1,4 +1,5 @@ import { constants, promises as fs } from 'fs' +import path from 'path' import debug from 'debug' @@ -10,6 +11,7 @@ const debugLog = debug('lint-staged:validateOptions') /** * Validate lint-staged options, either from the Node.js API or the command line flags. * @param {*} options + * @param {boolean|string} [options.cwd] - Current working directory * @param {boolean|string} [options.shell] - Skip parsing of tasks for better shell support * * @throws {InvalidOptionsError} @@ -17,6 +19,17 @@ const debugLog = debug('lint-staged:validateOptions') export const validateOptions = async (options = {}, logger) => { debugLog('Validating options...') + /** Ensure the passed cwd option exists; it might also be relative */ + if (typeof options.cwd === 'string') { + try { + const resolved = path.resolve(options.cwd) + await fs.access(resolved, constants.F_OK) + } catch (error) { + logger.error(invalidOption('cwd', options.cwd, error.message)) + throw InvalidOptionsError + } + } + /** Ensure the passed shell option is executable */ if (typeof options.shell === 'string') { try { diff --git a/node_modules/lint-staged/package.json b/node_modules/lint-staged/package.json index 68d6b61fb..eb6cd81ff 100644 --- a/node_modules/lint-staged/package.json +++ b/node_modules/lint-staged/package.json @@ -1,27 +1,32 @@ { - "_from": "lint-staged", - "_id": "lint-staged@12.1.7", + "_args": [ + [ + "lint-staged@12.3.2", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_development": true, + "_from": "lint-staged@12.3.2", + "_id": "lint-staged@12.3.2", "_inBundle": false, - "_integrity": "sha512-bltv/ejiLWtowExpjU+s5z8j1Byjg9AlmaAjMmqNbIicY69u6sYIwXGg0dCn0TlkrrY2CphtHIXAkbZ+1VoWQQ==", + "_integrity": "sha512-gtw4Cbj01SuVSfAOXC6ivd/7VKHTj51yj5xV8TgktFmYNMsZzXuSd5/brqJEA93v63wL7R6iDlunMANOechC0A==", "_location": "/lint-staged", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "lint-staged", + "raw": "lint-staged@12.3.2", "name": "lint-staged", "escapedName": "lint-staged", - "rawSpec": "", + "rawSpec": "12.3.2", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "12.3.2" }, "_requiredBy": [ - "#DEV:/", - "#USER" + "#DEV:/" ], - "_resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.1.7.tgz", - "_shasum": "fe9137992ac18a456422bb8484dd30be0140629f", - "_spec": "lint-staged", + "_resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.2.tgz", + "_spec": "12.3.2", "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", "author": { "name": "Andrey Okonetchnikov", @@ -33,7 +38,6 @@ "bugs": { "url": "https://github.com/okonet/lint-staged/issues" }, - "bundleDependencies": false, "dependencies": { "cli-truncate": "^3.1.0", "colorette": "^2.0.16", @@ -41,30 +45,29 @@ "debug": "^4.3.3", "execa": "^5.1.1", "lilconfig": "2.0.4", - "listr2": "^3.13.5", + "listr2": "^4.0.1", "micromatch": "^4.0.4", "normalize-path": "^3.0.0", - "object-inspect": "^1.11.1", + "object-inspect": "^1.12.0", "string-argv": "^0.3.1", "supports-color": "^9.2.1", "yaml": "^1.10.2" }, - "deprecated": false, "description": "Lint files staged by git", "devDependencies": { - "@babel/core": "^7.16.5", + "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", - "@babel/preset-env": "^7.16.5", - "babel-jest": "^27.4.5", + "@babel/preset-env": "^7.16.11", + "babel-jest": "^27.4.6", "consolemock": "^1.1.0", - "eslint": "^8.4.1", + "eslint": "^8.7.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.25.3", + "eslint-plugin-import": "^2.25.4", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^4.0.0", "fs-extra": "^10.0.0", "husky": "^7.0.4", - "jest": "^27.4.5", + "jest": "^27.4.7", "jest-snapshot-serializer-ansi": "^1.0.0", "prettier": "^2.5.1" }, @@ -120,5 +123,5 @@ "test:watch": "jest --watch" }, "type": "module", - "version": "12.1.7" + "version": "12.3.2" } diff --git a/node_modules/listr2/dist/constants/clearline-regex.constants.d.ts b/node_modules/listr2/dist/constants/clearline-regex.constants.d.ts deleted file mode 100644 index d513125e4..000000000 --- a/node_modules/listr2/dist/constants/clearline-regex.constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const CLEAR_LINE_REGEX = "(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+"; -export declare const BELL_REGEX: RegExp; diff --git a/node_modules/listr2/dist/constants/clearline-regex.constants.js b/node_modules/listr2/dist/constants/clearline-regex.constants.js deleted file mode 100644 index fe02e6dca..000000000 --- a/node_modules/listr2/dist/constants/clearline-regex.constants.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BELL_REGEX = exports.CLEAR_LINE_REGEX = void 0; -/* eslint-disable no-control-regex */ -exports.CLEAR_LINE_REGEX = '(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+'; -exports.BELL_REGEX = /\u0007/; diff --git a/node_modules/listr2/dist/constants/event.constants.d.ts b/node_modules/listr2/dist/constants/event.constants.d.ts deleted file mode 100644 index dbe9a253f..000000000 --- a/node_modules/listr2/dist/constants/event.constants.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** Type of listr internal events. */ -export declare enum ListrEventType { - TITLE = "TITLE", - STATE = "STATE", - ENABLED = "ENABLED", - SUBTASK = "SUBTASK", - DATA = "DATA", - MESSAGE = "MESSAGE" -} diff --git a/node_modules/listr2/dist/constants/event.constants.js b/node_modules/listr2/dist/constants/event.constants.js deleted file mode 100644 index 64281c565..000000000 --- a/node_modules/listr2/dist/constants/event.constants.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ListrEventType = void 0; -/** Type of listr internal events. */ -var ListrEventType; -(function (ListrEventType) { - ListrEventType["TITLE"] = "TITLE"; - ListrEventType["STATE"] = "STATE"; - ListrEventType["ENABLED"] = "ENABLED"; - ListrEventType["SUBTASK"] = "SUBTASK"; - ListrEventType["DATA"] = "DATA"; - ListrEventType["MESSAGE"] = "MESSAGE"; -})(ListrEventType = exports.ListrEventType || (exports.ListrEventType = {})); diff --git a/node_modules/listr2/dist/constants/index.d.ts b/node_modules/listr2/dist/constants/index.d.ts deleted file mode 100644 index 89d8a8300..000000000 --- a/node_modules/listr2/dist/constants/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './state.constants'; -export * from './event.constants'; diff --git a/node_modules/listr2/dist/constants/index.js b/node_modules/listr2/dist/constants/index.js deleted file mode 100644 index de2789b7a..000000000 --- a/node_modules/listr2/dist/constants/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./state.constants"), exports); -__exportStar(require("./event.constants"), exports); diff --git a/node_modules/listr2/dist/constants/state.constants.d.ts b/node_modules/listr2/dist/constants/state.constants.d.ts deleted file mode 100644 index 5a1e15cf2..000000000 --- a/node_modules/listr2/dist/constants/state.constants.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** Available task states. */ -export declare enum ListrTaskState { - PENDING = "PENDING", - COMPLETED = "COMPLETED", - FAILED = "FAILED", - SKIPPED = "SKIPPED", - ROLLING_BACK = "ROLLING_BACK", - ROLLED_BACK = "ROLLED_BACK", - RETRY = "RETRY" -} diff --git a/node_modules/listr2/dist/constants/state.constants.js b/node_modules/listr2/dist/constants/state.constants.js deleted file mode 100644 index bb6ade26f..000000000 --- a/node_modules/listr2/dist/constants/state.constants.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ListrTaskState = void 0; -/** Available task states. */ -var ListrTaskState; -(function (ListrTaskState) { - ListrTaskState["PENDING"] = "PENDING"; - ListrTaskState["COMPLETED"] = "COMPLETED"; - ListrTaskState["FAILED"] = "FAILED"; - ListrTaskState["SKIPPED"] = "SKIPPED"; - ListrTaskState["ROLLING_BACK"] = "ROLLING_BACK"; - ListrTaskState["ROLLED_BACK"] = "ROLLED_BACK"; - ListrTaskState["RETRY"] = "RETRY"; -})(ListrTaskState = exports.ListrTaskState || (exports.ListrTaskState = {})); diff --git a/node_modules/listr2/dist/index.cjs b/node_modules/listr2/dist/index.cjs new file mode 100644 index 000000000..97af302c6 --- /dev/null +++ b/node_modules/listr2/dist/index.cjs @@ -0,0 +1,1336 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __defProps = Object.defineProperties; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __reExport = (target, module2, copyDefault, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default")) + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toESM = (module2, isNodeMode) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; +var __toCommonJS = /* @__PURE__ */ ((cache) => { + return (module2, temp) => { + return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp); + }; +})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Listr: () => Listr, + ListrError: () => ListrError, + ListrErrorTypes: () => ListrErrorTypes, + ListrEventType: () => ListrEventType, + ListrTaskState: () => ListrTaskState, + LogLevels: () => LogLevels, + Logger: () => Logger, + Manager: () => Manager, + PromptError: () => PromptError, + createPrompt: () => createPrompt, + destroyPrompt: () => destroyPrompt, + figures: () => figures +}); + +// src/listr.ts +var import_p_map = __toESM(require("p-map"), 1); +var import_rxjs2 = require("rxjs"); + +// src/constants/state.constants.ts +var ListrTaskState = /* @__PURE__ */ ((ListrTaskState2) => { + ListrTaskState2["PENDING"] = "PENDING"; + ListrTaskState2["COMPLETED"] = "COMPLETED"; + ListrTaskState2["FAILED"] = "FAILED"; + ListrTaskState2["SKIPPED"] = "SKIPPED"; + ListrTaskState2["ROLLING_BACK"] = "ROLLING_BACK"; + ListrTaskState2["ROLLED_BACK"] = "ROLLED_BACK"; + ListrTaskState2["RETRY"] = "RETRY"; + return ListrTaskState2; +})(ListrTaskState || {}); + +// src/lib/task.ts +var import_rxjs = require("rxjs"); +var import_stream = require("stream"); + +// src/constants/event.constants.ts +var ListrEventType = /* @__PURE__ */ ((ListrEventType2) => { + ListrEventType2["TITLE"] = "TITLE"; + ListrEventType2["STATE"] = "STATE"; + ListrEventType2["ENABLED"] = "ENABLED"; + ListrEventType2["SUBTASK"] = "SUBTASK"; + ListrEventType2["DATA"] = "DATA"; + ListrEventType2["MESSAGE"] = "MESSAGE"; + return ListrEventType2; +})(ListrEventType || {}); + +// src/utils/general.ts +var import_rfdc = __toESM(require("rfdc"), 1); +var clone = (0, import_rfdc.default)({ circles: true }); +function cloneObject(obj) { + return clone(obj); +} + +// src/interfaces/listr-error.interface.ts +var ListrError = class extends Error { + constructor(error, type, task) { + super(error.message); + this.error = error; + this.type = type; + this.task = task; + var _a2; + this.name = "ListrError"; + this.path = [...(_a2 = task.listr.path) != null ? _a2 : [], task.title].join(" > "); + if ((task == null ? void 0 : task.options.collectErrors) === "full") { + this.task = cloneObject(task); + this.ctx = cloneObject(task.listr.ctx); + } + this.stack = error == null ? void 0 : error.stack; + } +}; +var ListrErrorTypes = /* @__PURE__ */ ((ListrErrorTypes2) => { + ListrErrorTypes2["WILL_RETRY"] = "WILL_RETRY"; + ListrErrorTypes2["WILL_ROLLBACK"] = "WILL_ROLLBACK"; + ListrErrorTypes2["HAS_FAILED_TO_ROLLBACK"] = "HAS_FAILED_TO_ROLLBACK"; + ListrErrorTypes2["HAS_FAILED"] = "HAS_FAILED"; + ListrErrorTypes2["HAS_FAILED_WITHOUT_ERROR"] = "HAS_FAILED_WITHOUT_ERROR"; + return ListrErrorTypes2; +})(ListrErrorTypes || {}); +var PromptError = class extends Error { + constructor(message) { + super(message); + this.name = "PromptError"; + } +}; + +// src/utils/assert.ts +function assertFunctionOrSelf(functionOrSelf, ...args) { + if (typeof functionOrSelf === "function") { + return functionOrSelf(...args); + } else { + return functionOrSelf; + } +} + +// src/renderer/default.renderer.ts +var import_cli_truncate = __toESM(require("cli-truncate"), 1); +var import_log_update = __toESM(require("log-update"), 1); +var import_os = require("os"); +var import_wrap_ansi = __toESM(require("wrap-ansi"), 1); + +// src/utils/colorette.ts +var import_colorette = require("colorette"); +var _a; +var colorette_default = (0, import_colorette.createColors)({ useColor: ((_a = process.env) == null ? void 0 : _a.LISTR_DISABLE_COLOR) !== "1" }); + +// src/utils/is-unicode-supported.ts +function isUnicodeSupported() { + if (process.platform !== "win32") { + return true; + } + return Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty"; +} + +// src/utils/figures.ts +var FIGURES_MAIN = { + warning: "\u26A0", + cross: "\u2716", + arrowDown: "\u2193", + tick: "\u2714", + arrowRight: "\u2192", + pointer: "\u276F", + checkboxOn: "\u2612", + arrowLeft: "\u2190", + squareSmallFilled: "\u25FC", + pointerSmall: "\u203A" +}; +var FIGURES_FALLBACK = __spreadProps(__spreadValues({}, FIGURES_MAIN), { + warning: "\u203C", + cross: "\xD7", + tick: "\u221A", + pointer: ">", + checkboxOn: "[\xD7]", + squareSmallFilled: "\u25A0" +}); +var figures = isUnicodeSupported() ? FIGURES_MAIN : FIGURES_FALLBACK; + +// src/utils/indent-string.ts +function indentString(string, count) { + return string.replace(/^(?!\s*$)/gm, " ".repeat(count)); +} + +// src/utils/parse-time.ts +function parseTaskTime(duration) { + const seconds = Math.floor(duration / 1e3); + const minutes = Math.floor(seconds / 60); + let parsedTime; + if (seconds === 0 && minutes === 0) { + parsedTime = `0.${Math.floor(duration / 100)}s`; + } + if (seconds > 0) { + parsedTime = `${seconds % 60}s`; + } + if (minutes > 0) { + parsedTime = `${minutes}m${parsedTime}`; + } + return parsedTime; +} + +// src/renderer/default.renderer.ts +var _DefaultRenderer = class { + constructor(tasks, options, renderHook$) { + this.tasks = tasks; + this.options = options; + this.renderHook$ = renderHook$; + this.bottomBar = {}; + this.spinner = !isUnicodeSupported() ? ["-", "\\", "|", "/"] : ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"]; + this.spinnerPosition = 0; + this.options = __spreadValues(__spreadValues({}, _DefaultRenderer.rendererOptions), this.options); + } + getTaskOptions(task) { + return __spreadValues(__spreadValues({}, _DefaultRenderer.rendererTaskOptions), task.rendererTaskOptions); + } + isBottomBar(task) { + const bottomBar = this.getTaskOptions(task).bottomBar; + return typeof bottomBar === "number" && bottomBar !== 0 || typeof bottomBar === "boolean" && bottomBar !== false; + } + hasPersistentOutput(task) { + return this.getTaskOptions(task).persistentOutput === true; + } + hasTimer(task) { + return this.getTaskOptions(task).showTimer === true; + } + getSelfOrParentOption(task, key) { + var _a2, _b, _c; + return (_c = (_a2 = task == null ? void 0 : task.rendererOptions) == null ? void 0 : _a2[key]) != null ? _c : (_b = this.options) == null ? void 0 : _b[key]; + } + getTaskTime(task) { + return colorette_default.dim(`[${parseTaskTime(task.message.duration)}]`); + } + createRender(options) { + options = __spreadValues(__spreadValues({}, { + tasks: true, + bottomBar: true, + prompt: true + }), options); + const render = []; + const renderTasks = this.multiLineRenderer(this.tasks); + const renderBottomBar = this.renderBottomBar(); + const renderPrompt = this.renderPrompt(); + if (options.tasks && (renderTasks == null ? void 0 : renderTasks.trim().length) > 0) { + render.push(renderTasks); + } + if (options.bottomBar && (renderBottomBar == null ? void 0 : renderBottomBar.trim().length) > 0) { + render.push((render.length > 0 ? import_os.EOL : "") + renderBottomBar); + } + if (options.prompt && (renderPrompt == null ? void 0 : renderPrompt.trim().length) > 0) { + render.push((render.length > 0 ? import_os.EOL : "") + renderPrompt); + } + return render.length > 0 ? render.join(import_os.EOL) : ""; + } + render() { + var _a2; + if (this.id) { + return; + } + const updateRender = () => (0, import_log_update.default)(this.createRender()); + if (!((_a2 = this.options) == null ? void 0 : _a2.lazy)) { + this.id = setInterval(() => { + this.spinnerPosition = ++this.spinnerPosition % this.spinner.length; + updateRender(); + }, 100); + } + this.renderHook$.subscribe(() => { + updateRender(); + }); + } + end() { + clearInterval(this.id); + if (this.id) { + this.id = void 0; + } + import_log_update.default.clear(); + import_log_update.default.done(); + if (!this.options.clearOutput) { + process.stdout.write(this.createRender({ prompt: false }) + import_os.EOL); + } + } + multiLineRenderer(tasks, level = 0) { + var _a2, _b; + let output = []; + for (const task of tasks) { + if (task.isEnabled()) { + if (task.hasTitle()) { + if (!(tasks.some((task2) => task2.hasFailed()) && !task.hasFailed() && task.options.exitOnError !== false && !(task.isCompleted() || task.isSkipped()))) { + if (task.hasFailed() && this.getSelfOrParentOption(task, "collapseErrors")) { + output = [ + ...output, + this.formatString(!task.hasSubtasks() && task.message.error && this.getSelfOrParentOption(task, "showErrorMessage") ? task.message.error : task.title, this.getSymbol(task), level) + ]; + } else if (task.isSkipped() && this.getSelfOrParentOption(task, "collapseSkips")) { + output = [ + ...output, + this.formatString(this.addSuffixToMessage(task.message.skip && this.getSelfOrParentOption(task, "showSkipMessage") ? task.message.skip : task.title, "SKIPPED", this.getSelfOrParentOption(task, "suffixSkips")), this.getSymbol(task), level) + ]; + } else if (task.isRetrying() && this.getSelfOrParentOption(task, "suffixRetries")) { + output = [...output, this.formatString(this.addSuffixToMessage(task.title, `RETRYING-${task.message.retry.count}`), this.getSymbol(task), level)]; + } else if (task.isCompleted() && task.hasTitle() && (this.getSelfOrParentOption(task, "showTimer") || this.hasTimer(task))) { + output = [...output, this.formatString(`${task == null ? void 0 : task.title} ${this.getTaskTime(task)}`, this.getSymbol(task), level)]; + } else { + output = [...output, this.formatString(task.title, this.getSymbol(task), level)]; + } + } else { + output = [...output, this.formatString(task.title, colorette_default.red(figures.squareSmallFilled), level)]; + } + } + if (!task.hasSubtasks() || !this.getSelfOrParentOption(task, "showSubtasks")) { + if (task.hasFailed() && this.getSelfOrParentOption(task, "collapseErrors") === false && (this.getSelfOrParentOption(task, "showErrorMessage") || !this.getSelfOrParentOption(task, "showSubtasks"))) { + output = [...output, this.dumpData(task, level, "error")]; + } else if (task.isSkipped() && this.getSelfOrParentOption(task, "collapseSkips") === false && (this.getSelfOrParentOption(task, "showSkipMessage") || !this.getSelfOrParentOption(task, "showSubtasks"))) { + output = [...output, this.dumpData(task, level, "skip")]; + } + } + if (task == null ? void 0 : task.output) { + if ((task.isPending() || task.isRetrying() || task.isRollingBack()) && task.isPrompt()) { + this.promptBar = task.output; + } else if (this.isBottomBar(task) || !task.hasTitle()) { + const data = [this.dumpData(task, -1)]; + if (!this.bottomBar[task.id]) { + this.bottomBar[task.id] = {}; + this.bottomBar[task.id].data = []; + const bottomBar = this.getTaskOptions(task).bottomBar; + if (typeof bottomBar === "boolean") { + this.bottomBar[task.id].items = 1; + } else { + this.bottomBar[task.id].items = bottomBar; + } + } + if (!((_b = (_a2 = this.bottomBar[task.id]) == null ? void 0 : _a2.data) == null ? void 0 : _b.some((element) => data.includes(element))) && !task.isSkipped()) { + this.bottomBar[task.id].data = [...this.bottomBar[task.id].data, ...data]; + } + } else if (task.isPending() || task.isRetrying() || task.isRollingBack() || this.hasPersistentOutput(task)) { + output = [...output, this.dumpData(task, level)]; + } + } + if (this.getSelfOrParentOption(task, "showSubtasks") !== false && task.hasSubtasks() && (task.isPending() || task.hasFailed() || task.isCompleted() && !task.hasTitle() || task.isCompleted() && this.getSelfOrParentOption(task, "collapse") === false && !task.subtasks.some((subtask) => subtask.rendererOptions.collapse === true) || task.subtasks.some((subtask) => subtask.rendererOptions.collapse === false) || task.subtasks.some((subtask) => subtask.hasFailed()) || task.subtasks.some((subtask) => subtask.hasRolledBack()))) { + const subtaskLevel = !task.hasTitle() ? level : level + 1; + const subtaskRender = this.multiLineRenderer(task.subtasks, subtaskLevel); + if ((subtaskRender == null ? void 0 : subtaskRender.trim()) !== "" && !task.subtasks.every((subtask) => !subtask.hasTitle())) { + output = [...output, subtaskRender]; + } + } + if (task.isCompleted() || task.hasFailed() || task.isSkipped() || task.hasRolledBack()) { + this.promptBar = null; + if (!this.hasPersistentOutput(task)) { + delete this.bottomBar[task.id]; + } + } + } + } + output = output.filter(Boolean); + if (output.length > 0) { + return output.join(import_os.EOL); + } else { + return; + } + } + renderBottomBar() { + if (Object.keys(this.bottomBar).length > 0) { + this.bottomBar = Object.keys(this.bottomBar).reduce((o, key) => { + if (!(o == null ? void 0 : o[key])) { + o[key] = {}; + } + o[key] = this.bottomBar[key]; + this.bottomBar[key].data = this.bottomBar[key].data.slice(-this.bottomBar[key].items); + o[key].data = this.bottomBar[key].data; + return o; + }, {}); + return Object.values(this.bottomBar).reduce((o, value) => o = [...o, ...value.data], []).filter(Boolean).join(import_os.EOL); + } + } + renderPrompt() { + if (this.promptBar) { + return this.promptBar; + } + } + dumpData(task, level, source = "output") { + let data; + switch (source) { + case "output": + data = task.output; + break; + case "skip": + data = task.message.skip; + break; + case "error": + data = task.message.error; + break; + } + if (task.hasTitle() && source === "error" && data === task.title) { + return; + } + if (typeof data === "string") { + return this.formatString(data, this.getSymbol(task, true), level + 1); + } + } + formatString(str, icon, level) { + if (str.trim() === "") { + return; + } + str = `${icon} ${str}`; + let parsedStr; + let columns = process.stdout.columns ? process.stdout.columns : 80; + columns = columns - level * this.options.indentation - 2; + switch (this.options.formatOutput) { + case "truncate": + parsedStr = str.split(import_os.EOL).map((s, i) => { + return (0, import_cli_truncate.default)(this.indentMultilineOutput(s, i), columns); + }); + break; + case "wrap": + parsedStr = (0, import_wrap_ansi.default)(str, columns, { hard: true }).split(import_os.EOL).map((s, i) => this.indentMultilineOutput(s, i)); + break; + default: + throw new Error("Format option for the renderer is wrong."); + } + if (this.options.removeEmptyLines) { + parsedStr = parsedStr.filter(Boolean); + } + return indentString(parsedStr.join(import_os.EOL), level * this.options.indentation); + } + indentMultilineOutput(str, i) { + return i > 0 ? indentString(str.trim(), 2) : str.trim(); + } + getSymbol(task, data = false) { + var _a2, _b, _c; + if (task.isPending() && !data) { + return ((_a2 = this.options) == null ? void 0 : _a2.lazy) || this.getSelfOrParentOption(task, "showSubtasks") !== false && task.hasSubtasks() && !task.subtasks.every((subtask) => !subtask.hasTitle()) ? colorette_default.yellow(figures.pointer) : colorette_default.yellowBright(this.spinner[this.spinnerPosition]); + } else if (task.isCompleted() && !data) { + return task.hasSubtasks() && task.subtasks.some((subtask) => subtask.hasFailed()) ? colorette_default.yellow(figures.warning) : colorette_default.green(figures.tick); + } else if (task.isRetrying() && !data) { + return ((_b = this.options) == null ? void 0 : _b.lazy) ? colorette_default.yellow(figures.warning) : colorette_default.yellow(this.spinner[this.spinnerPosition]); + } else if (task.isRollingBack() && !data) { + return ((_c = this.options) == null ? void 0 : _c.lazy) ? colorette_default.red(figures.warning) : colorette_default.red(this.spinner[this.spinnerPosition]); + } else if (task.hasRolledBack() && !data) { + return colorette_default.red(figures.arrowLeft); + } else if (task.hasFailed() && !data) { + return task.hasSubtasks() ? colorette_default.red(figures.pointer) : colorette_default.red(figures.cross); + } else if (task.isSkipped() && !data && this.getSelfOrParentOption(task, "collapseSkips") === false) { + return colorette_default.yellow(figures.warning); + } else if (task.isSkipped() && (data || this.getSelfOrParentOption(task, "collapseSkips"))) { + return colorette_default.yellow(figures.arrowDown); + } + return !data ? colorette_default.dim(figures.squareSmallFilled) : figures.pointerSmall; + } + addSuffixToMessage(message, suffix, condition) { + return (condition != null ? condition : true) ? message + colorette_default.dim(` [${suffix}]`) : message; + } +}; +var DefaultRenderer = _DefaultRenderer; +DefaultRenderer.nonTTY = false; +DefaultRenderer.rendererOptions = { + indentation: 2, + clearOutput: false, + showSubtasks: true, + collapse: true, + collapseSkips: true, + showSkipMessage: true, + suffixSkips: true, + collapseErrors: true, + showErrorMessage: true, + suffixRetries: true, + lazy: false, + showTimer: false, + removeEmptyLines: true, + formatOutput: "truncate" +}; + +// src/renderer/silent.renderer.ts +var SilentRenderer = class { + constructor(tasks, options) { + this.tasks = tasks; + this.options = options; + } + render() { + } + end() { + } +}; +SilentRenderer.nonTTY = true; + +// src/renderer/simple.renderer.ts +var import_log_update2 = require("log-update"); +var import_os2 = require("os"); +var _SimpleRenderer = class { + constructor(tasks, options) { + this.tasks = tasks; + this.options = options; + this.eventTypeRendererMap = { + ["SUBTASK" /* SUBTASK */]: (task) => { + if (task.hasTitle()) { + this.log(`${colorette_default.blue(figures.pointer)} ${task.title}`); + } + if (task.hasSubtasks()) { + this.render(task.subtasks); + } + }, + ["STATE" /* STATE */]: (task) => { + if (task.isCompleted() && task.hasTitle()) { + this.log(`${colorette_default.green(figures.tick)} ${task.title}`); + } + }, + ["DATA" /* DATA */]: (task, event) => { + if (task.isPrompt() && !String(event.data).match(/^\n$/)) { + (0, import_log_update2.stderr)(`${event.data}`); + } else { + this.log(`${figures.pointerSmall} ${event.data}`); + } + }, + ["MESSAGE" /* MESSAGE */]: (task, event) => { + if (event.data.error) { + const title = _SimpleRenderer.formatTitle(task); + this.log(`${colorette_default.red(figures.cross)}${title}: ${event.data.error}`); + } else if (event.data.skip) { + const title = _SimpleRenderer.formatTitle(task); + const skip = task.title !== event.data.skip ? `: ${event.data.skip}` : ""; + this.log(`${colorette_default.yellow(figures.arrowDown)}${title} [${colorette_default.yellow(`skipped${skip}`)}]`); + } else if (event.data.rollback) { + const title = _SimpleRenderer.formatTitle(task); + this.log(`${colorette_default.red(figures.arrowLeft)}${title}: ${event.data.rollback}`); + } else if (event.data.retry) { + const title = _SimpleRenderer.formatTitle(task); + this.log(`[${colorette_default.yellow(`${event.data.retry.count}`)}]${title}`); + } + } + }; + this.options = __spreadValues(__spreadValues({}, _SimpleRenderer.rendererOptions), options); + } + static now() { + return new Date(); + } + static formatTitle(task) { + return (task == null ? void 0 : task.title) ? ` ${task.title}` : ""; + } + log(output) { + const logOut = (msg) => { + process[this.options.output].write(msg.endsWith(import_os2.EOL) ? msg : `${msg}${import_os2.EOL}`); + }; + if (!this.options.prefixWithTimestamp) { + logOut(`${output}`); + return; + } + const now = _SimpleRenderer.now(); + const timestamp = String(now.getHours()).padStart(2, "0") + ":" + String(now.getMinutes()).padStart(2, "0") + ":" + String(now.getSeconds()).padStart(2, "0"); + logOut(`${colorette_default.dim(`[${timestamp}]`)} ${output}`); + } + end() { + } + render(tasks) { + if (tasks == null ? void 0 : tasks.length) { + tasks.forEach((task) => { + task.subscribe((event) => { + var _a2, _b; + (_b = (_a2 = this.eventTypeRendererMap)[event.type]) == null ? void 0 : _b.call(_a2, task, event); + }, this.log); + }); + } else { + this.render(this.tasks); + } + } +}; +var SimpleRenderer = _SimpleRenderer; +SimpleRenderer.nonTTY = true; +SimpleRenderer.rendererOptions = { prefixWithTimestamp: false, output: "stdout" }; + +// src/utils/logger.constants.ts +var LogLevels = /* @__PURE__ */ ((LogLevels2) => { + LogLevels2["SILENT"] = "SILENT"; + LogLevels2["FAILED"] = "FAILED"; + LogLevels2["SKIPPED"] = "SKIPPED"; + LogLevels2["SUCCESS"] = "SUCCESS"; + LogLevels2["DATA"] = "DATA"; + LogLevels2["STARTED"] = "STARTED"; + LogLevels2["TITLE"] = "TITLE"; + LogLevels2["RETRY"] = "RETRY"; + LogLevels2["ROLLBACK"] = "ROLLBACK"; + return LogLevels2; +})(LogLevels || {}); + +// src/utils/logger.ts +var Logger = class { + constructor(options) { + this.options = options; + } + fail(message) { + message = this.parseMessage("FAILED" /* FAILED */, message); + console.error(message); + } + skip(message) { + message = this.parseMessage("SKIPPED" /* SKIPPED */, message); + console.info(message); + } + success(message) { + message = this.parseMessage("SUCCESS" /* SUCCESS */, message); + console.log(message); + } + data(message) { + message = this.parseMessage("DATA" /* DATA */, message); + console.info(message); + } + start(message) { + message = this.parseMessage("STARTED" /* STARTED */, message); + console.log(message); + } + title(message) { + message = this.parseMessage("TITLE" /* TITLE */, message); + console.info(message); + } + retry(message) { + message = this.parseMessage("RETRY" /* RETRY */, message); + console.warn(message); + } + rollback(message) { + message = this.parseMessage("ROLLBACK" /* ROLLBACK */, message); + console.warn(message); + } + parseMessage(level, message) { + let multiLineMessage; + try { + multiLineMessage = message.split("\n"); + } catch { + multiLineMessage = [message]; + } + multiLineMessage = multiLineMessage.map((msg) => { + return this.logColoring({ + level, + message: msg + }); + }); + message = multiLineMessage.join("\n"); + return message; + } + logColoring({ level, message }) { + var _a2, _b, _c, _d, _e, _f, _g, _h; + let icon; + let coloring = (input) => { + return input; + }; + switch (level) { + case "FAILED" /* FAILED */: + if ((_a2 = this.options) == null ? void 0 : _a2.useIcons) { + coloring = colorette_default.red; + icon = figures.cross; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "SKIPPED" /* SKIPPED */: + if ((_b = this.options) == null ? void 0 : _b.useIcons) { + coloring = colorette_default.yellow; + icon = figures.arrowDown; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "SUCCESS" /* SUCCESS */: + if ((_c = this.options) == null ? void 0 : _c.useIcons) { + coloring = colorette_default.green; + icon = figures.tick; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "DATA" /* DATA */: + if ((_d = this.options) == null ? void 0 : _d.useIcons) { + icon = figures.arrowRight; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "STARTED" /* STARTED */: + if ((_e = this.options) == null ? void 0 : _e.useIcons) { + icon = figures.pointer; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "TITLE" /* TITLE */: + if ((_f = this.options) == null ? void 0 : _f.useIcons) { + icon = figures.checkboxOn; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "RETRY" /* RETRY */: + if ((_g = this.options) == null ? void 0 : _g.useIcons) { + coloring = colorette_default.yellow; + icon = figures.pointer; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "ROLLBACK" /* ROLLBACK */: + if ((_h = this.options) == null ? void 0 : _h.useIcons) { + coloring = colorette_default.red; + icon = figures.arrowLeft; + } else { + icon = this.wrapInBrackets(level); + } + break; + } + return coloring(`${icon} ${message}`); + } + wrapInBrackets(level) { + return `[${level}]`; + } +}; + +// src/renderer/verbose.renderer.ts +var _VerboseRenderer = class { + constructor(tasks, options) { + this.tasks = tasks; + this.options = options; + var _a2, _b, _c, _d; + if (((_a2 = this.options) == null ? void 0 : _a2.logger) && ((_b = this.options) == null ? void 0 : _b.options)) { + this.logger = new this.options.logger(this.options.options); + } else if ((_c = this.options) == null ? void 0 : _c.logger) { + this.logger = new this.options.logger(); + } else { + this.logger = new Logger({ useIcons: (_d = this.options) == null ? void 0 : _d.useIcons }); + } + this.options = __spreadValues(__spreadValues({}, _VerboseRenderer.rendererOptions), this.options); + } + render() { + this.verboseRenderer(this.tasks); + } + end() { + } + verboseRenderer(tasks) { + return tasks == null ? void 0 : tasks.forEach((task) => { + task.subscribe((event) => { + var _a2, _b, _c, _d, _e, _f, _g, _h; + if (task.isEnabled()) { + const taskTitle = task.hasTitle() ? task.title : "Task without title."; + if (event.type === "SUBTASK" /* SUBTASK */ && task.hasSubtasks()) { + this.verboseRenderer(task.subtasks); + } else if (event.type === "STATE" /* STATE */) { + if (((_a2 = this.options) == null ? void 0 : _a2.logEmptyTitle) !== false || task.hasTitle()) { + if (task.isPending()) { + this.logger.start(taskTitle); + } else if (task.isCompleted()) { + this.logger.success(taskTitle + (((_b = this.options) == null ? void 0 : _b.showTimer) && ((_c = task.message) == null ? void 0 : _c.duration) ? ` [${parseTaskTime(task.message.duration)}]` : "")); + } + } + } else if (event.type === "DATA" /* DATA */ && !!event.data) { + this.logger.data(String(event.data)); + } else if (event.type === "TITLE" /* TITLE */) { + if (((_d = this.options) == null ? void 0 : _d.logTitleChange) !== false) { + this.logger.title(String(event.data)); + } + } else if (event.type === "MESSAGE" /* MESSAGE */) { + if ((_e = event.data) == null ? void 0 : _e.error) { + this.logger.fail(String(event.data.error)); + } else if ((_f = event.data) == null ? void 0 : _f.skip) { + this.logger.skip(String(event.data.skip)); + } else if ((_g = event.data) == null ? void 0 : _g.rollback) { + this.logger.rollback(String(event.data.rollback)); + } else if ((_h = event.data) == null ? void 0 : _h.retry) { + this.logger.retry(`[${event.data.retry.count}] ` + String(taskTitle)); + } + } + } + }, (err) => { + this.logger.fail(err); + }); + }); + } +}; +var VerboseRenderer = _VerboseRenderer; +VerboseRenderer.nonTTY = true; +VerboseRenderer.rendererOptions = { + useIcons: false, + logEmptyTitle: true, + logTitleChange: true +}; + +// src/utils/renderer.ts +var renderers = { + default: DefaultRenderer, + simple: SimpleRenderer, + verbose: VerboseRenderer, + silent: SilentRenderer +}; +function isRendererSupported(renderer) { + return process.stdout.isTTY === true || renderer.nonTTY === true; +} +function getRendererClass(renderer) { + if (typeof renderer === "string") { + return renderers[renderer] || renderers.default; + } + return typeof renderer === "function" ? renderer : renderers.default; +} +function getRenderer(renderer, fallbackRenderer, fallbackCondition, silentCondition) { + let returnValue; + let ret = getRendererClass(renderer); + returnValue = { renderer: ret, nonTTY: false }; + const evaluateSilent = assertFunctionOrSelf(silentCondition); + const evaluateFallback = assertFunctionOrSelf(fallbackCondition); + if (evaluateSilent) { + ret = getRendererClass("silent"); + returnValue = { renderer: ret, nonTTY: true }; + } else if (!isRendererSupported(ret) || evaluateFallback) { + ret = getRendererClass(fallbackRenderer); + returnValue = { renderer: ret, nonTTY: true }; + } + return returnValue; +} + +// src/utils/uuid.ts +function generateUUID() { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { + const r = Math.random() * 16 || 0; + const v = c === "x" ? r : r && 3 || 8; + return v.toString(16); + }); +} + +// src/lib/task.ts +var Task = class extends import_rxjs.Subject { + constructor(listr, tasks, options, rendererOptions) { + super(); + this.listr = listr; + this.tasks = tasks; + this.options = options; + this.rendererOptions = rendererOptions; + this.message = {}; + var _a2, _b, _c, _d, _e, _f; + this.id = generateUUID(); + this.title = (_a2 = this.tasks) == null ? void 0 : _a2.title; + this.initialTitle = (_b = this.tasks) == null ? void 0 : _b.title; + this.task = this.tasks.task; + this.skip = (_d = (_c = this.tasks) == null ? void 0 : _c.skip) != null ? _d : false; + this.enabledFn = (_f = (_e = this.tasks) == null ? void 0 : _e.enabled) != null ? _f : true; + this.rendererTaskOptions = this.tasks.options; + this.renderHook$ = this.listr.renderHook$; + this.subscribe(() => { + this.renderHook$.next(); + }); + } + set state$(state) { + this.state = state; + this.next({ + type: "STATE" /* STATE */, + data: state + }); + if (this.hasSubtasks() && this.hasFailed()) { + for (const subtask of this.subtasks) { + if (subtask.state === "PENDING" /* PENDING */) { + subtask.state$ = "FAILED" /* FAILED */; + } + } + } + } + set output$(data) { + this.output = data; + this.next({ + type: "DATA" /* DATA */, + data + }); + } + set message$(data) { + this.message = __spreadValues(__spreadValues({}, this.message), data); + this.next({ + type: "MESSAGE" /* MESSAGE */, + data + }); + } + set title$(title) { + this.title = title; + this.next({ + type: "TITLE" /* TITLE */, + data: title + }); + } + async check(ctx) { + if (this.state === void 0) { + this.enabled = await assertFunctionOrSelf(this.enabledFn, ctx); + this.next({ + type: "ENABLED" /* ENABLED */, + data: this.enabled + }); + } + } + hasSubtasks() { + var _a2; + return ((_a2 = this.subtasks) == null ? void 0 : _a2.length) > 0; + } + isPending() { + return this.state === "PENDING" /* PENDING */; + } + isSkipped() { + return this.state === "SKIPPED" /* SKIPPED */; + } + isCompleted() { + return this.state === "COMPLETED" /* COMPLETED */; + } + hasFailed() { + return this.state === "FAILED" /* FAILED */; + } + isRollingBack() { + return this.state === "ROLLING_BACK" /* ROLLING_BACK */; + } + hasRolledBack() { + return this.state === "ROLLED_BACK" /* ROLLED_BACK */; + } + isRetrying() { + return this.state === "RETRY" /* RETRY */; + } + isEnabled() { + return this.enabled; + } + hasTitle() { + return typeof (this == null ? void 0 : this.title) === "string"; + } + isPrompt() { + return !!this.prompt; + } + async run(context, wrapper) { + var _a2, _b, _c, _d, _e; + const handleResult = (result) => { + if (result instanceof Listr) { + result.options = __spreadValues(__spreadValues({}, this.options), result.options); + result.rendererClass = getRenderer("silent").renderer; + result.renderHook$.subscribe(() => { + this.renderHook$.next(); + }); + this.subtasks = result.tasks; + result.err = this.listr.err; + this.next({ type: "SUBTASK" /* SUBTASK */ }); + result = result.run(context); + } else if (this.isPrompt()) { + } else if (result instanceof Promise) { + result = result.then(handleResult); + } else if (result instanceof import_stream.Readable) { + result = new Promise((resolve, reject) => { + result.on("data", (data) => { + this.output$ = data.toString(); + }); + result.on("error", (error) => reject(error)); + result.on("end", () => resolve(null)); + }); + } else if (result instanceof import_rxjs.Observable) { + result = new Promise((resolve, reject) => { + result.subscribe({ + next: (data) => { + this.output$ = data; + }, + error: reject, + complete: resolve + }); + }); + } + return result; + }; + const startTime = Date.now(); + this.state$ = "PENDING" /* PENDING */; + const skipped = await assertFunctionOrSelf(this.skip, context); + if (skipped) { + if (typeof skipped === "string") { + this.message$ = { skip: skipped }; + } else if (this.hasTitle()) { + this.message$ = { skip: this.title }; + } else { + this.message$ = { skip: "Skipped task without a title." }; + } + this.state$ = "SKIPPED" /* SKIPPED */; + return; + } + try { + const retryCount = ((_a2 = this.tasks) == null ? void 0 : _a2.retry) && ((_b = this.tasks) == null ? void 0 : _b.retry) > 0 ? this.tasks.retry + 1 : 1; + for (let retries = 1; retries <= retryCount; retries++) { + try { + await handleResult(this.task(context, wrapper)); + break; + } catch (err) { + if (retries !== retryCount) { + this.retry = { count: retries, withError: err }; + this.message$ = { retry: this.retry }; + this.title$ = this.initialTitle; + this.output = void 0; + wrapper.report(err, "WILL_RETRY" /* WILL_RETRY */); + this.state$ = "RETRY" /* RETRY */; + } else { + throw err; + } + } + } + if (this.isPending() || this.isRetrying()) { + this.message$ = { duration: Date.now() - startTime }; + this.state$ = "COMPLETED" /* COMPLETED */; + } + } catch (error) { + if (this.prompt instanceof PromptError) { + error = new Error(this.prompt.message); + } + if ((_c = this.tasks) == null ? void 0 : _c.rollback) { + wrapper.report(error, "WILL_ROLLBACK" /* WILL_ROLLBACK */); + try { + this.state$ = "ROLLING_BACK" /* ROLLING_BACK */; + await this.tasks.rollback(context, wrapper); + this.state$ = "ROLLED_BACK" /* ROLLED_BACK */; + this.message$ = { rollback: this.title }; + } catch (err) { + this.state$ = "FAILED" /* FAILED */; + wrapper.report(err, "HAS_FAILED_TO_ROLLBACK" /* HAS_FAILED_TO_ROLLBACK */); + throw err; + } + if (((_d = this.listr.options) == null ? void 0 : _d.exitAfterRollback) !== false) { + throw new Error(this.title); + } + } else { + this.state$ = "FAILED" /* FAILED */; + if (this.listr.options.exitOnError !== false && await assertFunctionOrSelf((_e = this.tasks) == null ? void 0 : _e.exitOnError, context) !== false) { + wrapper.report(error, "HAS_FAILED" /* HAS_FAILED */); + throw error; + } else if (!this.hasSubtasks()) { + wrapper.report(error, "HAS_FAILED_WITHOUT_ERROR" /* HAS_FAILED_WITHOUT_ERROR */); + } + } + } finally { + this.complete(); + } + } +}; + +// src/lib/task-wrapper.ts +var import_through = __toESM(require("through"), 1); + +// src/constants/clearline-regex.constants.ts +var CLEAR_LINE_REGEX = "(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+"; +var BELL_REGEX = /\u0007/; + +// src/utils/prompt.ts +function defaultCancelCallback(settings) { + const errorMsg = "Cancelled prompt."; + if (this instanceof TaskWrapper) { + this.task.prompt = new PromptError(errorMsg); + } else if ((settings == null ? void 0 : settings.error) !== false) { + throw new Error(errorMsg); + } else { + return errorMsg; + } +} +async function createPrompt(options, settings) { + let cancelCallback; + if (settings == null ? void 0 : settings.cancelCallback) { + cancelCallback = settings.cancelCallback; + } else { + cancelCallback = defaultCancelCallback; + } + if (!Array.isArray(options)) { + options = [__spreadProps(__spreadValues({}, options), { name: "default" })]; + } else if (options.length === 1) { + options = options.reduce((o, option) => { + return [...o, Object.assign(option, { name: "default" })]; + }, []); + } + options = options.reduce((o, option) => { + var _a2; + return [ + ...o, + Object.assign(option, { + stdout: this instanceof TaskWrapper ? (_a2 = settings == null ? void 0 : settings.stdout) != null ? _a2 : this.stdout() : process.stdout, + onCancel: cancelCallback.bind(this, settings) + }) + ]; + }, []); + let enquirer; + if (settings == null ? void 0 : settings.enquirer) { + enquirer = settings.enquirer; + } else { + try { + enquirer = new (await Promise.resolve().then(() => __toESM(require("enquirer"), 1))).default(); + } catch (e) { + this.task.prompt = new PromptError("Enquirer is a peer dependency that must be installed separately."); + throw new Error(e); + } + } + if (this instanceof TaskWrapper) { + enquirer.on("prompt", (prompt) => this.task.prompt = prompt); + enquirer.on("submit", () => this.task.prompt = void 0); + this.task.subscribe((event) => { + if (event.type === "STATE" /* STATE */ && event.data === "SKIPPED" /* SKIPPED */) { + if (this.task.prompt && !(this.task.prompt instanceof PromptError)) { + this.task.prompt.submit(); + } + } + }); + } + const response = await enquirer.prompt(options); + if (options.length === 1) { + return response.default; + } else { + return response; + } +} +function destroyPrompt(throwError = false) { + if (!this.task.prompt || this.task.prompt instanceof PromptError) { + return; + } + if (throwError) { + this.task.prompt.cancel(); + } else { + this.task.prompt.submit(); + } +} + +// src/lib/task-wrapper.ts +var TaskWrapper = class { + constructor(task, errors, options) { + this.task = task; + this.errors = errors; + this.options = options; + } + get title() { + return this.task.title; + } + set title(data) { + this.task.title$ = data; + } + get output() { + return this.task.output; + } + set output(data) { + this.task.output$ = data; + } + newListr(task, options) { + let tasks; + if (typeof task === "function") { + tasks = task(this); + } else { + tasks = task; + } + return new Listr(tasks, options, this.task); + } + report(error, type) { + var _a2, _b, _c; + if (this.task.options.collectErrors !== false) { + this.errors.push(new ListrError(error, type, this.task)); + } + this.task.message$ = { error: (_c = (_b = error.message) != null ? _b : (_a2 = this.task) == null ? void 0 : _a2.title) != null ? _c : "Task with no title." }; + } + skip(message) { + var _a2, _b; + this.task.state$ = "SKIPPED" /* SKIPPED */; + if (message) { + this.task.message$ = { skip: (_b = message != null ? message : (_a2 = this.task) == null ? void 0 : _a2.title) != null ? _b : "Task with no title." }; + } + } + isRetrying() { + return this.task.isRetrying() ? this.task.retry : { count: 0 }; + } + async prompt(options) { + var _a2; + return createPrompt.bind(this)(options, __spreadValues({}, (_a2 = this.options) == null ? void 0 : _a2.injectWrapper)); + } + cancelPrompt(throwError = false) { + return destroyPrompt.bind(this)(throwError); + } + stdout() { + return (0, import_through.default)((chunk) => { + chunk = chunk.toString(); + chunk = chunk.replace(new RegExp(CLEAR_LINE_REGEX, "gmi"), ""); + chunk = chunk.replace(new RegExp(BELL_REGEX, "gmi"), ""); + if (chunk !== "") { + this.output = chunk; + } + }); + } + run(ctx) { + return this.task.run(ctx, this); + } +}; + +// src/listr.ts +var Listr = class { + constructor(task, options, parentTask) { + this.task = task; + this.options = options; + this.parentTask = parentTask; + this.tasks = []; + this.err = []; + this.renderHook$ = new import_rxjs2.Subject(); + this.path = []; + var _a2, _b, _c; + this.options = __spreadValues(__spreadValues({}, { + concurrent: false, + renderer: "default", + nonTTYRenderer: "verbose", + exitOnError: true, + exitAfterRollback: true, + collectErrors: "minimal", + registerSignalListeners: true + }), options); + if (this.options.concurrent === true) { + this.concurrency = Infinity; + } else if (typeof this.options.concurrent === "number") { + this.concurrency = this.options.concurrent; + } else { + this.concurrency = 1; + } + const renderer = getRenderer(this.options.renderer, this.options.nonTTYRenderer, (_a2 = this.options) == null ? void 0 : _a2.rendererFallback, (_b = this.options) == null ? void 0 : _b.rendererSilent); + this.rendererClass = renderer.renderer; + if (!renderer.nonTTY) { + this.rendererClassOptions = this.options.rendererOptions; + } else { + this.rendererClassOptions = this.options.nonTTYRendererOptions; + } + this.add(task != null ? task : []); + if (parentTask) { + this.path = [...parentTask.listr.path, parentTask.title]; + } + if (this.options.registerSignalListeners) { + process.once("SIGINT", () => { + this.tasks.forEach(async (task2) => { + if (task2.isPending()) { + task2.state$ = "FAILED" /* FAILED */; + } + }); + this.renderer.end(new Error("Interrupted.")); + process.exit(127); + }).setMaxListeners(0); + } + if ((_c = this.options) == null ? void 0 : _c.disableColor) { + process.env.LISTR_DISABLE_COLOR = "1"; + } + } + add(task) { + const tasks = Array.isArray(task) ? task : [task]; + tasks.forEach((task2) => { + this.tasks.push(new Task(this, task2, this.options, __spreadValues(__spreadValues({}, this.rendererClassOptions), task2.options))); + }); + } + async run(context) { + var _a2, _b, _c; + if (!this.renderer) { + this.renderer = new this.rendererClass(this.tasks, this.rendererClassOptions, this.renderHook$); + } + this.renderer.render(); + this.ctx = (_c = (_b = (_a2 = this.options) == null ? void 0 : _a2.ctx) != null ? _b : context) != null ? _c : {}; + await this.checkAll(this.ctx); + try { + await (0, import_p_map.default)(this.tasks, async (task) => { + await task.check(this.ctx); + return this.runTask(task, this.ctx, this.err); + }, { concurrency: this.concurrency }); + this.renderer.end(); + } catch (err) { + if (this.options.exitOnError !== false) { + this.renderer.end(err); + throw err; + } + } + return this.ctx; + } + checkAll(context) { + return Promise.all(this.tasks.map((task) => task.check(context))); + } + runTask(task, context, errors) { + if (!task.isEnabled()) { + return Promise.resolve(); + } + return new TaskWrapper(task, errors, this.options).run(context); + } +}; + +// src/manager.ts +var Manager = class { + constructor(options) { + this.options = options; + this.err = []; + this.tasks = []; + } + set ctx(ctx) { + this.options.ctx = ctx; + } + add(tasks, options) { + options = __spreadValues(__spreadValues({}, this.options), options); + this.tasks = [...this.tasks, this.indent(tasks, options)]; + } + async runAll(options) { + options = __spreadValues(__spreadValues({}, this.options), options); + const ctx = await this.run(this.tasks, options); + this.tasks = []; + return ctx; + } + newListr(tasks, options) { + return new Listr(tasks, options); + } + indent(tasks, options, taskOptions) { + options = __spreadValues(__spreadValues({}, this.options), options); + let newTask; + if (typeof tasks === "function") { + newTask = __spreadProps(__spreadValues({}, taskOptions), { + task: (ctx) => this.newListr(tasks(ctx), options) + }); + } else { + newTask = __spreadProps(__spreadValues({}, taskOptions), { + task: () => this.newListr(tasks, options) + }); + } + return newTask; + } + async run(tasks, options) { + options = __spreadValues(__spreadValues({}, this.options), options); + const task = this.newListr(tasks, options); + const ctx = await task.run(); + this.err = task.err; + return ctx; + } + getRuntime(pipetime) { + return `${Math.round(Date.now() - pipetime) / 1e3}s`; + } +}; +module.exports = __toCommonJS(src_exports); +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Listr, + ListrError, + ListrErrorTypes, + ListrEventType, + ListrTaskState, + LogLevels, + Logger, + Manager, + PromptError, + createPrompt, + destroyPrompt, + figures +}); diff --git a/node_modules/listr2/dist/index.d.ts b/node_modules/listr2/dist/index.d.ts index 36f027a03..d9600d408 100644 --- a/node_modules/listr2/dist/index.d.ts +++ b/node_modules/listr2/dist/index.d.ts @@ -1,9 +1,948 @@ -export * from './listr'; -export * from './manager'; -export * from './constants/index'; -export * from './interfaces/index'; -export * from './utils/logger'; -export * from './utils/logger.constants'; -export * from './utils/prompt.interface'; -export * from './utils/prompt'; -export * from './utils/figures'; +import { Observable, Subject } from 'rxjs'; +import Enquirer from 'enquirer'; +import { Readable, Writable } from 'stream'; +import { WriteStream } from 'fs'; + +/** Type of listr internal events. */ +declare enum ListrEventType { + TITLE = "TITLE", + STATE = "STATE", + ENABLED = "ENABLED", + SUBTASK = "SUBTASK", + DATA = "DATA", + MESSAGE = "MESSAGE" +} + +/** Listr Default Context */ +declare type ListrContext = any | undefined; +/** + * ListrTask. + * + * Defines the task, conditions and options to run a specific task in the listr. + */ +interface ListrTask { + /** + * Title of the task. + * + * Give this task a title if you want to track it by name in the current renderer. + * + * Tasks without a title will hide in the default renderer and are useful for running a background instance. + * On verbose renderer, state changes from these tasks will log as 'Task without a title.' + */ + title?: string; + /** + * The task itself. + * + * Task can be a sync or async function, an Observable, or a Stream. + * Task will be executed, if the certain criteria of the state are met and whenever the time for that specific task has come. + */ + task: (ctx: Ctx, task: TaskWrapper) => void | ListrTaskResult; + /** + * Skip this task depending on the context. + * + * The function that has been passed in will be evaluated at the runtime when the task tries to initially run. + */ + skip?: boolean | string | ((ctx: Ctx) => boolean | string | Promise); + /** + * Enable a task depending on the context. + * + * The function that has been passed in will be evaluated at the initial creation of the Listr class for rendering purposes, + * as well as re-evaluated when the time for that specific task has come. + */ + enabled?: boolean | ((ctx: Ctx) => boolean | Promise); + /** + * Adds the given number of retry attempts to the task if the task fails. + */ + retry?: number; + /** + * Runs a specific event if the current task or any of the subtasks has failed. + * + * Mostly useful for rollback purposes for subtasks. + * But can also be useful whenever a task is failed and some measures have to be taken to ensure the state is not changed. + */ + rollback?: (ctx: Ctx, task: TaskWrapper) => void | ListrTaskResult; + /** + * Set exit on the error option from task-level instead of setting it for all the subtasks. + */ + exitOnError?: boolean | ((ctx: Ctx) => boolean | Promise); + /** + * Per task options, that depends on the selected renderer. + * + * These options depend on the implementation of the selected renderer. If the selected renderer has no options it will + * be displayed as never. + */ + options?: ListrGetRendererTaskOptions; +} +/** + * Options to set the behavior of this base task. + */ +interface ListrOptions { + /** + * To inject a context through this options wrapper. Context can also be defined in run time. + * + * @default {} + */ + ctx?: Ctx; + /** + * Concurrency sets how many tasks will be run at the same time in parallel. + * + * @default false > Default is to run everything synchronously. + * + * `true` will set it to `Infinity`, `false` will set it to synchronous. + * + * If you pass in a `number` it will limit it to that number. + */ + concurrent?: boolean | number; + /** + * Determine the default behavior of exiting on errors. + * + * @default true > exit on any error coming from the tasks. + */ + exitOnError?: boolean; + /** + * Determine the behavior of exiting after rollback actions. + * + * This is independent of exitOnError, since failure of a rollback can be a more critical operation comparing to + * failing a single task. + * + * @default true > exit after rolling back tasks + */ + exitAfterRollback?: boolean; + /** + * Collects errors to `ListrInstance.errors` + * + * This can take up a lot of memory, so disabling it can fix out-of-memory errors + * + * - 'full' will clone the current context and task in to the error instance + * - 'minimal' will only collect the error message and the location + * - false will collect no errors + * + * @default 'minimal' + */ + collectErrors?: false | 'minimal' | 'full'; + /** + * By default, Listr2 will track SIGINIT signal to update the renderer one last time before completely failing. + * + * @default true + */ + registerSignalListeners?: boolean; + /** + * Determine the certain condition required to use the non-TTY renderer. + * + * @default null > handled internally + */ + rendererFallback?: boolean | (() => boolean); + /** + * Determine the certain condition required to use the silent renderer. + * + * @default null > handled internally + */ + rendererSilent?: boolean | (() => boolean); + /** + * Disabling the color, useful for tests and such. + * + * @default false + */ + disableColor?: boolean; + /** + * Inject data directly to TaskWrapper. + */ + injectWrapper?: { + enquirer?: Enquirer; + }; +} +/** + * Task can be set of sync or async function, an Observable or a stream. + */ +declare type ListrTaskResult = string | Promise | Listr | Readable | NodeJS.ReadableStream | Observable; +/** + * Parent class options. + * + * Parent class has more options where you can also select the and set renderer and non-tty renderer. + * + * Any subtasks will respect those options so they will be stripped of that properties. + */ +declare type ListrBaseClassOptions = ListrOptions & ListrDefaultRendererOptions & ListrDefaultNonTTYRendererOptions; +/** + * Sub class options. + * + * Subtasks has reduced set options where the missing ones are explicitly set by the base class. + */ +declare type ListrSubClassOptions = ListrOptions & Omit, 'renderer'>; +/** The internal communication event. */ +declare type ListrEvent = { + type: Exclude; + data?: string | boolean; +} | { + type: ListrEventType.DATA; + data: string; +} | { + type: ListrEventType.MESSAGE; + data: Task['message']; +}; +/** + * Used to match event.type to ListrEvent permutations + */ +declare type ListrEventFromType = E extends { + type: infer U; +} ? T extends U ? E : never : never; + +interface BasePromptOptions { + message: string | (() => string) | (() => Promise); + initial?: boolean | number | number[] | string | (() => string) | (() => Promise); + required?: boolean; + stdin?: NodeJS.ReadStream; + stdout?: NodeJS.WriteStream; + header?: string; + footer?: string; + skip?: (value: any) => boolean | Promise; + format?: (value: any) => any | Promise; + result?: (value: any) => any | Promise; + validate?: (value: any, state: any) => boolean | Promise | string | Promise | Promise; + onSubmit?: (name: any, value: any, prompt: Enquirer.Prompt) => boolean | Promise; + onCancel?: (name: any, value: any, prompt: Enquirer.Prompt) => boolean | Promise; +} +interface BasePromptOptionsWithName extends BasePromptOptions { + name: string | (() => string); +} +interface ArrayPromptOptions extends BasePromptOptions { + choices: string[] | BasePromptOptionsWithName[]; + maxChoices?: number; + multiple?: boolean; + initial?: number | number[]; + delay?: number; + separator?: boolean; + sort?: boolean; + linebreak?: boolean; + edgeLength?: number; + align?: 'left' | 'right'; + scroll?: boolean; +} +interface BooleanPromptOptions extends BasePromptOptions { + initial?: boolean | (() => string) | (() => Promise); +} +interface StringPromptOptions extends BasePromptOptions { + initial?: string; + multiline?: boolean; +} +interface ScalePromptOptions extends ArrayPromptOptions { + scale: StringPromptOptions[]; + margin?: [number, number, number, number]; +} +interface NumberPromptOptions extends BasePromptOptions { + min?: number; + max?: number; + delay?: number; + float?: boolean; + round?: boolean; + major?: number; + minor?: number; + initial?: number; +} +interface SnippetPromptOptions extends BasePromptOptions { + newline?: string; + fields: Partial[]; + template: string; +} +interface SortPromptOptions extends BasePromptOptions { + hint?: string; + drag?: boolean; + numbered?: boolean; +} +interface SurveyPromptOptions extends ArrayPromptOptions { + scale: BasePromptOptionsWithName[]; + margin: [number, number, number, number]; +} +interface QuizPromptOptions extends ArrayPromptOptions { + correctChoice: number; +} +interface TogglePromptOptions extends BasePromptOptions { + enabled?: string; + disabled?: string; +} +/** Returns all the prompt options depending on the type selected. */ +declare type PromptOptions = Unionize<{ + [K in PromptTypes]-?: T extends true ? { + type: K; + } & PromptOptionsType & { + name: string | (() => string); + } : { + type: K; + } & PromptOptionsType; +}> | ({ + type: string; +} & T extends true ? PromptOptionsType & { + name: string | (() => string); +} : PromptOptionsType); +declare type Unionize> = { + [P in keyof T]: T[P]; +}[keyof T]; +declare type PromptTypes = 'AutoComplete' | 'BasicAuth' | 'Confirm' | 'Editable' | 'Form' | 'Input' | 'Invisible' | 'List' | 'MultiSelect' | 'Numeral' | 'Password' | 'Quiz' | 'Scale' | 'Select' | 'Snippet' | 'Sort' | 'Survey' | 'Text' | 'Toggle'; +declare type PromptOptionsType = T extends keyof PromptOptionsMap ? PromptOptionsMap[T] : T extends string ? BasePromptOptions & Record : any; +declare class PromptOptionsMap implements Record> { + AutoComplete: ArrayPromptOptions; + BasicAuth: StringPromptOptions; + Confirm: BooleanPromptOptions; + Editable: ArrayPromptOptions; + Form: ArrayPromptOptions; + Input: StringPromptOptions; + Invisible: StringPromptOptions; + List: ArrayPromptOptions; + MultiSelect: ArrayPromptOptions; + Numeral: NumberPromptOptions; + Password: StringPromptOptions; + Quiz: QuizPromptOptions; + Scale: ScalePromptOptions; + Select: ArrayPromptOptions; + Snippet: SnippetPromptOptions; + Sort: SortPromptOptions; + Survey: SurveyPromptOptions; + Text: StringPromptOptions; + Toggle: TogglePromptOptions; +} +interface PromptSettings { + error?: boolean; + cancelCallback?: (settings?: PromptSettings) => string | Error | PromptError | void; + stdout?: WriteStream | Writable; + enquirer?: Enquirer; +} +interface PromptInstance extends Omit { + submit: () => void; + cancel: (err?: string) => void; +} + +/** + * Extend the task to have more functionality while accesing from the outside. + */ +declare class TaskWrapper { + task: Task; + errors: ListrError[]; + private options; + constructor(task: Task, errors: ListrError[], options: ListrBaseClassOptions); + /** Get the title of the current task. */ + get title(): string; + /** Change the title of the current task. */ + set title(data: string); + /** Get the output from the output channel. */ + get output(): string; + /** Send a output to the output channel. */ + set output(data: string); + /** Create a new subtask with given renderer selection from the parent task. */ + newListr(task: ListrTask | ListrTask[] | ((parent: Omit) => ListrTask | ListrTask[]), options?: ListrSubClassOptions): Listr; + /** Report a error in process for error collection. */ + report(error: Error, type: ListrErrorTypes): void; + /** Skip current task. */ + skip(message?: string): void; + /** Get the number of retrying, else returns false */ + isRetrying(): Task['retry']; + /** + * Create a new Enquirer prompt using prompt options. + * + * Since process.stdout is controlled by Listr, this will passthrough all Enquirer data through internal stdout. + */ + prompt(options: PromptOptions | PromptOptions[]): Promise; + /** Cancels the current prompt attach to this task. */ + cancelPrompt(throwError?: boolean): void; + /** + * Pass stream of data to internal stdout. + * + * Since Listr2 takes control of process.stdout utilizing the default renderer, any data outputted to process.stdout + * will corupt its looks. + * + * This returns a fake stream to pass any stream inside Listr as task data. + */ + stdout(): NodeJS.WriteStream & NodeJS.WritableStream; + /** Run this task. */ + run(ctx: Ctx): Promise; +} + +/** Available task states. */ +declare enum ListrTaskState { + PENDING = "PENDING", + COMPLETED = "COMPLETED", + FAILED = "FAILED", + SKIPPED = "SKIPPED", + ROLLING_BACK = "ROLLING_BACK", + ROLLED_BACK = "ROLLED_BACK", + RETRY = "RETRY" +} + +/** + * Create a task from the given set of variables and make it runnable. + */ +declare class Task extends Subject { + listr: Listr; + tasks: ListrTask; + options: ListrOptions; + rendererOptions: ListrGetRendererOptions; + /** Unique id per task, randomly generated in the uuid v4 format */ + id: string; + /** The current state of the task. */ + state: string; + /** The task object itself, to further utilize it. */ + task: (ctx: Ctx, task: TaskWrapper) => void | ListrTaskResult; + /** Extend current task with multiple subtasks. */ + subtasks: Task[]; + /** Title of the task */ + title?: string; + /** Untouched unchanged title of the task */ + initialTitle?: string; + /** Output data from the task. */ + output?: string; + /** Skip current task. */ + skip: boolean | string | ((ctx: Ctx) => boolean | string | Promise); + /** Current retry number of the task if retrying */ + retry?: { + count: number; + withError?: any; + }; + /** + * A channel for messages. + * + * This requires a separate channel for messages like error, skip or runtime messages to further utilize in the renderers. + */ + message: { + /** Run time of the task, if it has been successfully resolved. */ + duration?: number; + /** Error message of the task, if it has been failed. */ + error?: string; + /** Skip message of the task, if it has been skipped. */ + skip?: string; + /** Rollback message of the task, if the rollback finishes */ + rollback?: string; + /** Retry messages */ + retry?: { + count: number; + withError?: any; + }; + }; + /** Per task options for the current renderer of the task. */ + rendererTaskOptions: ListrGetRendererTaskOptions; + /** This will be triggered each time a new render should happen. */ + renderHook$: Subject; + prompt: undefined | PromptInstance | PromptError; + private enabled; + private enabledFn; + constructor(listr: Listr, tasks: ListrTask, options: ListrOptions, rendererOptions: ListrGetRendererOptions); + set state$(state: ListrTaskState); + set output$(data: string); + set message$(data: Task['message']); + set title$(title: string); + /** + * A function to check whether this task should run at all via enable. + */ + check(ctx: Ctx): Promise; + /** Returns whether this task has subtasks. */ + hasSubtasks(): boolean; + /** Returns whether this task is in progress. */ + isPending(): boolean; + /** Returns whether this task is skipped. */ + isSkipped(): boolean; + /** Returns whether this task has been completed. */ + isCompleted(): boolean; + /** Returns whether this task has been failed. */ + hasFailed(): boolean; + /** Returns whether this task has an active rollback task going on. */ + isRollingBack(): boolean; + /** Returns whether the rollback action was successful. */ + hasRolledBack(): boolean; + /** Returns whether this task has an actively retrying task going on. */ + isRetrying(): boolean; + /** Returns whether enabled function resolves to true. */ + isEnabled(): boolean; + /** Returns whether this task actually has a title. */ + hasTitle(): boolean; + /** Returns whether this task has a prompt inside. */ + isPrompt(): boolean; + /** Run the current task. */ + run(context: Ctx, wrapper: TaskWrapper): Promise; +} + +/** Default updating renderer for Listr2 */ +declare class DefaultRenderer implements ListrRenderer { + tasks: Task[]; + options: typeof DefaultRenderer['rendererOptions']; + renderHook$?: Task['renderHook$']; + /** designates whether this renderer can output to a non-tty console */ + static nonTTY: boolean; + /** renderer options for the defauult renderer */ + static rendererOptions: { + /** + * indentation per level of subtask + * + * @default 2 + */ + indentation?: number; + /** + * clear all the output generated by the renderer when the task finishes its execution + * + * @default false + * @global global option that can not be temperated with subtasks + */ + clearOutput?: boolean; + /** + * show the subtasks of the current task + * + * @default true + */ + showSubtasks?: boolean; + /** + * collapse subtasks after current task completes its execution + * + * @default true + */ + collapse?: boolean; + /** + * show skip messages or show the original title of the task, this will also disable collapseSkips mode + * + * You can disable showing the skip messages, even though you passed in a message by settings this option, + * if you want to keep the original task title intact. + * + * @default true + */ + showSkipMessage?: boolean; + /** + * collapse skip messages into a single message and overwrite the task title + * + * @default true + */ + collapseSkips?: boolean; + /** + * suffix skip messages with [SKIPPED] when in collapseSkips mode + * + * @default true + */ + suffixSkips?: boolean; + /** + * shows the thrown error message or show the original title of the task, this will also disable collapseErrors mode + * You can disable showing the error messages, even though you passed in a message by settings this option, + * if you want to keep the original task title intact. + * + * @default true + */ + showErrorMessage?: boolean; + /** + * collapse error messages into a single message and overwrite the task title + * + * @default true + */ + collapseErrors?: boolean; + /** + * suffix retry messages with [RETRY-${COUNT}] when retry is enabled for a task + * + * @default true + */ + suffixRetries?: boolean; + /** + * only update through triggers from renderhook + * + * useful for tests and stuff. this will disable showing spinner and only update the screen if something else has + * happened in the task worthy to show + * + * @default false + * @global global option that can not be temperated with subtasks + */ + lazy?: boolean; + /** + * show duration for all tasks + * + * @default false + * @global global option that can not be temperated with subtasks + */ + showTimer?: boolean; + /** + * removes empty lines from the data output + * + * @default true + */ + removeEmptyLines?: boolean; + /** + * formats data output depending on your requirements. + * + * @default 'truncate' + * @global global option that can not be temperated with subtasks + */ + formatOutput?: 'truncate' | 'wrap'; + }; + /** per task options for the default renderer */ + static rendererTaskOptions: { + /** + * write task output to the bottom bar instead of the gap under the task title itself. + * useful for a stream of data. + * @default false + * + * `true` only keep 1 line of the latest data outputted by the task. + * `false` only keep 1 line of the latest data outputted by the task. + * `number` will keep designated data of the latest data outputted by the task. + */ + bottomBar?: boolean | number; + /** + * keep output after task finishes + * @default false + * + * works both for the bottom bar and the default behavior + */ + persistentOutput?: boolean; + /** + * show the task time if it was successful + */ + showTimer?: boolean; + }; + private id?; + private bottomBar; + private promptBar; + private readonly spinner; + private spinnerPosition; + constructor(tasks: Task[], options: typeof DefaultRenderer['rendererOptions'], renderHook$?: Task['renderHook$']); + getTaskOptions(task: Task): typeof DefaultRenderer['rendererTaskOptions']; + isBottomBar(task: Task): boolean; + hasPersistentOutput(task: Task): boolean; + hasTimer(task: Task): boolean; + getSelfOrParentOption(task: Task, key: T): typeof DefaultRenderer['rendererOptions'][T]; + getTaskTime(task: Task): string; + createRender(options?: { + tasks?: boolean; + bottomBar?: boolean; + prompt?: boolean; + }): string; + render(): void; + end(): void; + private multiLineRenderer; + private renderBottomBar; + private renderPrompt; + private dumpData; + private formatString; + private indentMultilineOutput; + private getSymbol; + private addSuffixToMessage; +} + +declare class SilentRenderer implements ListrRenderer { + tasks: Task[]; + options: typeof SilentRenderer['rendererOptions']; + /** designates whether this renderer can output to a non-tty console */ + static nonTTY: boolean; + /** renderer options for the silent renderer */ + static rendererOptions: never; + /** per task options for the silent renderer */ + static rendererTaskOptions: never; + constructor(tasks: Task[], options: typeof SilentRenderer['rendererOptions']); + render(): void; + end(): void; +} + +/** + * This is the default renderer which is neither verbose or updating. + * It provides short output like update renderer, but does not disturb + * stdin during execution of listr tasks + */ +declare class SimpleRenderer implements ListrRenderer { + readonly tasks: Task[]; + options: typeof SimpleRenderer['rendererOptions']; + static nonTTY: boolean; + static rendererOptions: { + /** + * if true this will add + * timestamp at the begin of the rendered line + * + * @example + * + * ```bash + * [12:33:44] ✔ Do something important + * ``` + * + * @default false + */ + prefixWithTimestamp?: boolean; + /** + * choose between process.stdout and process.stderr + * + * @default stdout + */ + output?: 'stdout' | 'stderr'; + }; + static rendererTaskOptions: never; + /** + * Event type renderer map contains functions to process different task events + */ + eventTypeRendererMap: Partial<{ + [P in ListrEventType]: (t: Task, event: ListrEventFromType

) => void; + }>; + constructor(tasks: Task[], options: typeof SimpleRenderer['rendererOptions']); + static now(): Date; + static formatTitle(task?: Task): string; + log(output?: string): void; + end(): void; + render(tasks?: Task[]): void; +} + +/** Default loglevels for the logger */ +declare enum LogLevels { + SILENT = "SILENT", + FAILED = "FAILED", + SKIPPED = "SKIPPED", + SUCCESS = "SUCCESS", + DATA = "DATA", + STARTED = "STARTED", + TITLE = "TITLE", + RETRY = "RETRY", + ROLLBACK = "ROLLBACK" +} + +/** + * Options for the logger + */ +interface LoggerOptions { + useIcons: boolean; +} + +/** + * A internal logger for using in the verbose renderer mostly. + */ +declare class Logger { + private options?; + constructor(options?: LoggerOptions); + fail(message: string): void; + skip(message: string): void; + success(message: string): void; + data(message: string): void; + start(message: string): void; + title(message: string): void; + retry(message: string): void; + rollback(message: string): void; + protected parseMessage(level: LogLevels, message: string): string; + protected logColoring({ level, message }: { + level: LogLevels; + message: string; + }): string; + private wrapInBrackets; +} + +declare class VerboseRenderer implements ListrRenderer { + tasks: Task[]; + options: typeof VerboseRenderer['rendererOptions']; + /** designates whether this renderer can output to a non-tty console */ + static nonTTY: boolean; + /** renderer options for the verbose renderer */ + static rendererOptions: ({ + /** + * useIcons instead of text for log level + * @default false + */ + useIcons?: boolean; + /** + * log tasks with empty titles + * @default true + */ + logEmptyTitle?: boolean; + /** + * log title changes + * @default true + */ + logTitleChange?: boolean; + /** + * show duration for all tasks + */ + showTimer?: boolean; + } & { + /** + * inject a custom logger + */ + logger?: new (...args: any) => Logger; + /** + * inject options to custom logger + */ + options?: any; + }); + /** per task options for the verbose renderer */ + static rendererTaskOptions: never; + private logger; + constructor(tasks: Task[], options: typeof VerboseRenderer['rendererOptions']); + render(): void; + end(): void; + private verboseRenderer; +} + +/** The default renderer value used in Listr2 applications */ +declare type ListrDefaultRendererValue = 'default'; +/** Type of default renderer */ +declare type ListrDefaultRenderer = typeof DefaultRenderer; +/** Name of default fallback renderer */ +declare type ListrFallbackRendererValue = 'verbose'; +/** Type of default fallback renderer */ +declare type ListrFallbackRenderer = typeof VerboseRenderer; +/** Silent rendere for internal usage */ +declare type ListrSilentRendererValue = 'silent'; +/** Typeof silent renderer */ +declare type ListrSilentRenderer = typeof SilentRenderer; +/** Simple renderer that simplifies things */ +declare type ListrSimpleRendererValue = 'simple'; +/** Typeof simple renderer */ +declare type ListrSimpleRenderer = typeof SimpleRenderer; +/** + * Listr2 can process either the integrated renderers as string aliases, + * or utilize a compatible style renderer that extends the ListrRenderer abstract class. + */ +declare type ListrRendererValue = ListrSilentRendererValue | ListrDefaultRendererValue | ListrSimpleRendererValue | ListrFallbackRendererValue | ListrRendererFactory; +/** + * Returns the class type from friendly names of the renderers. + */ +declare type ListrGetRendererClassFromValue = T extends ListrDefaultRendererValue ? ListrDefaultRenderer : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer : T extends ListrSilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never; +/** + * Returns the friendly names from the type of renderer classes. + */ +declare type ListrGetRendererValueFromClass = T extends DefaultRenderer ? ListrDefaultRendererValue : T extends SimpleRenderer ? ListrSimpleRendererValue : T extends VerboseRenderer ? ListrFallbackRendererValue : T extends SilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never; +/** + * Returns renderer global options depending on the renderer type. + */ +declare type ListrGetRendererOptions = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer['rendererOptions'] : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererOptions'] : T extends ListrRendererFactory ? T['rendererOptions'] : never; +/** + * Returns renderer per task options depending on the renderer type. + */ +declare type ListrGetRendererTaskOptions = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererTaskOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererTaskOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererTaskOptions'] : T extends ListrRendererFactory ? T['rendererTaskOptions'] : never; +/** Select renderer as default renderer */ +interface ListrDefaultRendererOptions { + /** the default renderer */ + renderer?: T; + /** Renderer options depending on the current renderer */ + rendererOptions?: ListrGetRendererOptions; +} +/** Select a fallback renderer to fallback to in non-tty conditions */ +interface ListrDefaultNonTTYRendererOptions { + /** the fallback renderer to fallback to on non-tty conditions */ + nonTTYRenderer?: T; + /** Renderer options depending on the current renderer */ + nonTTYRendererOptions?: ListrGetRendererOptions; +} +/** Renderer options for the base class, including setup for selecting default and fallback renderers. */ +declare type ListrRendererOptions = ListrDefaultRendererOptions & ListrDefaultNonTTYRendererOptions; +/** The bones of a listr renderer. */ +declare class ListrRenderer { + /** designate renderer global options that is specific to the current renderer */ + static rendererOptions: Record; + /** designate renderer per task options that is specific to the current renderer */ + static rendererTaskOptions: Record; + /** designate whether this renderer can work in non-tty environments */ + static nonTTY: boolean; + /** A function to what to do on render */ + render: () => void; + /** A function to what to do on end of the render */ + end: (err?: Error) => void; + /** create a new renderer */ + constructor(tasks: readonly Task[], options: typeof ListrRenderer.rendererOptions, renderHook$?: Subject); +} +/** Exported for javascript applications to extend the base renderer */ +declare class ListrBaseRenderer implements ListrRenderer { + static rendererOptions: Record; + static rendererTaskOptions: Record; + static nonTTY: boolean; + tasks: Task[]; + options: typeof ListrBaseRenderer.rendererOptions; + render: () => void; + end: (err?: Error) => void; + constructor(tasks: Task[], options: typeof ListrBaseRenderer.rendererOptions); +} +/** A renderer factory from the current type */ +declare type ListrRendererFactory = typeof ListrRenderer; +/** Supported type of renderers for each type in the listr. */ +interface SupportedRenderer { + renderer: ListrRendererFactory; + nonTTY: boolean; +} + +/** The internal error handling mechanism.. */ +declare class ListrError = Record> extends Error { + error: Error; + type: ListrErrorTypes; + task: Task; + path: string; + ctx: Ctx; + constructor(error: Error, type: ListrErrorTypes, task: Task); +} +/** + * The actual error type that is collected and to help identify where the error is triggered from. + */ +declare enum ListrErrorTypes { + /** Task has failed and will try to retry. */ + WILL_RETRY = "WILL_RETRY", + /** Task has failed and will try to rollback. */ + WILL_ROLLBACK = "WILL_ROLLBACK", + /** Task has failed, ran the rollback action but the rollback action itself has failed. */ + HAS_FAILED_TO_ROLLBACK = "HAS_FAILED_TO_ROLLBACK", + /** Task has failed. */ + HAS_FAILED = "HAS_FAILED", + /** Task has failed, but exitOnError is set to false, so will ignore this error. */ + HAS_FAILED_WITHOUT_ERROR = "HAS_FAILED_WITHOUT_ERROR" +} +/** The internal error handling mechanism for prompts only. */ +declare class PromptError extends Error { + constructor(message: string); +} + +/** + * Creates a new set of Listr2 task list. + */ +declare class Listr { + task: ListrTask> | ListrTask>[]; + options?: ListrBaseClassOptions; + parentTask?: Task; + tasks: Task>[]; + err: ListrError[]; + ctx: Ctx; + rendererClass: ListrRendererFactory; + rendererClassOptions: ListrGetRendererOptions; + renderHook$: Task['renderHook$']; + path: string[]; + private concurrency; + private renderer; + constructor(task: ListrTask> | ListrTask>[], options?: ListrBaseClassOptions, parentTask?: Task); + add(task: ListrTask> | ListrTask>[]): void; + run(context?: Ctx): Promise; + private checkAll; + private runTask; +} + +/** + * Creates a new Listr2 task manager. + * + * Useful for creating a single instace of Listr2 with pre-set settings. + */ +declare class Manager { + options?: ListrBaseClassOptions; + err: ListrError[]; + private tasks; + constructor(options?: ListrBaseClassOptions); + set ctx(ctx: Ctx); + add(tasks: ListrTask>[] | ((ctx?: InjectCtx) => ListrTask>[]), options?: ListrSubClassOptions): void; + runAll(options?: ListrBaseClassOptions): Promise; + newListr(tasks: ListrTask>[], options?: ListrBaseClassOptions): Listr; + indent(tasks: ListrTask>[] | ((ctx?: InjectCtx) => ListrTask>[]), options?: ListrBaseClassOptions, taskOptions?: Omit>, 'task'>): ListrTask>; + run(tasks: ListrTask>[], options?: ListrBaseClassOptions): Promise; + getRuntime(pipetime: number): string; +} + +/** + * Create a new prompt with Enquirer externally. + * This extends enquirer so you dont have to give a name to single prompts and such so it is also + * useful to use externally. + * @param this + * @param options + * @param settings + */ +declare function createPrompt(this: any, options: PromptOptions | PromptOptions[], settings?: PromptSettings): Promise; +declare function destroyPrompt(this: TaskWrapper, throwError?: boolean): void; + +declare const figures: { + warning: string; + cross: string; + arrowDown: string; + tick: string; + arrowRight: string; + pointer: string; + checkboxOn: string; + arrowLeft: string; + squareSmallFilled: string; + pointerSmall: string; +}; + +export { Listr, ListrBaseClassOptions, ListrBaseRenderer, ListrContext, ListrDefaultNonTTYRendererOptions, ListrDefaultRenderer, ListrDefaultRendererOptions, ListrDefaultRendererValue, ListrError, ListrErrorTypes, ListrEvent, ListrEventFromType, ListrEventType, ListrFallbackRenderer, ListrFallbackRendererValue, ListrGetRendererClassFromValue, ListrGetRendererOptions, ListrGetRendererTaskOptions, ListrGetRendererValueFromClass, ListrOptions, ListrRenderer, ListrRendererFactory, ListrRendererOptions, ListrRendererValue, ListrSilentRenderer, ListrSilentRendererValue, ListrSimpleRenderer, ListrSimpleRendererValue, ListrSubClassOptions, ListrTask, Task as ListrTaskObject, ListrTaskResult, ListrTaskState, TaskWrapper as ListrTaskWrapper, LogLevels, Logger, Manager, PromptError, PromptInstance, PromptOptions, PromptOptionsMap, PromptOptionsType, PromptSettings, PromptTypes, SupportedRenderer, Unionize, createPrompt, destroyPrompt, figures }; diff --git a/node_modules/listr2/dist/index.js b/node_modules/listr2/dist/index.js index 979399de8..d56b5d931 100644 --- a/node_modules/listr2/dist/index.js +++ b/node_modules/listr2/dist/index.js @@ -1,21 +1,1315 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./listr"), exports); -__exportStar(require("./manager"), exports); -__exportStar(require("./constants/index"), exports); -__exportStar(require("./interfaces/index"), exports); -__exportStar(require("./utils/logger"), exports); -__exportStar(require("./utils/logger.constants"), exports); -__exportStar(require("./utils/prompt.interface"), exports); -__exportStar(require("./utils/prompt"), exports); -__exportStar(require("./utils/figures"), exports); +var __create = Object.create; +var __defProp = Object.defineProperty; +var __defProps = Object.defineProperties; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); +var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] +}) : x)(function(x) { + if (typeof require !== "undefined") + return require.apply(this, arguments); + throw new Error('Dynamic require of "' + x + '" is not supported'); +}); +var __reExport = (target, module, copyDefault, desc) => { + if (module && typeof module === "object" || typeof module === "function") { + for (let key of __getOwnPropNames(module)) + if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default")) + __defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable }); + } + return target; +}; +var __toESM = (module, isNodeMode) => { + return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", !isNodeMode && module && module.__esModule ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module); +}; + +// src/listr.ts +import pMap from "p-map"; +import { Subject as Subject2 } from "rxjs"; + +// src/constants/state.constants.ts +var ListrTaskState = /* @__PURE__ */ ((ListrTaskState2) => { + ListrTaskState2["PENDING"] = "PENDING"; + ListrTaskState2["COMPLETED"] = "COMPLETED"; + ListrTaskState2["FAILED"] = "FAILED"; + ListrTaskState2["SKIPPED"] = "SKIPPED"; + ListrTaskState2["ROLLING_BACK"] = "ROLLING_BACK"; + ListrTaskState2["ROLLED_BACK"] = "ROLLED_BACK"; + ListrTaskState2["RETRY"] = "RETRY"; + return ListrTaskState2; +})(ListrTaskState || {}); + +// src/lib/task.ts +import { Observable, Subject } from "rxjs"; +import { Readable } from "stream"; + +// src/constants/event.constants.ts +var ListrEventType = /* @__PURE__ */ ((ListrEventType2) => { + ListrEventType2["TITLE"] = "TITLE"; + ListrEventType2["STATE"] = "STATE"; + ListrEventType2["ENABLED"] = "ENABLED"; + ListrEventType2["SUBTASK"] = "SUBTASK"; + ListrEventType2["DATA"] = "DATA"; + ListrEventType2["MESSAGE"] = "MESSAGE"; + return ListrEventType2; +})(ListrEventType || {}); + +// src/utils/general.ts +import rfdc from "rfdc"; +var clone = rfdc({ circles: true }); +function cloneObject(obj) { + return clone(obj); +} + +// src/interfaces/listr-error.interface.ts +var ListrError = class extends Error { + constructor(error, type, task) { + super(error.message); + this.error = error; + this.type = type; + this.task = task; + var _a2; + this.name = "ListrError"; + this.path = [...(_a2 = task.listr.path) != null ? _a2 : [], task.title].join(" > "); + if ((task == null ? void 0 : task.options.collectErrors) === "full") { + this.task = cloneObject(task); + this.ctx = cloneObject(task.listr.ctx); + } + this.stack = error == null ? void 0 : error.stack; + } +}; +var ListrErrorTypes = /* @__PURE__ */ ((ListrErrorTypes2) => { + ListrErrorTypes2["WILL_RETRY"] = "WILL_RETRY"; + ListrErrorTypes2["WILL_ROLLBACK"] = "WILL_ROLLBACK"; + ListrErrorTypes2["HAS_FAILED_TO_ROLLBACK"] = "HAS_FAILED_TO_ROLLBACK"; + ListrErrorTypes2["HAS_FAILED"] = "HAS_FAILED"; + ListrErrorTypes2["HAS_FAILED_WITHOUT_ERROR"] = "HAS_FAILED_WITHOUT_ERROR"; + return ListrErrorTypes2; +})(ListrErrorTypes || {}); +var PromptError = class extends Error { + constructor(message) { + super(message); + this.name = "PromptError"; + } +}; + +// src/utils/assert.ts +function assertFunctionOrSelf(functionOrSelf, ...args) { + if (typeof functionOrSelf === "function") { + return functionOrSelf(...args); + } else { + return functionOrSelf; + } +} + +// src/renderer/default.renderer.ts +import cliTruncate from "cli-truncate"; +import logUpdate from "log-update"; +import { EOL } from "os"; +import cliWrap from "wrap-ansi"; + +// src/utils/colorette.ts +import { createColors } from "colorette"; +var _a; +var colorette_default = createColors({ useColor: ((_a = process.env) == null ? void 0 : _a.LISTR_DISABLE_COLOR) !== "1" }); + +// src/utils/is-unicode-supported.ts +function isUnicodeSupported() { + if (process.platform !== "win32") { + return true; + } + return Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty"; +} + +// src/utils/figures.ts +var FIGURES_MAIN = { + warning: "\u26A0", + cross: "\u2716", + arrowDown: "\u2193", + tick: "\u2714", + arrowRight: "\u2192", + pointer: "\u276F", + checkboxOn: "\u2612", + arrowLeft: "\u2190", + squareSmallFilled: "\u25FC", + pointerSmall: "\u203A" +}; +var FIGURES_FALLBACK = __spreadProps(__spreadValues({}, FIGURES_MAIN), { + warning: "\u203C", + cross: "\xD7", + tick: "\u221A", + pointer: ">", + checkboxOn: "[\xD7]", + squareSmallFilled: "\u25A0" +}); +var figures = isUnicodeSupported() ? FIGURES_MAIN : FIGURES_FALLBACK; + +// src/utils/indent-string.ts +function indentString(string, count) { + return string.replace(/^(?!\s*$)/gm, " ".repeat(count)); +} + +// src/utils/parse-time.ts +function parseTaskTime(duration) { + const seconds = Math.floor(duration / 1e3); + const minutes = Math.floor(seconds / 60); + let parsedTime; + if (seconds === 0 && minutes === 0) { + parsedTime = `0.${Math.floor(duration / 100)}s`; + } + if (seconds > 0) { + parsedTime = `${seconds % 60}s`; + } + if (minutes > 0) { + parsedTime = `${minutes}m${parsedTime}`; + } + return parsedTime; +} + +// src/renderer/default.renderer.ts +var _DefaultRenderer = class { + constructor(tasks, options, renderHook$) { + this.tasks = tasks; + this.options = options; + this.renderHook$ = renderHook$; + this.bottomBar = {}; + this.spinner = !isUnicodeSupported() ? ["-", "\\", "|", "/"] : ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"]; + this.spinnerPosition = 0; + this.options = __spreadValues(__spreadValues({}, _DefaultRenderer.rendererOptions), this.options); + } + getTaskOptions(task) { + return __spreadValues(__spreadValues({}, _DefaultRenderer.rendererTaskOptions), task.rendererTaskOptions); + } + isBottomBar(task) { + const bottomBar = this.getTaskOptions(task).bottomBar; + return typeof bottomBar === "number" && bottomBar !== 0 || typeof bottomBar === "boolean" && bottomBar !== false; + } + hasPersistentOutput(task) { + return this.getTaskOptions(task).persistentOutput === true; + } + hasTimer(task) { + return this.getTaskOptions(task).showTimer === true; + } + getSelfOrParentOption(task, key) { + var _a2, _b, _c; + return (_c = (_a2 = task == null ? void 0 : task.rendererOptions) == null ? void 0 : _a2[key]) != null ? _c : (_b = this.options) == null ? void 0 : _b[key]; + } + getTaskTime(task) { + return colorette_default.dim(`[${parseTaskTime(task.message.duration)}]`); + } + createRender(options) { + options = __spreadValues(__spreadValues({}, { + tasks: true, + bottomBar: true, + prompt: true + }), options); + const render = []; + const renderTasks = this.multiLineRenderer(this.tasks); + const renderBottomBar = this.renderBottomBar(); + const renderPrompt = this.renderPrompt(); + if (options.tasks && (renderTasks == null ? void 0 : renderTasks.trim().length) > 0) { + render.push(renderTasks); + } + if (options.bottomBar && (renderBottomBar == null ? void 0 : renderBottomBar.trim().length) > 0) { + render.push((render.length > 0 ? EOL : "") + renderBottomBar); + } + if (options.prompt && (renderPrompt == null ? void 0 : renderPrompt.trim().length) > 0) { + render.push((render.length > 0 ? EOL : "") + renderPrompt); + } + return render.length > 0 ? render.join(EOL) : ""; + } + render() { + var _a2; + if (this.id) { + return; + } + const updateRender = () => logUpdate(this.createRender()); + if (!((_a2 = this.options) == null ? void 0 : _a2.lazy)) { + this.id = setInterval(() => { + this.spinnerPosition = ++this.spinnerPosition % this.spinner.length; + updateRender(); + }, 100); + } + this.renderHook$.subscribe(() => { + updateRender(); + }); + } + end() { + clearInterval(this.id); + if (this.id) { + this.id = void 0; + } + logUpdate.clear(); + logUpdate.done(); + if (!this.options.clearOutput) { + process.stdout.write(this.createRender({ prompt: false }) + EOL); + } + } + multiLineRenderer(tasks, level = 0) { + var _a2, _b; + let output = []; + for (const task of tasks) { + if (task.isEnabled()) { + if (task.hasTitle()) { + if (!(tasks.some((task2) => task2.hasFailed()) && !task.hasFailed() && task.options.exitOnError !== false && !(task.isCompleted() || task.isSkipped()))) { + if (task.hasFailed() && this.getSelfOrParentOption(task, "collapseErrors")) { + output = [ + ...output, + this.formatString(!task.hasSubtasks() && task.message.error && this.getSelfOrParentOption(task, "showErrorMessage") ? task.message.error : task.title, this.getSymbol(task), level) + ]; + } else if (task.isSkipped() && this.getSelfOrParentOption(task, "collapseSkips")) { + output = [ + ...output, + this.formatString(this.addSuffixToMessage(task.message.skip && this.getSelfOrParentOption(task, "showSkipMessage") ? task.message.skip : task.title, "SKIPPED", this.getSelfOrParentOption(task, "suffixSkips")), this.getSymbol(task), level) + ]; + } else if (task.isRetrying() && this.getSelfOrParentOption(task, "suffixRetries")) { + output = [...output, this.formatString(this.addSuffixToMessage(task.title, `RETRYING-${task.message.retry.count}`), this.getSymbol(task), level)]; + } else if (task.isCompleted() && task.hasTitle() && (this.getSelfOrParentOption(task, "showTimer") || this.hasTimer(task))) { + output = [...output, this.formatString(`${task == null ? void 0 : task.title} ${this.getTaskTime(task)}`, this.getSymbol(task), level)]; + } else { + output = [...output, this.formatString(task.title, this.getSymbol(task), level)]; + } + } else { + output = [...output, this.formatString(task.title, colorette_default.red(figures.squareSmallFilled), level)]; + } + } + if (!task.hasSubtasks() || !this.getSelfOrParentOption(task, "showSubtasks")) { + if (task.hasFailed() && this.getSelfOrParentOption(task, "collapseErrors") === false && (this.getSelfOrParentOption(task, "showErrorMessage") || !this.getSelfOrParentOption(task, "showSubtasks"))) { + output = [...output, this.dumpData(task, level, "error")]; + } else if (task.isSkipped() && this.getSelfOrParentOption(task, "collapseSkips") === false && (this.getSelfOrParentOption(task, "showSkipMessage") || !this.getSelfOrParentOption(task, "showSubtasks"))) { + output = [...output, this.dumpData(task, level, "skip")]; + } + } + if (task == null ? void 0 : task.output) { + if ((task.isPending() || task.isRetrying() || task.isRollingBack()) && task.isPrompt()) { + this.promptBar = task.output; + } else if (this.isBottomBar(task) || !task.hasTitle()) { + const data = [this.dumpData(task, -1)]; + if (!this.bottomBar[task.id]) { + this.bottomBar[task.id] = {}; + this.bottomBar[task.id].data = []; + const bottomBar = this.getTaskOptions(task).bottomBar; + if (typeof bottomBar === "boolean") { + this.bottomBar[task.id].items = 1; + } else { + this.bottomBar[task.id].items = bottomBar; + } + } + if (!((_b = (_a2 = this.bottomBar[task.id]) == null ? void 0 : _a2.data) == null ? void 0 : _b.some((element) => data.includes(element))) && !task.isSkipped()) { + this.bottomBar[task.id].data = [...this.bottomBar[task.id].data, ...data]; + } + } else if (task.isPending() || task.isRetrying() || task.isRollingBack() || this.hasPersistentOutput(task)) { + output = [...output, this.dumpData(task, level)]; + } + } + if (this.getSelfOrParentOption(task, "showSubtasks") !== false && task.hasSubtasks() && (task.isPending() || task.hasFailed() || task.isCompleted() && !task.hasTitle() || task.isCompleted() && this.getSelfOrParentOption(task, "collapse") === false && !task.subtasks.some((subtask) => subtask.rendererOptions.collapse === true) || task.subtasks.some((subtask) => subtask.rendererOptions.collapse === false) || task.subtasks.some((subtask) => subtask.hasFailed()) || task.subtasks.some((subtask) => subtask.hasRolledBack()))) { + const subtaskLevel = !task.hasTitle() ? level : level + 1; + const subtaskRender = this.multiLineRenderer(task.subtasks, subtaskLevel); + if ((subtaskRender == null ? void 0 : subtaskRender.trim()) !== "" && !task.subtasks.every((subtask) => !subtask.hasTitle())) { + output = [...output, subtaskRender]; + } + } + if (task.isCompleted() || task.hasFailed() || task.isSkipped() || task.hasRolledBack()) { + this.promptBar = null; + if (!this.hasPersistentOutput(task)) { + delete this.bottomBar[task.id]; + } + } + } + } + output = output.filter(Boolean); + if (output.length > 0) { + return output.join(EOL); + } else { + return; + } + } + renderBottomBar() { + if (Object.keys(this.bottomBar).length > 0) { + this.bottomBar = Object.keys(this.bottomBar).reduce((o, key) => { + if (!(o == null ? void 0 : o[key])) { + o[key] = {}; + } + o[key] = this.bottomBar[key]; + this.bottomBar[key].data = this.bottomBar[key].data.slice(-this.bottomBar[key].items); + o[key].data = this.bottomBar[key].data; + return o; + }, {}); + return Object.values(this.bottomBar).reduce((o, value) => o = [...o, ...value.data], []).filter(Boolean).join(EOL); + } + } + renderPrompt() { + if (this.promptBar) { + return this.promptBar; + } + } + dumpData(task, level, source = "output") { + let data; + switch (source) { + case "output": + data = task.output; + break; + case "skip": + data = task.message.skip; + break; + case "error": + data = task.message.error; + break; + } + if (task.hasTitle() && source === "error" && data === task.title) { + return; + } + if (typeof data === "string") { + return this.formatString(data, this.getSymbol(task, true), level + 1); + } + } + formatString(str, icon, level) { + if (str.trim() === "") { + return; + } + str = `${icon} ${str}`; + let parsedStr; + let columns = process.stdout.columns ? process.stdout.columns : 80; + columns = columns - level * this.options.indentation - 2; + switch (this.options.formatOutput) { + case "truncate": + parsedStr = str.split(EOL).map((s, i) => { + return cliTruncate(this.indentMultilineOutput(s, i), columns); + }); + break; + case "wrap": + parsedStr = cliWrap(str, columns, { hard: true }).split(EOL).map((s, i) => this.indentMultilineOutput(s, i)); + break; + default: + throw new Error("Format option for the renderer is wrong."); + } + if (this.options.removeEmptyLines) { + parsedStr = parsedStr.filter(Boolean); + } + return indentString(parsedStr.join(EOL), level * this.options.indentation); + } + indentMultilineOutput(str, i) { + return i > 0 ? indentString(str.trim(), 2) : str.trim(); + } + getSymbol(task, data = false) { + var _a2, _b, _c; + if (task.isPending() && !data) { + return ((_a2 = this.options) == null ? void 0 : _a2.lazy) || this.getSelfOrParentOption(task, "showSubtasks") !== false && task.hasSubtasks() && !task.subtasks.every((subtask) => !subtask.hasTitle()) ? colorette_default.yellow(figures.pointer) : colorette_default.yellowBright(this.spinner[this.spinnerPosition]); + } else if (task.isCompleted() && !data) { + return task.hasSubtasks() && task.subtasks.some((subtask) => subtask.hasFailed()) ? colorette_default.yellow(figures.warning) : colorette_default.green(figures.tick); + } else if (task.isRetrying() && !data) { + return ((_b = this.options) == null ? void 0 : _b.lazy) ? colorette_default.yellow(figures.warning) : colorette_default.yellow(this.spinner[this.spinnerPosition]); + } else if (task.isRollingBack() && !data) { + return ((_c = this.options) == null ? void 0 : _c.lazy) ? colorette_default.red(figures.warning) : colorette_default.red(this.spinner[this.spinnerPosition]); + } else if (task.hasRolledBack() && !data) { + return colorette_default.red(figures.arrowLeft); + } else if (task.hasFailed() && !data) { + return task.hasSubtasks() ? colorette_default.red(figures.pointer) : colorette_default.red(figures.cross); + } else if (task.isSkipped() && !data && this.getSelfOrParentOption(task, "collapseSkips") === false) { + return colorette_default.yellow(figures.warning); + } else if (task.isSkipped() && (data || this.getSelfOrParentOption(task, "collapseSkips"))) { + return colorette_default.yellow(figures.arrowDown); + } + return !data ? colorette_default.dim(figures.squareSmallFilled) : figures.pointerSmall; + } + addSuffixToMessage(message, suffix, condition) { + return (condition != null ? condition : true) ? message + colorette_default.dim(` [${suffix}]`) : message; + } +}; +var DefaultRenderer = _DefaultRenderer; +DefaultRenderer.nonTTY = false; +DefaultRenderer.rendererOptions = { + indentation: 2, + clearOutput: false, + showSubtasks: true, + collapse: true, + collapseSkips: true, + showSkipMessage: true, + suffixSkips: true, + collapseErrors: true, + showErrorMessage: true, + suffixRetries: true, + lazy: false, + showTimer: false, + removeEmptyLines: true, + formatOutput: "truncate" +}; + +// src/renderer/silent.renderer.ts +var SilentRenderer = class { + constructor(tasks, options) { + this.tasks = tasks; + this.options = options; + } + render() { + } + end() { + } +}; +SilentRenderer.nonTTY = true; + +// src/renderer/simple.renderer.ts +import { stderr as logUpdate2 } from "log-update"; +import { EOL as EOL2 } from "os"; +var _SimpleRenderer = class { + constructor(tasks, options) { + this.tasks = tasks; + this.options = options; + this.eventTypeRendererMap = { + ["SUBTASK" /* SUBTASK */]: (task) => { + if (task.hasTitle()) { + this.log(`${colorette_default.blue(figures.pointer)} ${task.title}`); + } + if (task.hasSubtasks()) { + this.render(task.subtasks); + } + }, + ["STATE" /* STATE */]: (task) => { + if (task.isCompleted() && task.hasTitle()) { + this.log(`${colorette_default.green(figures.tick)} ${task.title}`); + } + }, + ["DATA" /* DATA */]: (task, event) => { + if (task.isPrompt() && !String(event.data).match(/^\n$/)) { + logUpdate2(`${event.data}`); + } else { + this.log(`${figures.pointerSmall} ${event.data}`); + } + }, + ["MESSAGE" /* MESSAGE */]: (task, event) => { + if (event.data.error) { + const title = _SimpleRenderer.formatTitle(task); + this.log(`${colorette_default.red(figures.cross)}${title}: ${event.data.error}`); + } else if (event.data.skip) { + const title = _SimpleRenderer.formatTitle(task); + const skip = task.title !== event.data.skip ? `: ${event.data.skip}` : ""; + this.log(`${colorette_default.yellow(figures.arrowDown)}${title} [${colorette_default.yellow(`skipped${skip}`)}]`); + } else if (event.data.rollback) { + const title = _SimpleRenderer.formatTitle(task); + this.log(`${colorette_default.red(figures.arrowLeft)}${title}: ${event.data.rollback}`); + } else if (event.data.retry) { + const title = _SimpleRenderer.formatTitle(task); + this.log(`[${colorette_default.yellow(`${event.data.retry.count}`)}]${title}`); + } + } + }; + this.options = __spreadValues(__spreadValues({}, _SimpleRenderer.rendererOptions), options); + } + static now() { + return new Date(); + } + static formatTitle(task) { + return (task == null ? void 0 : task.title) ? ` ${task.title}` : ""; + } + log(output) { + const logOut = (msg) => { + process[this.options.output].write(msg.endsWith(EOL2) ? msg : `${msg}${EOL2}`); + }; + if (!this.options.prefixWithTimestamp) { + logOut(`${output}`); + return; + } + const now = _SimpleRenderer.now(); + const timestamp = String(now.getHours()).padStart(2, "0") + ":" + String(now.getMinutes()).padStart(2, "0") + ":" + String(now.getSeconds()).padStart(2, "0"); + logOut(`${colorette_default.dim(`[${timestamp}]`)} ${output}`); + } + end() { + } + render(tasks) { + if (tasks == null ? void 0 : tasks.length) { + tasks.forEach((task) => { + task.subscribe((event) => { + var _a2, _b; + (_b = (_a2 = this.eventTypeRendererMap)[event.type]) == null ? void 0 : _b.call(_a2, task, event); + }, this.log); + }); + } else { + this.render(this.tasks); + } + } +}; +var SimpleRenderer = _SimpleRenderer; +SimpleRenderer.nonTTY = true; +SimpleRenderer.rendererOptions = { prefixWithTimestamp: false, output: "stdout" }; + +// src/utils/logger.constants.ts +var LogLevels = /* @__PURE__ */ ((LogLevels2) => { + LogLevels2["SILENT"] = "SILENT"; + LogLevels2["FAILED"] = "FAILED"; + LogLevels2["SKIPPED"] = "SKIPPED"; + LogLevels2["SUCCESS"] = "SUCCESS"; + LogLevels2["DATA"] = "DATA"; + LogLevels2["STARTED"] = "STARTED"; + LogLevels2["TITLE"] = "TITLE"; + LogLevels2["RETRY"] = "RETRY"; + LogLevels2["ROLLBACK"] = "ROLLBACK"; + return LogLevels2; +})(LogLevels || {}); + +// src/utils/logger.ts +var Logger = class { + constructor(options) { + this.options = options; + } + fail(message) { + message = this.parseMessage("FAILED" /* FAILED */, message); + console.error(message); + } + skip(message) { + message = this.parseMessage("SKIPPED" /* SKIPPED */, message); + console.info(message); + } + success(message) { + message = this.parseMessage("SUCCESS" /* SUCCESS */, message); + console.log(message); + } + data(message) { + message = this.parseMessage("DATA" /* DATA */, message); + console.info(message); + } + start(message) { + message = this.parseMessage("STARTED" /* STARTED */, message); + console.log(message); + } + title(message) { + message = this.parseMessage("TITLE" /* TITLE */, message); + console.info(message); + } + retry(message) { + message = this.parseMessage("RETRY" /* RETRY */, message); + console.warn(message); + } + rollback(message) { + message = this.parseMessage("ROLLBACK" /* ROLLBACK */, message); + console.warn(message); + } + parseMessage(level, message) { + let multiLineMessage; + try { + multiLineMessage = message.split("\n"); + } catch { + multiLineMessage = [message]; + } + multiLineMessage = multiLineMessage.map((msg) => { + return this.logColoring({ + level, + message: msg + }); + }); + message = multiLineMessage.join("\n"); + return message; + } + logColoring({ level, message }) { + var _a2, _b, _c, _d, _e, _f, _g, _h; + let icon; + let coloring = (input) => { + return input; + }; + switch (level) { + case "FAILED" /* FAILED */: + if ((_a2 = this.options) == null ? void 0 : _a2.useIcons) { + coloring = colorette_default.red; + icon = figures.cross; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "SKIPPED" /* SKIPPED */: + if ((_b = this.options) == null ? void 0 : _b.useIcons) { + coloring = colorette_default.yellow; + icon = figures.arrowDown; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "SUCCESS" /* SUCCESS */: + if ((_c = this.options) == null ? void 0 : _c.useIcons) { + coloring = colorette_default.green; + icon = figures.tick; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "DATA" /* DATA */: + if ((_d = this.options) == null ? void 0 : _d.useIcons) { + icon = figures.arrowRight; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "STARTED" /* STARTED */: + if ((_e = this.options) == null ? void 0 : _e.useIcons) { + icon = figures.pointer; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "TITLE" /* TITLE */: + if ((_f = this.options) == null ? void 0 : _f.useIcons) { + icon = figures.checkboxOn; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "RETRY" /* RETRY */: + if ((_g = this.options) == null ? void 0 : _g.useIcons) { + coloring = colorette_default.yellow; + icon = figures.pointer; + } else { + icon = this.wrapInBrackets(level); + } + break; + case "ROLLBACK" /* ROLLBACK */: + if ((_h = this.options) == null ? void 0 : _h.useIcons) { + coloring = colorette_default.red; + icon = figures.arrowLeft; + } else { + icon = this.wrapInBrackets(level); + } + break; + } + return coloring(`${icon} ${message}`); + } + wrapInBrackets(level) { + return `[${level}]`; + } +}; + +// src/renderer/verbose.renderer.ts +var _VerboseRenderer = class { + constructor(tasks, options) { + this.tasks = tasks; + this.options = options; + var _a2, _b, _c, _d; + if (((_a2 = this.options) == null ? void 0 : _a2.logger) && ((_b = this.options) == null ? void 0 : _b.options)) { + this.logger = new this.options.logger(this.options.options); + } else if ((_c = this.options) == null ? void 0 : _c.logger) { + this.logger = new this.options.logger(); + } else { + this.logger = new Logger({ useIcons: (_d = this.options) == null ? void 0 : _d.useIcons }); + } + this.options = __spreadValues(__spreadValues({}, _VerboseRenderer.rendererOptions), this.options); + } + render() { + this.verboseRenderer(this.tasks); + } + end() { + } + verboseRenderer(tasks) { + return tasks == null ? void 0 : tasks.forEach((task) => { + task.subscribe((event) => { + var _a2, _b, _c, _d, _e, _f, _g, _h; + if (task.isEnabled()) { + const taskTitle = task.hasTitle() ? task.title : "Task without title."; + if (event.type === "SUBTASK" /* SUBTASK */ && task.hasSubtasks()) { + this.verboseRenderer(task.subtasks); + } else if (event.type === "STATE" /* STATE */) { + if (((_a2 = this.options) == null ? void 0 : _a2.logEmptyTitle) !== false || task.hasTitle()) { + if (task.isPending()) { + this.logger.start(taskTitle); + } else if (task.isCompleted()) { + this.logger.success(taskTitle + (((_b = this.options) == null ? void 0 : _b.showTimer) && ((_c = task.message) == null ? void 0 : _c.duration) ? ` [${parseTaskTime(task.message.duration)}]` : "")); + } + } + } else if (event.type === "DATA" /* DATA */ && !!event.data) { + this.logger.data(String(event.data)); + } else if (event.type === "TITLE" /* TITLE */) { + if (((_d = this.options) == null ? void 0 : _d.logTitleChange) !== false) { + this.logger.title(String(event.data)); + } + } else if (event.type === "MESSAGE" /* MESSAGE */) { + if ((_e = event.data) == null ? void 0 : _e.error) { + this.logger.fail(String(event.data.error)); + } else if ((_f = event.data) == null ? void 0 : _f.skip) { + this.logger.skip(String(event.data.skip)); + } else if ((_g = event.data) == null ? void 0 : _g.rollback) { + this.logger.rollback(String(event.data.rollback)); + } else if ((_h = event.data) == null ? void 0 : _h.retry) { + this.logger.retry(`[${event.data.retry.count}] ` + String(taskTitle)); + } + } + } + }, (err) => { + this.logger.fail(err); + }); + }); + } +}; +var VerboseRenderer = _VerboseRenderer; +VerboseRenderer.nonTTY = true; +VerboseRenderer.rendererOptions = { + useIcons: false, + logEmptyTitle: true, + logTitleChange: true +}; + +// src/utils/renderer.ts +var renderers = { + default: DefaultRenderer, + simple: SimpleRenderer, + verbose: VerboseRenderer, + silent: SilentRenderer +}; +function isRendererSupported(renderer) { + return process.stdout.isTTY === true || renderer.nonTTY === true; +} +function getRendererClass(renderer) { + if (typeof renderer === "string") { + return renderers[renderer] || renderers.default; + } + return typeof renderer === "function" ? renderer : renderers.default; +} +function getRenderer(renderer, fallbackRenderer, fallbackCondition, silentCondition) { + let returnValue; + let ret = getRendererClass(renderer); + returnValue = { renderer: ret, nonTTY: false }; + const evaluateSilent = assertFunctionOrSelf(silentCondition); + const evaluateFallback = assertFunctionOrSelf(fallbackCondition); + if (evaluateSilent) { + ret = getRendererClass("silent"); + returnValue = { renderer: ret, nonTTY: true }; + } else if (!isRendererSupported(ret) || evaluateFallback) { + ret = getRendererClass(fallbackRenderer); + returnValue = { renderer: ret, nonTTY: true }; + } + return returnValue; +} + +// src/utils/uuid.ts +function generateUUID() { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { + const r = Math.random() * 16 || 0; + const v = c === "x" ? r : r && 3 || 8; + return v.toString(16); + }); +} + +// src/lib/task.ts +var Task = class extends Subject { + constructor(listr, tasks, options, rendererOptions) { + super(); + this.listr = listr; + this.tasks = tasks; + this.options = options; + this.rendererOptions = rendererOptions; + this.message = {}; + var _a2, _b, _c, _d, _e, _f; + this.id = generateUUID(); + this.title = (_a2 = this.tasks) == null ? void 0 : _a2.title; + this.initialTitle = (_b = this.tasks) == null ? void 0 : _b.title; + this.task = this.tasks.task; + this.skip = (_d = (_c = this.tasks) == null ? void 0 : _c.skip) != null ? _d : false; + this.enabledFn = (_f = (_e = this.tasks) == null ? void 0 : _e.enabled) != null ? _f : true; + this.rendererTaskOptions = this.tasks.options; + this.renderHook$ = this.listr.renderHook$; + this.subscribe(() => { + this.renderHook$.next(); + }); + } + set state$(state) { + this.state = state; + this.next({ + type: "STATE" /* STATE */, + data: state + }); + if (this.hasSubtasks() && this.hasFailed()) { + for (const subtask of this.subtasks) { + if (subtask.state === "PENDING" /* PENDING */) { + subtask.state$ = "FAILED" /* FAILED */; + } + } + } + } + set output$(data) { + this.output = data; + this.next({ + type: "DATA" /* DATA */, + data + }); + } + set message$(data) { + this.message = __spreadValues(__spreadValues({}, this.message), data); + this.next({ + type: "MESSAGE" /* MESSAGE */, + data + }); + } + set title$(title) { + this.title = title; + this.next({ + type: "TITLE" /* TITLE */, + data: title + }); + } + async check(ctx) { + if (this.state === void 0) { + this.enabled = await assertFunctionOrSelf(this.enabledFn, ctx); + this.next({ + type: "ENABLED" /* ENABLED */, + data: this.enabled + }); + } + } + hasSubtasks() { + var _a2; + return ((_a2 = this.subtasks) == null ? void 0 : _a2.length) > 0; + } + isPending() { + return this.state === "PENDING" /* PENDING */; + } + isSkipped() { + return this.state === "SKIPPED" /* SKIPPED */; + } + isCompleted() { + return this.state === "COMPLETED" /* COMPLETED */; + } + hasFailed() { + return this.state === "FAILED" /* FAILED */; + } + isRollingBack() { + return this.state === "ROLLING_BACK" /* ROLLING_BACK */; + } + hasRolledBack() { + return this.state === "ROLLED_BACK" /* ROLLED_BACK */; + } + isRetrying() { + return this.state === "RETRY" /* RETRY */; + } + isEnabled() { + return this.enabled; + } + hasTitle() { + return typeof (this == null ? void 0 : this.title) === "string"; + } + isPrompt() { + return !!this.prompt; + } + async run(context, wrapper) { + var _a2, _b, _c, _d, _e; + const handleResult = (result) => { + if (result instanceof Listr) { + result.options = __spreadValues(__spreadValues({}, this.options), result.options); + result.rendererClass = getRenderer("silent").renderer; + result.renderHook$.subscribe(() => { + this.renderHook$.next(); + }); + this.subtasks = result.tasks; + result.err = this.listr.err; + this.next({ type: "SUBTASK" /* SUBTASK */ }); + result = result.run(context); + } else if (this.isPrompt()) { + } else if (result instanceof Promise) { + result = result.then(handleResult); + } else if (result instanceof Readable) { + result = new Promise((resolve, reject) => { + result.on("data", (data) => { + this.output$ = data.toString(); + }); + result.on("error", (error) => reject(error)); + result.on("end", () => resolve(null)); + }); + } else if (result instanceof Observable) { + result = new Promise((resolve, reject) => { + result.subscribe({ + next: (data) => { + this.output$ = data; + }, + error: reject, + complete: resolve + }); + }); + } + return result; + }; + const startTime = Date.now(); + this.state$ = "PENDING" /* PENDING */; + const skipped = await assertFunctionOrSelf(this.skip, context); + if (skipped) { + if (typeof skipped === "string") { + this.message$ = { skip: skipped }; + } else if (this.hasTitle()) { + this.message$ = { skip: this.title }; + } else { + this.message$ = { skip: "Skipped task without a title." }; + } + this.state$ = "SKIPPED" /* SKIPPED */; + return; + } + try { + const retryCount = ((_a2 = this.tasks) == null ? void 0 : _a2.retry) && ((_b = this.tasks) == null ? void 0 : _b.retry) > 0 ? this.tasks.retry + 1 : 1; + for (let retries = 1; retries <= retryCount; retries++) { + try { + await handleResult(this.task(context, wrapper)); + break; + } catch (err) { + if (retries !== retryCount) { + this.retry = { count: retries, withError: err }; + this.message$ = { retry: this.retry }; + this.title$ = this.initialTitle; + this.output = void 0; + wrapper.report(err, "WILL_RETRY" /* WILL_RETRY */); + this.state$ = "RETRY" /* RETRY */; + } else { + throw err; + } + } + } + if (this.isPending() || this.isRetrying()) { + this.message$ = { duration: Date.now() - startTime }; + this.state$ = "COMPLETED" /* COMPLETED */; + } + } catch (error) { + if (this.prompt instanceof PromptError) { + error = new Error(this.prompt.message); + } + if ((_c = this.tasks) == null ? void 0 : _c.rollback) { + wrapper.report(error, "WILL_ROLLBACK" /* WILL_ROLLBACK */); + try { + this.state$ = "ROLLING_BACK" /* ROLLING_BACK */; + await this.tasks.rollback(context, wrapper); + this.state$ = "ROLLED_BACK" /* ROLLED_BACK */; + this.message$ = { rollback: this.title }; + } catch (err) { + this.state$ = "FAILED" /* FAILED */; + wrapper.report(err, "HAS_FAILED_TO_ROLLBACK" /* HAS_FAILED_TO_ROLLBACK */); + throw err; + } + if (((_d = this.listr.options) == null ? void 0 : _d.exitAfterRollback) !== false) { + throw new Error(this.title); + } + } else { + this.state$ = "FAILED" /* FAILED */; + if (this.listr.options.exitOnError !== false && await assertFunctionOrSelf((_e = this.tasks) == null ? void 0 : _e.exitOnError, context) !== false) { + wrapper.report(error, "HAS_FAILED" /* HAS_FAILED */); + throw error; + } else if (!this.hasSubtasks()) { + wrapper.report(error, "HAS_FAILED_WITHOUT_ERROR" /* HAS_FAILED_WITHOUT_ERROR */); + } + } + } finally { + this.complete(); + } + } +}; + +// src/lib/task-wrapper.ts +import through from "through"; + +// src/constants/clearline-regex.constants.ts +var CLEAR_LINE_REGEX = "(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+"; +var BELL_REGEX = /\u0007/; + +// src/utils/prompt.ts +function defaultCancelCallback(settings) { + const errorMsg = "Cancelled prompt."; + if (this instanceof TaskWrapper) { + this.task.prompt = new PromptError(errorMsg); + } else if ((settings == null ? void 0 : settings.error) !== false) { + throw new Error(errorMsg); + } else { + return errorMsg; + } +} +async function createPrompt(options, settings) { + let cancelCallback; + if (settings == null ? void 0 : settings.cancelCallback) { + cancelCallback = settings.cancelCallback; + } else { + cancelCallback = defaultCancelCallback; + } + if (!Array.isArray(options)) { + options = [__spreadProps(__spreadValues({}, options), { name: "default" })]; + } else if (options.length === 1) { + options = options.reduce((o, option) => { + return [...o, Object.assign(option, { name: "default" })]; + }, []); + } + options = options.reduce((o, option) => { + var _a2; + return [ + ...o, + Object.assign(option, { + stdout: this instanceof TaskWrapper ? (_a2 = settings == null ? void 0 : settings.stdout) != null ? _a2 : this.stdout() : process.stdout, + onCancel: cancelCallback.bind(this, settings) + }) + ]; + }, []); + let enquirer; + if (settings == null ? void 0 : settings.enquirer) { + enquirer = settings.enquirer; + } else { + try { + enquirer = new (await Promise.resolve().then(() => __toESM(__require("enquirer"), 1))).default(); + } catch (e) { + this.task.prompt = new PromptError("Enquirer is a peer dependency that must be installed separately."); + throw new Error(e); + } + } + if (this instanceof TaskWrapper) { + enquirer.on("prompt", (prompt) => this.task.prompt = prompt); + enquirer.on("submit", () => this.task.prompt = void 0); + this.task.subscribe((event) => { + if (event.type === "STATE" /* STATE */ && event.data === "SKIPPED" /* SKIPPED */) { + if (this.task.prompt && !(this.task.prompt instanceof PromptError)) { + this.task.prompt.submit(); + } + } + }); + } + const response = await enquirer.prompt(options); + if (options.length === 1) { + return response.default; + } else { + return response; + } +} +function destroyPrompt(throwError = false) { + if (!this.task.prompt || this.task.prompt instanceof PromptError) { + return; + } + if (throwError) { + this.task.prompt.cancel(); + } else { + this.task.prompt.submit(); + } +} + +// src/lib/task-wrapper.ts +var TaskWrapper = class { + constructor(task, errors, options) { + this.task = task; + this.errors = errors; + this.options = options; + } + get title() { + return this.task.title; + } + set title(data) { + this.task.title$ = data; + } + get output() { + return this.task.output; + } + set output(data) { + this.task.output$ = data; + } + newListr(task, options) { + let tasks; + if (typeof task === "function") { + tasks = task(this); + } else { + tasks = task; + } + return new Listr(tasks, options, this.task); + } + report(error, type) { + var _a2, _b, _c; + if (this.task.options.collectErrors !== false) { + this.errors.push(new ListrError(error, type, this.task)); + } + this.task.message$ = { error: (_c = (_b = error.message) != null ? _b : (_a2 = this.task) == null ? void 0 : _a2.title) != null ? _c : "Task with no title." }; + } + skip(message) { + var _a2, _b; + this.task.state$ = "SKIPPED" /* SKIPPED */; + if (message) { + this.task.message$ = { skip: (_b = message != null ? message : (_a2 = this.task) == null ? void 0 : _a2.title) != null ? _b : "Task with no title." }; + } + } + isRetrying() { + return this.task.isRetrying() ? this.task.retry : { count: 0 }; + } + async prompt(options) { + var _a2; + return createPrompt.bind(this)(options, __spreadValues({}, (_a2 = this.options) == null ? void 0 : _a2.injectWrapper)); + } + cancelPrompt(throwError = false) { + return destroyPrompt.bind(this)(throwError); + } + stdout() { + return through((chunk) => { + chunk = chunk.toString(); + chunk = chunk.replace(new RegExp(CLEAR_LINE_REGEX, "gmi"), ""); + chunk = chunk.replace(new RegExp(BELL_REGEX, "gmi"), ""); + if (chunk !== "") { + this.output = chunk; + } + }); + } + run(ctx) { + return this.task.run(ctx, this); + } +}; + +// src/listr.ts +var Listr = class { + constructor(task, options, parentTask) { + this.task = task; + this.options = options; + this.parentTask = parentTask; + this.tasks = []; + this.err = []; + this.renderHook$ = new Subject2(); + this.path = []; + var _a2, _b, _c; + this.options = __spreadValues(__spreadValues({}, { + concurrent: false, + renderer: "default", + nonTTYRenderer: "verbose", + exitOnError: true, + exitAfterRollback: true, + collectErrors: "minimal", + registerSignalListeners: true + }), options); + if (this.options.concurrent === true) { + this.concurrency = Infinity; + } else if (typeof this.options.concurrent === "number") { + this.concurrency = this.options.concurrent; + } else { + this.concurrency = 1; + } + const renderer = getRenderer(this.options.renderer, this.options.nonTTYRenderer, (_a2 = this.options) == null ? void 0 : _a2.rendererFallback, (_b = this.options) == null ? void 0 : _b.rendererSilent); + this.rendererClass = renderer.renderer; + if (!renderer.nonTTY) { + this.rendererClassOptions = this.options.rendererOptions; + } else { + this.rendererClassOptions = this.options.nonTTYRendererOptions; + } + this.add(task != null ? task : []); + if (parentTask) { + this.path = [...parentTask.listr.path, parentTask.title]; + } + if (this.options.registerSignalListeners) { + process.once("SIGINT", () => { + this.tasks.forEach(async (task2) => { + if (task2.isPending()) { + task2.state$ = "FAILED" /* FAILED */; + } + }); + this.renderer.end(new Error("Interrupted.")); + process.exit(127); + }).setMaxListeners(0); + } + if ((_c = this.options) == null ? void 0 : _c.disableColor) { + process.env.LISTR_DISABLE_COLOR = "1"; + } + } + add(task) { + const tasks = Array.isArray(task) ? task : [task]; + tasks.forEach((task2) => { + this.tasks.push(new Task(this, task2, this.options, __spreadValues(__spreadValues({}, this.rendererClassOptions), task2.options))); + }); + } + async run(context) { + var _a2, _b, _c; + if (!this.renderer) { + this.renderer = new this.rendererClass(this.tasks, this.rendererClassOptions, this.renderHook$); + } + this.renderer.render(); + this.ctx = (_c = (_b = (_a2 = this.options) == null ? void 0 : _a2.ctx) != null ? _b : context) != null ? _c : {}; + await this.checkAll(this.ctx); + try { + await pMap(this.tasks, async (task) => { + await task.check(this.ctx); + return this.runTask(task, this.ctx, this.err); + }, { concurrency: this.concurrency }); + this.renderer.end(); + } catch (err) { + if (this.options.exitOnError !== false) { + this.renderer.end(err); + throw err; + } + } + return this.ctx; + } + checkAll(context) { + return Promise.all(this.tasks.map((task) => task.check(context))); + } + runTask(task, context, errors) { + if (!task.isEnabled()) { + return Promise.resolve(); + } + return new TaskWrapper(task, errors, this.options).run(context); + } +}; + +// src/manager.ts +var Manager = class { + constructor(options) { + this.options = options; + this.err = []; + this.tasks = []; + } + set ctx(ctx) { + this.options.ctx = ctx; + } + add(tasks, options) { + options = __spreadValues(__spreadValues({}, this.options), options); + this.tasks = [...this.tasks, this.indent(tasks, options)]; + } + async runAll(options) { + options = __spreadValues(__spreadValues({}, this.options), options); + const ctx = await this.run(this.tasks, options); + this.tasks = []; + return ctx; + } + newListr(tasks, options) { + return new Listr(tasks, options); + } + indent(tasks, options, taskOptions) { + options = __spreadValues(__spreadValues({}, this.options), options); + let newTask; + if (typeof tasks === "function") { + newTask = __spreadProps(__spreadValues({}, taskOptions), { + task: (ctx) => this.newListr(tasks(ctx), options) + }); + } else { + newTask = __spreadProps(__spreadValues({}, taskOptions), { + task: () => this.newListr(tasks, options) + }); + } + return newTask; + } + async run(tasks, options) { + options = __spreadValues(__spreadValues({}, this.options), options); + const task = this.newListr(tasks, options); + const ctx = await task.run(); + this.err = task.err; + return ctx; + } + getRuntime(pipetime) { + return `${Math.round(Date.now() - pipetime) / 1e3}s`; + } +}; +export { + Listr, + ListrError, + ListrErrorTypes, + ListrEventType, + ListrTaskState, + LogLevels, + Logger, + Manager, + PromptError, + createPrompt, + destroyPrompt, + figures +}; diff --git a/node_modules/listr2/dist/interfaces/index.d.ts b/node_modules/listr2/dist/interfaces/index.d.ts deleted file mode 100644 index 56b002951..000000000 --- a/node_modules/listr2/dist/interfaces/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './listr.interface'; -export * from './listr-error.interface'; -export * from './task.interface'; -export * from './renderer.interface'; diff --git a/node_modules/listr2/dist/interfaces/index.js b/node_modules/listr2/dist/interfaces/index.js deleted file mode 100644 index 48686ff06..000000000 --- a/node_modules/listr2/dist/interfaces/index.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./listr.interface"), exports); -__exportStar(require("./listr-error.interface"), exports); -__exportStar(require("./task.interface"), exports); -__exportStar(require("./renderer.interface"), exports); diff --git a/node_modules/listr2/dist/interfaces/listr-error.interface.d.ts b/node_modules/listr2/dist/interfaces/listr-error.interface.d.ts deleted file mode 100644 index 869280736..000000000 --- a/node_modules/listr2/dist/interfaces/listr-error.interface.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ListrRendererFactory } from './renderer.interface'; -import { Task } from '../lib/task'; -/** The internal error handling mechanism.. */ -export declare class ListrError = Record> extends Error { - error: Error; - type?: ListrErrorTypes; - ctx?: Ctx; - task?: Task; - constructor(error: Error, type?: ListrErrorTypes, ctx?: Ctx, task?: Task); -} -/** - * The actual error type that is collected and to help identify where the error is triggered from. - */ -export declare enum ListrErrorTypes { - /** Task has failed and will try to retry. */ - WILL_RETRY = "WILL_RETRY", - /** Task has failed and will try to rollback. */ - WILL_ROLLBACK = "WILL_ROLLBACK", - /** Task has failed, ran the rollback action but the rollback action itself has failed. */ - HAS_FAILED_TO_ROLLBACK = "HAS_FAILED_TO_ROLLBACK", - /** Task has failed. */ - HAS_FAILED = "HAS_FAILED", - /** Task has failed, but exitOnError is set to false, so will ignore this error. */ - HAS_FAILED_WITHOUT_ERROR = "HAS_FAILED_WITHOUT_ERROR" -} -/** The internal error handling mechanism for prompts only. */ -export declare class PromptError extends Error { - constructor(message: string); -} diff --git a/node_modules/listr2/dist/interfaces/listr-error.interface.js b/node_modules/listr2/dist/interfaces/listr-error.interface.js deleted file mode 100644 index c4d29a399..000000000 --- a/node_modules/listr2/dist/interfaces/listr-error.interface.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PromptError = exports.ListrErrorTypes = exports.ListrError = void 0; -/** The internal error handling mechanism.. */ -class ListrError extends Error { - constructor(error, type, ctx, task) { - super(error.message); - this.error = error; - this.type = type; - this.ctx = ctx; - this.task = task; - this.stack = error === null || error === void 0 ? void 0 : error.stack; - this.name = 'ListrError'; - } -} -exports.ListrError = ListrError; -/** - * The actual error type that is collected and to help identify where the error is triggered from. - */ -var ListrErrorTypes; -(function (ListrErrorTypes) { - /** Task has failed and will try to retry. */ - ListrErrorTypes["WILL_RETRY"] = "WILL_RETRY"; - /** Task has failed and will try to rollback. */ - ListrErrorTypes["WILL_ROLLBACK"] = "WILL_ROLLBACK"; - /** Task has failed, ran the rollback action but the rollback action itself has failed. */ - ListrErrorTypes["HAS_FAILED_TO_ROLLBACK"] = "HAS_FAILED_TO_ROLLBACK"; - /** Task has failed. */ - ListrErrorTypes["HAS_FAILED"] = "HAS_FAILED"; - /** Task has failed, but exitOnError is set to false, so will ignore this error. */ - ListrErrorTypes["HAS_FAILED_WITHOUT_ERROR"] = "HAS_FAILED_WITHOUT_ERROR"; -})(ListrErrorTypes = exports.ListrErrorTypes || (exports.ListrErrorTypes = {})); -/** The internal error handling mechanism for prompts only. */ -class PromptError extends Error { - constructor(message) { - super(message); - this.name = 'PromptError'; - } -} -exports.PromptError = PromptError; diff --git a/node_modules/listr2/dist/interfaces/listr.interface.d.ts b/node_modules/listr2/dist/interfaces/listr.interface.d.ts deleted file mode 100644 index 7fec7fca1..000000000 --- a/node_modules/listr2/dist/interfaces/listr.interface.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -/// -import type * as Enquirer from 'enquirer'; -import type { Observable } from 'rxjs'; -import { Readable } from 'stream'; -import { ListrDefaultNonTTYRendererOptions, ListrDefaultRendererOptions, ListrDefaultRendererValue, ListrFallbackRendererValue, ListrGetRendererTaskOptions, ListrRendererFactory, ListrRendererValue } from './renderer.interface'; -import { ListrEventType } from '../constants/event.constants'; -import { Task } from '../lib/task'; -import { TaskWrapper } from '../lib/task-wrapper'; -import { Listr } from '../listr'; -/** Listr Default Context */ -export declare type ListrContext = any | undefined; -/** - * ListrTask. - * - * Defines the task, conditions and options to run a specific task in the listr. - */ -export interface ListrTask { - /** - * Title of the task. - * - * Give this task a title if you want to track it by name in the current renderer. - * - * Tasks without a title will hide in the default renderer and are useful for running a background instance. - * On verbose renderer, state changes from these tasks will log as 'Task without a title.' - */ - title?: string; - /** - * The task itself. - * - * Task can be a sync or async function, an Observable, or a Stream. - * Task will be executed, if the certain criteria of the state are met and whenever the time for that specific task has come. - */ - task: (ctx: Ctx, task: TaskWrapper) => void | ListrTaskResult; - /** - * Skip this task depending on the context. - * - * The function that has been passed in will be evaluated at the runtime when the task tries to initially run. - */ - skip?: boolean | string | ((ctx: Ctx) => boolean | string | Promise); - /** - * Enable a task depending on the context. - * - * The function that has been passed in will be evaluated at the initial creation of the Listr class for rendering purposes, - * as well as re-evaluated when the time for that specific task has come. - */ - enabled?: boolean | ((ctx: Ctx) => boolean | Promise); - /** - * Adds the given number of retry attempts to the task if the task fails. - */ - retry?: number; - /** - * Runs a specific event if the current task or any of the subtasks has failed. - * - * Mostly useful for rollback purposes for subtasks. - * But can also be useful whenever a task is failed and some measures have to be taken to ensure the state is not changed. - */ - rollback?: (ctx: Ctx, task: TaskWrapper) => void | ListrTaskResult; - /** - * Set exit on the error option from task-level instead of setting it for all the subtasks. - */ - exitOnError?: boolean | ((ctx: Ctx) => boolean | Promise); - /** - * Per task options, that depends on the selected renderer. - * - * These options depend on the implementation of the selected renderer. If the selected renderer has no options it will - * be displayed as never. - */ - options?: ListrGetRendererTaskOptions; -} -/** - * Options to set the behavior of this base task. - */ -export interface ListrOptions { - /** - * To inject a context through this options wrapper. Context can also be defined in run time. - * - * @default {} - */ - ctx?: Ctx; - /** - * Concurrency sets how many tasks will be run at the same time in parallel. - * - * @default false > Default is to run everything synchronously. - * - * `true` will set it to `Infinity`, `false` will set it to synchronous. - * - * If you pass in a `number` it will limit it to that number. - */ - concurrent?: boolean | number; - /** - * Determine the default behavior of exiting on errors. - * - * @default true > exit on any error coming from the tasks. - */ - exitOnError?: boolean; - /** - * Determine the behavior of exiting after rollback actions. - * - * This is independent of exitOnError, since failure of a rollback can be a more critical operation comparing to - * failing a single task. - * - * @default true > exit after rolling back tasks - */ - exitAfterRollback?: boolean; - /** - * By default, Listr2 will track SIGINIT signal to update the renderer one last time before completely failing. - * - * @default true - */ - registerSignalListeners?: boolean; - /** - * Determine the certain condition required to use the non-TTY renderer. - * - * @default null > handled internally - */ - rendererFallback?: boolean | (() => boolean); - /** - * Determine the certain condition required to use the silent renderer. - * - * @default null > handled internally - */ - rendererSilent?: boolean | (() => boolean); - /** - * Disabling the color, useful for tests and such. - * - * @default false - */ - disableColor?: boolean; - /** - * Inject data directly to TaskWrapper. - */ - injectWrapper?: { - enquirer?: Enquirer; - }; -} -/** - * Task can be set of sync or async function, an Observable or a stream. - */ -export declare type ListrTaskResult = string | Promise | Listr | Readable | NodeJS.ReadableStream | Observable; -/** - * Parent class options. - * - * Parent class has more options where you can also select the and set renderer and non-tty renderer. - * - * Any subtasks will respect those options so they will be stripped of that properties. - */ -export declare type ListrBaseClassOptions = ListrOptions & ListrDefaultRendererOptions & ListrDefaultNonTTYRendererOptions; -/** - * Sub class options. - * - * Subtasks has reduced set options where the missing ones are explicitly set by the base class. - */ -export declare type ListrSubClassOptions = ListrOptions & Omit, 'renderer'>; -/** The internal communication event. */ -export declare type ListrEvent = { - type: Exclude; - data?: string | boolean; -} | { - type: ListrEventType.DATA; - data: string; -} | { - type: ListrEventType.MESSAGE; - data: Task['message']; -}; -/** - * Used to match event.type to ListrEvent permutations - */ -export declare type ListrEventFromType = E extends { - type: infer U; -} ? T extends U ? E : never : never; diff --git a/node_modules/listr2/dist/interfaces/listr.interface.js b/node_modules/listr2/dist/interfaces/listr.interface.js deleted file mode 100644 index c8ad2e549..000000000 --- a/node_modules/listr2/dist/interfaces/listr.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/listr2/dist/interfaces/renderer.interface.d.ts b/node_modules/listr2/dist/interfaces/renderer.interface.d.ts deleted file mode 100644 index de7a71651..000000000 --- a/node_modules/listr2/dist/interfaces/renderer.interface.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Subject } from 'rxjs'; -import { Task } from '../lib/task'; -import { DefaultRenderer } from '../renderer/default.renderer'; -import { SilentRenderer } from '../renderer/silent.renderer'; -import { SimpleRenderer } from '../renderer/simple.renderer'; -import { VerboseRenderer } from '../renderer/verbose.renderer'; -/** The default renderer value used in Listr2 applications */ -export declare type ListrDefaultRendererValue = 'default'; -/** Type of default renderer */ -export declare type ListrDefaultRenderer = typeof DefaultRenderer; -/** Name of default fallback renderer */ -export declare type ListrFallbackRendererValue = 'verbose'; -/** Type of default fallback renderer */ -export declare type ListrFallbackRenderer = typeof VerboseRenderer; -/** Silent rendere for internal usage */ -export declare type ListrSilentRendererValue = 'silent'; -/** Typeof silent renderer */ -export declare type ListrSilentRenderer = typeof SilentRenderer; -/** Simple renderer that simplifies things */ -export declare type ListrSimpleRendererValue = 'simple'; -/** Typeof simple renderer */ -export declare type ListrSimpleRenderer = typeof SimpleRenderer; -/** - * Listr2 can process either the integrated renderers as string aliases, - * or utilize a compatible style renderer that extends the ListrRenderer abstract class. - */ -export declare type ListrRendererValue = ListrSilentRendererValue | ListrDefaultRendererValue | ListrSimpleRendererValue | ListrFallbackRendererValue | ListrRendererFactory; -/** - * Returns the class type from friendly names of the renderers. - */ -export declare type ListrGetRendererClassFromValue = T extends ListrDefaultRendererValue ? ListrDefaultRenderer : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer : T extends ListrSilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never; -/** - * Returns the friendly names from the type of renderer classes. - */ -export declare type ListrGetRendererValueFromClass = T extends DefaultRenderer ? ListrDefaultRendererValue : T extends SimpleRenderer ? ListrSimpleRendererValue : T extends VerboseRenderer ? ListrFallbackRendererValue : T extends SilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never; -/** - * Returns renderer global options depending on the renderer type. - */ -export declare type ListrGetRendererOptions = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer['rendererOptions'] : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererOptions'] : T extends ListrRendererFactory ? T['rendererOptions'] : never; -/** - * Returns renderer per task options depending on the renderer type. - */ -export declare type ListrGetRendererTaskOptions = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererTaskOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererTaskOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererTaskOptions'] : T extends ListrRendererFactory ? T['rendererTaskOptions'] : never; -/** Select renderer as default renderer */ -export interface ListrDefaultRendererOptions { - /** the default renderer */ - renderer?: T; - /** Renderer options depending on the current renderer */ - rendererOptions?: ListrGetRendererOptions; -} -/** Select a fallback renderer to fallback to in non-tty conditions */ -export interface ListrDefaultNonTTYRendererOptions { - /** the fallback renderer to fallback to on non-tty conditions */ - nonTTYRenderer?: T; - /** Renderer options depending on the current renderer */ - nonTTYRendererOptions?: ListrGetRendererOptions; -} -/** Renderer options for the base class, including setup for selecting default and fallback renderers. */ -export declare type ListrRendererOptions = ListrDefaultRendererOptions & ListrDefaultNonTTYRendererOptions; -/** The bones of a listr renderer. */ -export declare class ListrRenderer { - /** designate renderer global options that is specific to the current renderer */ - static rendererOptions: Record; - /** designate renderer per task options that is specific to the current renderer */ - static rendererTaskOptions: Record; - /** designate whether this renderer can work in non-tty environments */ - static nonTTY: boolean; - /** A function to what to do on render */ - render: () => void; - /** A function to what to do on end of the render */ - end: (err?: Error) => void; - /** create a new renderer */ - constructor(tasks: readonly Task[], options: typeof ListrRenderer.rendererOptions, renderHook$?: Subject); -} -/** Exported for javascript applications to extend the base renderer */ -export declare class ListrBaseRenderer implements ListrRenderer { - static rendererOptions: Record; - static rendererTaskOptions: Record; - static nonTTY: boolean; - tasks: Task[]; - options: typeof ListrBaseRenderer.rendererOptions; - render: () => void; - end: (err?: Error) => void; - constructor(tasks: Task[], options: typeof ListrBaseRenderer.rendererOptions); -} -/** A renderer factory from the current type */ -export declare type ListrRendererFactory = typeof ListrRenderer; -/** Supported type of renderers for each type in the listr. */ -export interface SupportedRenderer { - renderer: ListrRendererFactory; - nonTTY: boolean; -} diff --git a/node_modules/listr2/dist/interfaces/renderer.interface.js b/node_modules/listr2/dist/interfaces/renderer.interface.js deleted file mode 100644 index c8ad2e549..000000000 --- a/node_modules/listr2/dist/interfaces/renderer.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/listr2/dist/interfaces/task.interface.d.ts b/node_modules/listr2/dist/interfaces/task.interface.d.ts deleted file mode 100644 index f1b24a773..000000000 --- a/node_modules/listr2/dist/interfaces/task.interface.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { Task } from '../lib/task'; -import type { TaskWrapper } from '../lib/task-wrapper'; -export { Task as ListrTaskObject }; -export { TaskWrapper as ListrTaskWrapper }; diff --git a/node_modules/listr2/dist/interfaces/task.interface.js b/node_modules/listr2/dist/interfaces/task.interface.js deleted file mode 100644 index c8ad2e549..000000000 --- a/node_modules/listr2/dist/interfaces/task.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/listr2/dist/lib/task-wrapper.d.ts b/node_modules/listr2/dist/lib/task-wrapper.d.ts deleted file mode 100644 index 3776bc6f9..000000000 --- a/node_modules/listr2/dist/lib/task-wrapper.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/// -import { ListrError, ListrErrorTypes } from '../interfaces/listr-error.interface'; -import { ListrBaseClassOptions, ListrSubClassOptions, ListrTask } from '../interfaces/listr.interface'; -import { ListrRendererFactory } from '../interfaces/renderer.interface'; -import { Task } from './task'; -import { Listr } from '../listr'; -import { PromptOptions } from '../utils/prompt.interface'; -/** - * Extend the task to have more functionality while accesing from the outside. - */ -export declare class TaskWrapper { - task: Task; - errors: ListrError[]; - private options; - constructor(task: Task, errors: ListrError[], options: ListrBaseClassOptions); - /** Change the title of the current task. */ - set title(data: string); - /** Get the title of the current task. */ - get title(): string; - /** Send a output to the output channel. */ - set output(data: string); - /** Get the output from the output channel. */ - get output(): string; - /** Create a new subtask with given renderer selection from the parent task. */ - newListr(task: ListrTask | ListrTask[] | ((parent: Omit) => ListrTask | ListrTask[]), options?: ListrSubClassOptions): Listr; - /** Report a error in process for error collection. */ - report(error: Error, type: ListrErrorTypes): void; - /** Skip current task. */ - skip(message?: string): void; - /** Get the number of retrying, else returns false */ - isRetrying(): Task['retry']; - /** - * Create a new Enquirer prompt using prompt options. - * - * Since process.stdout is controlled by Listr, this will passthrough all Enquirer data through internal stdout. - */ - prompt(options: PromptOptions | PromptOptions[]): Promise; - /** Cancels the current prompt attach to this task. */ - cancelPrompt(throwError?: boolean): void; - /** - * Pass stream of data to internal stdout. - * - * Since Listr2 takes control of process.stdout utilizing the default renderer, any data outputted to process.stdout - * will corupt its looks. - * - * This returns a fake stream to pass any stream inside Listr as task data. - */ - stdout(): NodeJS.WriteStream & NodeJS.WritableStream; - /** Run this task. */ - run(ctx: Ctx): Promise; -} diff --git a/node_modules/listr2/dist/lib/task-wrapper.js b/node_modules/listr2/dist/lib/task-wrapper.js deleted file mode 100644 index 92be7df58..000000000 --- a/node_modules/listr2/dist/lib/task-wrapper.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TaskWrapper = void 0; -const through = require("through"); -const clearline_regex_constants_1 = require("../constants/clearline-regex.constants"); -const state_constants_1 = require("../constants/state.constants"); -const listr_error_interface_1 = require("../interfaces/listr-error.interface"); -const listr_1 = require("../listr"); -const general_1 = require("../utils/general"); -const prompt_1 = require("../utils/prompt"); -/** - * Extend the task to have more functionality while accesing from the outside. - */ -class TaskWrapper { - constructor(task, errors, options) { - this.task = task; - this.errors = errors; - this.options = options; - } - /** Change the title of the current task. */ - set title(data) { - this.task.title$ = data; - } - /** Get the title of the current task. */ - get title() { - return this.task.title; - } - /** Send a output to the output channel. */ - set output(data) { - this.task.output$ = data; - } - /** Get the output from the output channel. */ - get output() { - return this.task.output; - } - /** Create a new subtask with given renderer selection from the parent task. */ - newListr(task, options) { - let tasks; - if (typeof task === 'function') { - tasks = task(this); - } - else { - tasks = task; - } - return new listr_1.Listr(tasks, options); - } - /** Report a error in process for error collection. */ - report(error, type) { - var _a, _b, _c; - this.errors.push(new listr_error_interface_1.ListrError(error, type, (0, general_1.cloneObject)(this.task.listr.ctx), (0, general_1.cloneObject)(this.task))); - this.task.message$ = { error: (_c = (_a = error.message) !== null && _a !== void 0 ? _a : (_b = this.task) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : 'Task with no title.' }; - } - /** Skip current task. */ - skip(message) { - var _a, _b; - this.task.state$ = state_constants_1.ListrTaskState.SKIPPED; - if (message) { - this.task.message$ = { skip: (_b = message !== null && message !== void 0 ? message : (_a = this.task) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : 'Task with no title.' }; - } - } - /** Get the number of retrying, else returns false */ - isRetrying() { - return this.task.isRetrying() ? this.task.retry : { count: 0 }; - } - /** - * Create a new Enquirer prompt using prompt options. - * - * Since process.stdout is controlled by Listr, this will passthrough all Enquirer data through internal stdout. - */ - async prompt(options) { - var _a; - return prompt_1.createPrompt.bind(this)(options, { ...(_a = this.options) === null || _a === void 0 ? void 0 : _a.injectWrapper }); - } - /** Cancels the current prompt attach to this task. */ - cancelPrompt(throwError = false) { - return prompt_1.destroyPrompt.bind(this)(throwError); - } - /** - * Pass stream of data to internal stdout. - * - * Since Listr2 takes control of process.stdout utilizing the default renderer, any data outputted to process.stdout - * will corupt its looks. - * - * This returns a fake stream to pass any stream inside Listr as task data. - */ - stdout() { - return through((chunk) => { - chunk = chunk.toString(); - chunk = chunk.replace(new RegExp(clearline_regex_constants_1.CLEAR_LINE_REGEX, 'gmi'), ''); - chunk = chunk.replace(new RegExp(clearline_regex_constants_1.BELL_REGEX, 'gmi'), ''); - if (chunk !== '') { - this.output = chunk; - } - }); - } - /** Run this task. */ - run(ctx) { - return this.task.run(ctx, this); - } -} -exports.TaskWrapper = TaskWrapper; diff --git a/node_modules/listr2/dist/lib/task.d.ts b/node_modules/listr2/dist/lib/task.d.ts deleted file mode 100644 index 4bf3a06da..000000000 --- a/node_modules/listr2/dist/lib/task.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Subject } from 'rxjs'; -import { TaskWrapper } from './task-wrapper'; -import { ListrTaskState } from '../constants/state.constants'; -import { PromptError } from '../interfaces/listr-error.interface'; -import { ListrEvent, ListrOptions, ListrTask, ListrTaskResult } from '../interfaces/listr.interface'; -import { ListrGetRendererOptions, ListrGetRendererTaskOptions, ListrRendererFactory } from '../interfaces/renderer.interface'; -import { Listr } from '../listr'; -import { PromptInstance } from '../utils/prompt.interface'; -/** - * Create a task from the given set of variables and make it runnable. - */ -export declare class Task extends Subject { - listr: Listr; - tasks: ListrTask; - options: ListrOptions; - rendererOptions: ListrGetRendererOptions; - /** Unique id per task, randomly generated in the uuid v4 format */ - id: string; - /** The current state of the task. */ - state: string; - /** The task object itself, to further utilize it. */ - task: (ctx: Ctx, task: TaskWrapper) => void | ListrTaskResult; - /** Extend current task with multiple subtasks. */ - subtasks: Task[]; - /** Title of the task */ - title?: string; - /** Untouched unchanged title of the task */ - initialTitle?: string; - /** Output data from the task. */ - output?: string; - /** Skip current task. */ - skip: boolean | string | ((ctx: Ctx) => boolean | string | Promise); - /** Current retry number of the task if retrying */ - retry?: { - count: number; - withError?: any; - }; - /** - * A channel for messages. - * - * This requires a separate channel for messages like error, skip or runtime messages to further utilize in the renderers. - */ - message: { - /** Run time of the task, if it has been successfully resolved. */ - duration?: number; - /** Error message of the task, if it has been failed. */ - error?: string; - /** Skip message of the task, if it has been skipped. */ - skip?: string; - /** Rollback message of the task, if the rollback finishes */ - rollback?: string; - /** Retry messages */ - retry?: { - count: number; - withError?: any; - }; - }; - /** Per task options for the current renderer of the task. */ - rendererTaskOptions: ListrGetRendererTaskOptions; - /** This will be triggered each time a new render should happen. */ - renderHook$: Subject; - prompt: undefined | PromptInstance | PromptError; - private enabled; - private enabledFn; - constructor(listr: Listr, tasks: ListrTask, options: ListrOptions, rendererOptions: ListrGetRendererOptions); - set state$(state: ListrTaskState); - set output$(data: string); - set message$(data: Task['message']); - set title$(title: string); - /** - * A function to check whether this task should run at all via enable. - */ - check(ctx: Ctx): Promise; - /** Returns whether this task has subtasks. */ - hasSubtasks(): boolean; - /** Returns whether this task is in progress. */ - isPending(): boolean; - /** Returns whether this task is skipped. */ - isSkipped(): boolean; - /** Returns whether this task has been completed. */ - isCompleted(): boolean; - /** Returns whether this task has been failed. */ - hasFailed(): boolean; - /** Returns whether this task has an active rollback task going on. */ - isRollingBack(): boolean; - /** Returns whether the rollback action was successful. */ - hasRolledBack(): boolean; - /** Returns whether this task has an actively retrying task going on. */ - isRetrying(): boolean; - /** Returns whether enabled function resolves to true. */ - isEnabled(): boolean; - /** Returns whether this task actually has a title. */ - hasTitle(): boolean; - /** Returns whether this task has a prompt inside. */ - isPrompt(): boolean; - /** Run the current task. */ - run(context: Ctx, wrapper: TaskWrapper): Promise; -} diff --git a/node_modules/listr2/dist/lib/task.js b/node_modules/listr2/dist/lib/task.js deleted file mode 100644 index 0a49d41ef..000000000 --- a/node_modules/listr2/dist/lib/task.js +++ /dev/null @@ -1,281 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Task = void 0; -const rxjs_1 = require("rxjs"); -const stream_1 = require("stream"); -const event_constants_1 = require("../constants/event.constants"); -const state_constants_1 = require("../constants/state.constants"); -const listr_error_interface_1 = require("../interfaces/listr-error.interface"); -const listr_1 = require("../listr"); -const assert_1 = require("../utils/assert"); -const renderer_1 = require("../utils/renderer"); -const uuid_1 = require("../utils/uuid"); -/** - * Create a task from the given set of variables and make it runnable. - */ -class Task extends rxjs_1.Subject { - constructor(listr, tasks, options, rendererOptions) { - var _a, _b, _c, _d, _e, _f; - super(); - this.listr = listr; - this.tasks = tasks; - this.options = options; - this.rendererOptions = rendererOptions; - /** - * A channel for messages. - * - * This requires a separate channel for messages like error, skip or runtime messages to further utilize in the renderers. - */ - this.message = {}; - // this kind of randomness is enough for task ids - this.id = (0, uuid_1.generateUUID)(); - this.title = (_a = this.tasks) === null || _a === void 0 ? void 0 : _a.title; - this.initialTitle = (_b = this.tasks) === null || _b === void 0 ? void 0 : _b.title; - this.task = this.tasks.task; - // parse functions - this.skip = (_d = (_c = this.tasks) === null || _c === void 0 ? void 0 : _c.skip) !== null && _d !== void 0 ? _d : false; - this.enabledFn = (_f = (_e = this.tasks) === null || _e === void 0 ? void 0 : _e.enabled) !== null && _f !== void 0 ? _f : true; - // task options - this.rendererTaskOptions = this.tasks.options; - this.renderHook$ = this.listr.renderHook$; - this.subscribe(() => { - this.renderHook$.next(); - }); - } - set state$(state) { - this.state = state; - this.next({ - type: event_constants_1.ListrEventType.STATE, - data: state - }); - // cancel the subtasks if this has already failed - if (this.hasSubtasks() && this.hasFailed()) { - for (const subtask of this.subtasks) { - if (subtask.state === state_constants_1.ListrTaskState.PENDING) { - subtask.state$ = state_constants_1.ListrTaskState.FAILED; - } - } - } - } - set output$(data) { - this.output = data; - this.next({ - type: event_constants_1.ListrEventType.DATA, - data - }); - } - set message$(data) { - this.message = { ...this.message, ...data }; - this.next({ - type: event_constants_1.ListrEventType.MESSAGE, - data - }); - } - set title$(title) { - this.title = title; - this.next({ - type: event_constants_1.ListrEventType.TITLE, - data: title - }); - } - /** - * A function to check whether this task should run at all via enable. - */ - async check(ctx) { - // Check if a task is enabled or disabled - if (this.state === undefined) { - this.enabled = await (0, assert_1.assertFunctionOrSelf)(this.enabledFn, ctx); - this.next({ - type: event_constants_1.ListrEventType.ENABLED, - data: this.enabled - }); - } - } - /** Returns whether this task has subtasks. */ - hasSubtasks() { - var _a; - return ((_a = this.subtasks) === null || _a === void 0 ? void 0 : _a.length) > 0; - } - /** Returns whether this task is in progress. */ - isPending() { - return this.state === state_constants_1.ListrTaskState.PENDING; - } - /** Returns whether this task is skipped. */ - isSkipped() { - return this.state === state_constants_1.ListrTaskState.SKIPPED; - } - /** Returns whether this task has been completed. */ - isCompleted() { - return this.state === state_constants_1.ListrTaskState.COMPLETED; - } - /** Returns whether this task has been failed. */ - hasFailed() { - return this.state === state_constants_1.ListrTaskState.FAILED; - } - /** Returns whether this task has an active rollback task going on. */ - isRollingBack() { - return this.state === state_constants_1.ListrTaskState.ROLLING_BACK; - } - /** Returns whether the rollback action was successful. */ - hasRolledBack() { - return this.state === state_constants_1.ListrTaskState.ROLLED_BACK; - } - /** Returns whether this task has an actively retrying task going on. */ - isRetrying() { - return this.state === state_constants_1.ListrTaskState.RETRY; - } - /** Returns whether enabled function resolves to true. */ - isEnabled() { - return this.enabled; - } - /** Returns whether this task actually has a title. */ - hasTitle() { - return typeof (this === null || this === void 0 ? void 0 : this.title) === 'string'; - } - /** Returns whether this task has a prompt inside. */ - isPrompt() { - return !!this.prompt; - } - /** Run the current task. */ - async run(context, wrapper) { - var _a, _b, _c, _d, _e; - const handleResult = (result) => { - if (result instanceof listr_1.Listr) { - // Detect the subtask - // assign options - result.options = { ...this.options, ...result.options }; - // switch to silent renderer since already rendering - result.rendererClass = (0, renderer_1.getRenderer)('silent').renderer; - result.renderHook$.subscribe(() => { - this.renderHook$.next(); - }); - // assign subtasks - this.subtasks = result.tasks; - result.err = this.listr.err; - this.next({ type: event_constants_1.ListrEventType.SUBTASK }); - result = result.run(context); - } - else if (this.isPrompt()) { - // do nothing, it is already being handled - } - else if (result instanceof Promise) { - // Detect promise - result = result.then(handleResult); - } - else if (result instanceof stream_1.Readable) { - // Detect stream - result = new Promise((resolve, reject) => { - result.on('data', (data) => { - this.output$ = data.toString(); - }); - result.on('error', (error) => reject(error)); - result.on('end', () => resolve(null)); - }); - } - else if (result instanceof rxjs_1.Observable) { - // Detect Observable - result = new Promise((resolve, reject) => { - result.subscribe({ - next: (data) => { - this.output$ = data; - }, - error: reject, - complete: resolve - }); - }); - } - return result; - }; - const startTime = Date.now(); - // finish the task first - this.state$ = state_constants_1.ListrTaskState.PENDING; - // check if this function wants to be skipped - const skipped = await (0, assert_1.assertFunctionOrSelf)(this.skip, context); - if (skipped) { - if (typeof skipped === 'string') { - this.message$ = { skip: skipped }; - } - else if (this.hasTitle()) { - this.message$ = { skip: this.title }; - } - else { - this.message$ = { skip: 'Skipped task without a title.' }; - } - this.state$ = state_constants_1.ListrTaskState.SKIPPED; - return; - } - try { - // add retry functionality - const retryCount = ((_a = this.tasks) === null || _a === void 0 ? void 0 : _a.retry) && ((_b = this.tasks) === null || _b === void 0 ? void 0 : _b.retry) > 0 ? this.tasks.retry + 1 : 1; - for (let retries = 1; retries <= retryCount; retries++) { - try { - // handle the results - await handleResult(this.task(context, wrapper)); - break; - } - catch (err) { - if (retries !== retryCount) { - this.retry = { count: retries, withError: err }; - this.message$ = { retry: this.retry }; - this.title$ = this.initialTitle; - this.output = undefined; - wrapper.report(err, listr_error_interface_1.ListrErrorTypes.WILL_RETRY); - this.state$ = state_constants_1.ListrTaskState.RETRY; - } - else { - throw err; - } - } - } - if (this.isPending() || this.isRetrying()) { - this.message$ = { duration: Date.now() - startTime }; - this.state$ = state_constants_1.ListrTaskState.COMPLETED; - } - } - catch (error) { - // catch prompt error, this was the best i could do without going crazy - if (this.prompt instanceof listr_error_interface_1.PromptError) { - // eslint-disable-next-line no-ex-assign - error = new Error(this.prompt.message); - } - // execute the task on error function - if ((_c = this.tasks) === null || _c === void 0 ? void 0 : _c.rollback) { - wrapper.report(error, listr_error_interface_1.ListrErrorTypes.WILL_ROLLBACK); - try { - this.state$ = state_constants_1.ListrTaskState.ROLLING_BACK; - await this.tasks.rollback(context, wrapper); - this.state$ = state_constants_1.ListrTaskState.ROLLED_BACK; - this.message$ = { rollback: this.title }; - } - catch (err) { - this.state$ = state_constants_1.ListrTaskState.FAILED; - wrapper.report(err, listr_error_interface_1.ListrErrorTypes.HAS_FAILED_TO_ROLLBACK); - throw err; - } - if (((_d = this.listr.options) === null || _d === void 0 ? void 0 : _d.exitAfterRollback) !== false) { - // Do not exit when explicitly set to `false` - throw new Error(this.title); - } - } - else { - // mark task as failed - this.state$ = state_constants_1.ListrTaskState.FAILED; - if (this.listr.options.exitOnError !== false && await (0, assert_1.assertFunctionOrSelf)((_e = this.tasks) === null || _e === void 0 ? void 0 : _e.exitOnError, context) !== false) { - // Do not exit when explicitly set to `false` - // report error - wrapper.report(error, listr_error_interface_1.ListrErrorTypes.HAS_FAILED); - throw error; - } - else if (!this.hasSubtasks()) { - // subtasks will handle and report their own errors - wrapper.report(error, listr_error_interface_1.ListrErrorTypes.HAS_FAILED_WITHOUT_ERROR); - } - } - } - finally { - // Mark the observable as completed - this.complete(); - } - } -} -exports.Task = Task; diff --git a/node_modules/listr2/dist/listr.d.ts b/node_modules/listr2/dist/listr.d.ts deleted file mode 100644 index f5cd00628..000000000 --- a/node_modules/listr2/dist/listr.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ListrError } from './interfaces/listr-error.interface'; -import { ListrBaseClassOptions, ListrContext, ListrTask } from './interfaces/listr.interface'; -import { ListrDefaultRendererValue, ListrFallbackRendererValue, ListrGetRendererClassFromValue, ListrGetRendererOptions, ListrRendererFactory, ListrRendererValue } from './interfaces/renderer.interface'; -import { Task } from './lib/task'; -/** - * Creates a new set of Listr2 task list. - */ -export declare class Listr { - task: ListrTask> | ListrTask>[]; - options?: ListrBaseClassOptions; - tasks: Task>[]; - err: ListrError[]; - ctx: Ctx; - rendererClass: ListrRendererFactory; - rendererClassOptions: ListrGetRendererOptions; - renderHook$: Task['renderHook$']; - private concurrency; - private renderer; - constructor(task: ListrTask> | ListrTask>[], options?: ListrBaseClassOptions); - add(task: ListrTask> | ListrTask>[]): void; - run(context?: Ctx): Promise; - private checkAll; - private runTask; -} diff --git a/node_modules/listr2/dist/listr.js b/node_modules/listr2/dist/listr.js deleted file mode 100644 index 0f2cc5a5d..000000000 --- a/node_modules/listr2/dist/listr.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Listr = void 0; -const pMap = require("p-map"); -const rxjs_1 = require("rxjs"); -const state_constants_1 = require("./constants/state.constants"); -const task_1 = require("./lib/task"); -const task_wrapper_1 = require("./lib/task-wrapper"); -const renderer_1 = require("./utils/renderer"); -/** - * Creates a new set of Listr2 task list. - */ -class Listr { - constructor(task, options) { - var _a, _b, _c; - this.task = task; - this.options = options; - this.tasks = []; - this.err = []; - this.renderHook$ = new rxjs_1.Subject(); - // assign over default options - this.options = { - ...{ - concurrent: false, - renderer: 'default', - nonTTYRenderer: 'verbose', - exitOnError: true, - exitAfterRollback: true, - registerSignalListeners: true - }, - ...options - }; - // define parallel options - if (this.options.concurrent === true) { - this.concurrency = Infinity; - } - else if (typeof this.options.concurrent === 'number') { - this.concurrency = this.options.concurrent; - } - else { - this.concurrency = 1; - } - // get renderer class - const renderer = (0, renderer_1.getRenderer)(this.options.renderer, this.options.nonTTYRenderer, (_a = this.options) === null || _a === void 0 ? void 0 : _a.rendererFallback, (_b = this.options) === null || _b === void 0 ? void 0 : _b.rendererSilent); - this.rendererClass = renderer.renderer; - // depending on the result pass the given options in - if (!renderer.nonTTY) { - this.rendererClassOptions = this.options.rendererOptions; - } - else { - this.rendererClassOptions = this.options.nonTTYRendererOptions; - } - // parse and add tasks - /* istanbul ignore next */ - this.add(task !== null && task !== void 0 ? task : []); - // Graceful interrupt for render cleanup - /* istanbul ignore if */ - if (this.options.registerSignalListeners) { - process - .once('SIGINT', () => { - this.tasks.forEach(async (task) => { - if (task.isPending()) { - task.state$ = state_constants_1.ListrTaskState.FAILED; - } - }); - this.renderer.end(new Error('Interrupted.')); - process.exit(127); - }) - .setMaxListeners(0); - } - // disable color programatically for CI purposes - /* istanbul ignore if */ - if ((_c = this.options) === null || _c === void 0 ? void 0 : _c.disableColor) { - process.env.LISTR_DISABLE_COLOR = '1'; - } - } - add(task) { - const tasks = Array.isArray(task) ? task : [task]; - tasks.forEach((task) => { - this.tasks.push(new task_1.Task(this, task, this.options, { ...this.rendererClassOptions, ...task.options })); - }); - } - async run(context) { - var _a, _b, _c; - // start the renderer - if (!this.renderer) { - this.renderer = new this.rendererClass(this.tasks, this.rendererClassOptions, this.renderHook$); - } - this.renderer.render(); - // create a new context - this.ctx = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.ctx) !== null && _b !== void 0 ? _b : context) !== null && _c !== void 0 ? _c : {}; - // check if the items are enabled - await this.checkAll(this.ctx); - // run tasks - try { - await pMap(this.tasks, async (task) => { - // check this item is enabled, conditions may change depending on context - await task.check(this.ctx); - return this.runTask(task, this.ctx, this.err); - }, { concurrency: this.concurrency }); - this.renderer.end(); - } - catch (err) { - if (this.options.exitOnError !== false) { - this.renderer.end(err); - // Do not exit when explicitly set to `false` - throw err; - } - } - return this.ctx; - } - checkAll(context) { - return Promise.all(this.tasks.map((task) => task.check(context))); - } - runTask(task, context, errors) { - if (!task.isEnabled()) { - return Promise.resolve(); - } - return new task_wrapper_1.TaskWrapper(task, errors, this.options).run(context); - } -} -exports.Listr = Listr; diff --git a/node_modules/listr2/dist/manager.d.ts b/node_modules/listr2/dist/manager.d.ts deleted file mode 100644 index 09ac8d34f..000000000 --- a/node_modules/listr2/dist/manager.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Listr } from './listr'; -import { ListrError } from './interfaces/listr-error.interface'; -import { ListrBaseClassOptions, ListrContext, ListrSubClassOptions, ListrTask } from './interfaces/listr.interface'; -import { ListrGetRendererClassFromValue, ListrRendererValue } from './interfaces/renderer.interface'; -/** - * Creates a new Listr2 task manager. - * - * Useful for creating a single instace of Listr2 with pre-set settings. - */ -export declare class Manager { - options?: ListrBaseClassOptions; - err: ListrError[]; - private tasks; - constructor(options?: ListrBaseClassOptions); - set ctx(ctx: Ctx); - add(tasks: ListrTask>[] | ((ctx?: InjectCtx) => ListrTask>[]), options?: ListrSubClassOptions): void; - runAll(options?: ListrBaseClassOptions): Promise; - newListr(tasks: ListrTask>[], options?: ListrBaseClassOptions): Listr; - indent(tasks: ListrTask>[] | ((ctx?: InjectCtx) => ListrTask>[]), options?: ListrBaseClassOptions, taskOptions?: Omit>, 'task'>): ListrTask>; - run(tasks: ListrTask>[], options?: ListrBaseClassOptions): Promise; - getRuntime(pipetime: number): string; -} diff --git a/node_modules/listr2/dist/manager.js b/node_modules/listr2/dist/manager.js deleted file mode 100644 index d3a666020..000000000 --- a/node_modules/listr2/dist/manager.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Manager = void 0; -const listr_1 = require("./listr"); -/** - * Creates a new Listr2 task manager. - * - * Useful for creating a single instace of Listr2 with pre-set settings. - */ -class Manager { - constructor(options) { - this.options = options; - this.err = []; - this.tasks = []; - } - set ctx(ctx) { - this.options.ctx = ctx; - } - add(tasks, options) { - options = { ...this.options, ...options }; - this.tasks = [...this.tasks, this.indent(tasks, options)]; - } - async runAll(options) { - options = { ...this.options, ...options }; - const ctx = await this.run(this.tasks, options); - // clear out queues - this.tasks = []; - return ctx; - } - newListr(tasks, options) { - return new listr_1.Listr(tasks, options); - } - indent(tasks, options, taskOptions) { - options = { ...this.options, ...options }; - let newTask; - // type function or directly - if (typeof tasks === 'function') { - newTask = { - ...taskOptions, - task: (ctx) => this.newListr(tasks(ctx), options) - }; - } - else { - newTask = { - ...taskOptions, - task: () => this.newListr(tasks, options) - }; - } - return newTask; - } - async run(tasks, options) { - options = { ...this.options, ...options }; - // create task - const task = this.newListr(tasks, options); - // run task - const ctx = await task.run(); - // reset error queue - this.err = task.err; - return ctx; - } - // general utils - /* istanbul ignore next */ - getRuntime(pipetime) { - return `${Math.round(Date.now() - pipetime) / 1000}s`; - } -} -exports.Manager = Manager; diff --git a/node_modules/listr2/dist/renderer/default.renderer.d.ts b/node_modules/listr2/dist/renderer/default.renderer.d.ts deleted file mode 100644 index f3ef4eb75..000000000 --- a/node_modules/listr2/dist/renderer/default.renderer.d.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { ListrRenderer } from '../interfaces/renderer.interface'; -import { Task } from '../lib/task'; -/** Default updating renderer for Listr2 */ -export declare class DefaultRenderer implements ListrRenderer { - tasks: Task[]; - options: typeof DefaultRenderer['rendererOptions']; - renderHook$?: Task['renderHook$']; - /** designates whether this renderer can output to a non-tty console */ - static nonTTY: boolean; - /** renderer options for the defauult renderer */ - static rendererOptions: { - /** - * indentation per level of subtask - * - * @default 2 - */ - indentation?: number; - /** - * clear all the output generated by the renderer when the task finishes its execution - * - * @default false - * @global global option that can not be temperated with subtasks - */ - clearOutput?: boolean; - /** - * show the subtasks of the current task - * - * @default true - */ - showSubtasks?: boolean; - /** - * collapse subtasks after current task completes its execution - * - * @default true - */ - collapse?: boolean; - /** - * show skip messages or show the original title of the task, this will also disable collapseSkips mode - * - * You can disable showing the skip messages, even though you passed in a message by settings this option, - * if you want to keep the original task title intact. - * - * @default true - */ - showSkipMessage?: boolean; - /** - * collapse skip messages into a single message and overwrite the task title - * - * @default true - */ - collapseSkips?: boolean; - /** - * suffix skip messages with [SKIPPED] when in collapseSkips mode - * - * @default true - */ - suffixSkips?: boolean; - /** - * shows the thrown error message or show the original title of the task, this will also disable collapseErrors mode - * You can disable showing the error messages, even though you passed in a message by settings this option, - * if you want to keep the original task title intact. - * - * @default true - */ - showErrorMessage?: boolean; - /** - * collapse error messages into a single message and overwrite the task title - * - * @default true - */ - collapseErrors?: boolean; - /** - * suffix retry messages with [RETRY-${COUNT}] when retry is enabled for a task - * - * @default true - */ - suffixRetries?: boolean; - /** - * only update through triggers from renderhook - * - * useful for tests and stuff. this will disable showing spinner and only update the screen if something else has - * happened in the task worthy to show - * - * @default false - * @global global option that can not be temperated with subtasks - */ - lazy?: boolean; - /** - * show duration for all tasks - * - * @default false - * @global global option that can not be temperated with subtasks - */ - showTimer?: boolean; - /** - * removes empty lines from the data output - * - * @default true - */ - removeEmptyLines?: boolean; - /** - * formats data output depending on your requirements. - * - * @default 'truncate' - * @global global option that can not be temperated with subtasks - */ - formatOutput?: 'truncate' | 'wrap'; - }; - /** per task options for the default renderer */ - static rendererTaskOptions: { - /** - * write task output to the bottom bar instead of the gap under the task title itself. - * useful for a stream of data. - * @default false - * - * `true` only keep 1 line of the latest data outputted by the task. - * `false` only keep 1 line of the latest data outputted by the task. - * `number` will keep designated data of the latest data outputted by the task. - */ - bottomBar?: boolean | number; - /** - * keep output after task finishes - * @default false - * - * works both for the bottom bar and the default behavior - */ - persistentOutput?: boolean; - /** - * show the task time if it was successful - */ - showTimer?: boolean; - }; - private id?; - private bottomBar; - private promptBar; - private readonly spinner; - private spinnerPosition; - constructor(tasks: Task[], options: typeof DefaultRenderer['rendererOptions'], renderHook$?: Task['renderHook$']); - getTaskOptions(task: Task): typeof DefaultRenderer['rendererTaskOptions']; - isBottomBar(task: Task): boolean; - hasPersistentOutput(task: Task): boolean; - hasTimer(task: Task): boolean; - getSelfOrParentOption(task: Task, key: T): typeof DefaultRenderer['rendererOptions'][T]; - getTaskTime(task: Task): string; - createRender(options?: { - tasks?: boolean; - bottomBar?: boolean; - prompt?: boolean; - }): string; - render(): void; - end(): void; - private multiLineRenderer; - private renderBottomBar; - private renderPrompt; - private dumpData; - private formatString; - private indentMultilineOutput; - private getSymbol; - private addSuffixToMessage; -} diff --git a/node_modules/listr2/dist/renderer/default.renderer.js b/node_modules/listr2/dist/renderer/default.renderer.js deleted file mode 100644 index 361e65b11..000000000 --- a/node_modules/listr2/dist/renderer/default.renderer.js +++ /dev/null @@ -1,363 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultRenderer = void 0; -const cliTruncate = require("cli-truncate"); -const logUpdate = require("log-update"); -const os_1 = require("os"); -const cliWrap = require("wrap-ansi"); -const colorette_1 = require("../utils/colorette"); -const figures_1 = require("../utils/figures"); -const indent_string_1 = require("../utils/indent-string"); -const is_unicode_supported_1 = require("../utils/is-unicode-supported"); -const parse_time_1 = require("../utils/parse-time"); -/** Default updating renderer for Listr2 */ -class DefaultRenderer { - constructor(tasks, options, renderHook$) { - this.tasks = tasks; - this.options = options; - this.renderHook$ = renderHook$; - this.bottomBar = {}; - this.spinner = !(0, is_unicode_supported_1.isUnicodeSupported)() ? ['-', '\\', '|', '/'] : ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']; - this.spinnerPosition = 0; - this.options = { ...DefaultRenderer.rendererOptions, ...this.options }; - } - getTaskOptions(task) { - return { ...DefaultRenderer.rendererTaskOptions, ...task.rendererTaskOptions }; - } - isBottomBar(task) { - const bottomBar = this.getTaskOptions(task).bottomBar; - return typeof bottomBar === 'number' && bottomBar !== 0 || typeof bottomBar === 'boolean' && bottomBar !== false; - } - hasPersistentOutput(task) { - return this.getTaskOptions(task).persistentOutput === true; - } - hasTimer(task) { - return this.getTaskOptions(task).showTimer === true; - } - getSelfOrParentOption(task, key) { - var _a, _b, _c; - return (_b = (_a = task === null || task === void 0 ? void 0 : task.rendererOptions) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : (_c = this.options) === null || _c === void 0 ? void 0 : _c[key]; - } - /* istanbul ignore next */ - getTaskTime(task) { - return colorette_1.default.dim(`[${(0, parse_time_1.parseTaskTime)(task.message.duration)}]`); - } - createRender(options) { - options = { - ...{ - tasks: true, - bottomBar: true, - prompt: true - }, - ...options - }; - const render = []; - const renderTasks = this.multiLineRenderer(this.tasks); - const renderBottomBar = this.renderBottomBar(); - const renderPrompt = this.renderPrompt(); - if (options.tasks && (renderTasks === null || renderTasks === void 0 ? void 0 : renderTasks.trim().length) > 0) { - render.push(renderTasks); - } - if (options.bottomBar && (renderBottomBar === null || renderBottomBar === void 0 ? void 0 : renderBottomBar.trim().length) > 0) { - render.push((render.length > 0 ? os_1.EOL : '') + renderBottomBar); - } - if (options.prompt && (renderPrompt === null || renderPrompt === void 0 ? void 0 : renderPrompt.trim().length) > 0) { - render.push((render.length > 0 ? os_1.EOL : '') + renderPrompt); - } - return render.length > 0 ? render.join(os_1.EOL) : ''; - } - render() { - var _a; - // Do not render if we are already rendering - if (this.id) { - return; - } - const updateRender = () => logUpdate(this.createRender()); - /* istanbul ignore if */ - if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.lazy)) { - this.id = setInterval(() => { - this.spinnerPosition = ++this.spinnerPosition % this.spinner.length; - updateRender(); - }, 100); - } - this.renderHook$.subscribe(() => { - updateRender(); - }); - } - end() { - clearInterval(this.id); - if (this.id) { - this.id = undefined; - } - // clear log updater - logUpdate.clear(); - logUpdate.done(); - // directly write to process.stdout, since logupdate only can update the seen height of terminal - if (!this.options.clearOutput) { - process.stdout.write(this.createRender({ prompt: false }) + os_1.EOL); - } - } - // eslint-disable-next-line - multiLineRenderer(tasks, level = 0) { - var _a, _b; - let output = []; - for (const task of tasks) { - if (task.isEnabled()) { - // Current Task Title - if (task.hasTitle()) { - if (!(tasks.some((task) => task.hasFailed()) && !task.hasFailed() && task.options.exitOnError !== false && !(task.isCompleted() || task.isSkipped()))) { - // if task is skipped - if (task.hasFailed() && this.getSelfOrParentOption(task, 'collapseErrors')) { - // current task title and skip change the title - output = [ - ...output, - this.formatString(!task.hasSubtasks() && task.message.error && this.getSelfOrParentOption(task, 'showErrorMessage') ? task.message.error : task.title, this.getSymbol(task), level) - ]; - } - else if (task.isSkipped() && this.getSelfOrParentOption(task, 'collapseSkips')) { - // current task title and skip change the title - output = [ - ...output, - this.formatString(this.addSuffixToMessage(task.message.skip && this.getSelfOrParentOption(task, 'showSkipMessage') ? task.message.skip : task.title, 'SKIPPED', this.getSelfOrParentOption(task, 'suffixSkips')), this.getSymbol(task), level) - ]; - } - else if (task.isRetrying() && this.getSelfOrParentOption(task, 'suffixRetries')) { - output = [...output, this.formatString(this.addSuffixToMessage(task.title, `RETRYING-${task.message.retry.count}`), this.getSymbol(task), level)]; - } - else if (task.isCompleted() && task.hasTitle() && (this.getSelfOrParentOption(task, 'showTimer') || this.hasTimer(task))) { - // task with timer - output = [...output, this.formatString(`${task === null || task === void 0 ? void 0 : task.title} ${this.getTaskTime(task)}`, this.getSymbol(task), level)]; - } - else { - // normal state - output = [...output, this.formatString(task.title, this.getSymbol(task), level)]; - } - } - else { - // some sibling task but self has failed and this has stopped - output = [...output, this.formatString(task.title, colorette_1.default.red(figures_1.figures.squareSmallFilled), level)]; - } - } - // task should not have subtasks since subtasks will handle the error already - // maybe it is a better idea to show the error or skip messages when show subtasks is disabled. - if (!task.hasSubtasks() || !this.getSelfOrParentOption(task, 'showSubtasks')) { - // without the collapse option for skip and errors - if (task.hasFailed() && - this.getSelfOrParentOption(task, 'collapseErrors') === false && - (this.getSelfOrParentOption(task, 'showErrorMessage') || !this.getSelfOrParentOption(task, 'showSubtasks'))) { - // show skip data if collapsing is not defined - output = [...output, this.dumpData(task, level, 'error')]; - } - else if (task.isSkipped() && - this.getSelfOrParentOption(task, 'collapseSkips') === false && - (this.getSelfOrParentOption(task, 'showSkipMessage') || !this.getSelfOrParentOption(task, 'showSubtasks'))) { - // show skip data if collapsing is not defined - output = [...output, this.dumpData(task, level, 'skip')]; - } - } - // Current Task Output - if (task === null || task === void 0 ? void 0 : task.output) { - if ((task.isPending() || task.isRetrying() || task.isRollingBack()) && task.isPrompt()) { - // data output to prompt bar if prompt - this.promptBar = task.output; - } - else if (this.isBottomBar(task) || !task.hasTitle()) { - // data output to bottom bar - const data = [this.dumpData(task, -1)]; - // create new if there is no persistent storage created for bottom bar - if (!this.bottomBar[task.id]) { - this.bottomBar[task.id] = {}; - this.bottomBar[task.id].data = []; - const bottomBar = this.getTaskOptions(task).bottomBar; - if (typeof bottomBar === 'boolean') { - this.bottomBar[task.id].items = 1; - } - else { - this.bottomBar[task.id].items = bottomBar; - } - } - // persistent bottom bar and limit items in it - if (!((_b = (_a = this.bottomBar[task.id]) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.some((element) => data.includes(element))) && !task.isSkipped()) { - this.bottomBar[task.id].data = [...this.bottomBar[task.id].data, ...data]; - } - } - else if (task.isPending() || task.isRetrying() || task.isRollingBack() || this.hasPersistentOutput(task)) { - // keep output if persistent output is set - output = [...output, this.dumpData(task, level)]; - } - } - // render subtasks, some complicated conditionals going on - if ( - // check if renderer option is on first - this.getSelfOrParentOption(task, 'showSubtasks') !== false && - // if it doesnt have subtasks no need to check - task.hasSubtasks() && - (task.isPending() || - task.hasFailed() || - task.isCompleted() && !task.hasTitle() || - // have to be completed and have subtasks - task.isCompleted() && this.getSelfOrParentOption(task, 'collapse') === false && !task.subtasks.some((subtask) => subtask.rendererOptions.collapse === true) || - // if any of the subtasks have the collapse option of - task.subtasks.some((subtask) => subtask.rendererOptions.collapse === false) || - // if any of the subtasks has failed - task.subtasks.some((subtask) => subtask.hasFailed()) || - // if any of the subtasks rolled back - task.subtasks.some((subtask) => subtask.hasRolledBack()))) { - // set level - const subtaskLevel = !task.hasTitle() ? level : level + 1; - // render the subtasks as in the same way - const subtaskRender = this.multiLineRenderer(task.subtasks, subtaskLevel); - if ((subtaskRender === null || subtaskRender === void 0 ? void 0 : subtaskRender.trim()) !== '' && !task.subtasks.every((subtask) => !subtask.hasTitle())) { - output = [...output, subtaskRender]; - } - } - // after task is finished actions - if (task.isCompleted() || task.hasFailed() || task.isSkipped() || task.hasRolledBack()) { - // clean up prompts - this.promptBar = null; - // clean up bottom bar items if not indicated otherwise - if (!this.hasPersistentOutput(task)) { - delete this.bottomBar[task.id]; - } - } - } - } - output = output.filter(Boolean); - if (output.length > 0) { - return output.join(os_1.EOL); - } - else { - return; - } - } - renderBottomBar() { - // parse through all objects return only the last mentioned items - if (Object.keys(this.bottomBar).length > 0) { - this.bottomBar = Object.keys(this.bottomBar).reduce((o, key) => { - if (!(o === null || o === void 0 ? void 0 : o[key])) { - o[key] = {}; - } - o[key] = this.bottomBar[key]; - this.bottomBar[key].data = this.bottomBar[key].data.slice(-this.bottomBar[key].items); - o[key].data = this.bottomBar[key].data; - return o; - }, {}); - return Object.values(this.bottomBar) - .reduce((o, value) => o = [...o, ...value.data], []) - .filter(Boolean) - .join(os_1.EOL); - } - } - renderPrompt() { - if (this.promptBar) { - return this.promptBar; - } - } - dumpData(task, level, source = 'output') { - let data; - switch (source) { - case 'output': - data = task.output; - break; - case 'skip': - data = task.message.skip; - break; - case 'error': - data = task.message.error; - break; - } - // dont return anything on some occasions - if (task.hasTitle() && source === 'error' && data === task.title) { - return; - } - if (typeof data === 'string') { - return this.formatString(data, this.getSymbol(task, true), level + 1); - } - } - formatString(str, icon, level) { - // we dont like empty data around here - if (str.trim() === '') { - return; - } - str = `${icon} ${str}`; - let parsedStr; - let columns = process.stdout.columns ? process.stdout.columns : 80; - columns = columns - level * this.options.indentation - 2; - switch (this.options.formatOutput) { - case 'truncate': - parsedStr = str.split(os_1.EOL).map((s, i) => { - return cliTruncate(this.indentMultilineOutput(s, i), columns); - }); - break; - case 'wrap': - parsedStr = cliWrap(str, columns, { hard: true }) - .split(os_1.EOL) - .map((s, i) => this.indentMultilineOutput(s, i)); - break; - default: - throw new Error('Format option for the renderer is wrong.'); - } - // this removes the empty lines - if (this.options.removeEmptyLines) { - parsedStr = parsedStr.filter(Boolean); - } - return (0, indent_string_1.indentString)(parsedStr.join(os_1.EOL), level * this.options.indentation); - } - indentMultilineOutput(str, i) { - return i > 0 ? (0, indent_string_1.indentString)(str.trim(), 2) : str.trim(); - } - // eslint-disable-next-line complexity - getSymbol(task, data = false) { - var _a, _b, _c; - if (task.isPending() && !data) { - return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.lazy) || this.getSelfOrParentOption(task, 'showSubtasks') !== false && task.hasSubtasks() && !task.subtasks.every((subtask) => !subtask.hasTitle()) - ? colorette_1.default.yellow(figures_1.figures.pointer) - : colorette_1.default.yellowBright(this.spinner[this.spinnerPosition]); - } - else if (task.isCompleted() && !data) { - return task.hasSubtasks() && task.subtasks.some((subtask) => subtask.hasFailed()) ? colorette_1.default.yellow(figures_1.figures.warning) : colorette_1.default.green(figures_1.figures.tick); - } - else if (task.isRetrying() && !data) { - return ((_b = this.options) === null || _b === void 0 ? void 0 : _b.lazy) ? colorette_1.default.yellow(figures_1.figures.warning) : colorette_1.default.yellow(this.spinner[this.spinnerPosition]); - } - else if (task.isRollingBack() && !data) { - return ((_c = this.options) === null || _c === void 0 ? void 0 : _c.lazy) ? colorette_1.default.red(figures_1.figures.warning) : colorette_1.default.red(this.spinner[this.spinnerPosition]); - } - else if (task.hasRolledBack() && !data) { - return colorette_1.default.red(figures_1.figures.arrowLeft); - } - else if (task.hasFailed() && !data) { - return task.hasSubtasks() ? colorette_1.default.red(figures_1.figures.pointer) : colorette_1.default.red(figures_1.figures.cross); - } - else if (task.isSkipped() && !data && this.getSelfOrParentOption(task, 'collapseSkips') === false) { - return colorette_1.default.yellow(figures_1.figures.warning); - } - else if (task.isSkipped() && (data || this.getSelfOrParentOption(task, 'collapseSkips'))) { - return colorette_1.default.yellow(figures_1.figures.arrowDown); - } - return !data ? colorette_1.default.dim(figures_1.figures.squareSmallFilled) : figures_1.figures.pointerSmall; - } - addSuffixToMessage(message, suffix, condition) { - return (condition !== null && condition !== void 0 ? condition : true) ? message + colorette_1.default.dim(` [${suffix}]`) : message; - } -} -exports.DefaultRenderer = DefaultRenderer; -/** designates whether this renderer can output to a non-tty console */ -DefaultRenderer.nonTTY = false; -/** renderer options for the defauult renderer */ -DefaultRenderer.rendererOptions = { - indentation: 2, - clearOutput: false, - showSubtasks: true, - collapse: true, - collapseSkips: true, - showSkipMessage: true, - suffixSkips: true, - collapseErrors: true, - showErrorMessage: true, - suffixRetries: true, - lazy: false, - showTimer: false, - removeEmptyLines: true, - formatOutput: 'truncate' -}; diff --git a/node_modules/listr2/dist/renderer/silent.renderer.d.ts b/node_modules/listr2/dist/renderer/silent.renderer.d.ts deleted file mode 100644 index 15fac3d39..000000000 --- a/node_modules/listr2/dist/renderer/silent.renderer.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ListrRenderer } from '../interfaces/renderer.interface'; -import { Task } from '../lib/task'; -export declare class SilentRenderer implements ListrRenderer { - tasks: Task[]; - options: typeof SilentRenderer['rendererOptions']; - /** designates whether this renderer can output to a non-tty console */ - static nonTTY: boolean; - /** renderer options for the silent renderer */ - static rendererOptions: never; - /** per task options for the silent renderer */ - static rendererTaskOptions: never; - constructor(tasks: Task[], options: typeof SilentRenderer['rendererOptions']); - render(): void; - end(): void; -} diff --git a/node_modules/listr2/dist/renderer/silent.renderer.js b/node_modules/listr2/dist/renderer/silent.renderer.js deleted file mode 100644 index a8dc0593f..000000000 --- a/node_modules/listr2/dist/renderer/silent.renderer.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SilentRenderer = void 0; -class SilentRenderer { - constructor(tasks, options) { - this.tasks = tasks; - this.options = options; - } - render() { } - end() { } -} -exports.SilentRenderer = SilentRenderer; -/** designates whether this renderer can output to a non-tty console */ -SilentRenderer.nonTTY = true; diff --git a/node_modules/listr2/dist/renderer/simple.renderer.d.ts b/node_modules/listr2/dist/renderer/simple.renderer.d.ts deleted file mode 100644 index 9dd552058..000000000 --- a/node_modules/listr2/dist/renderer/simple.renderer.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ListrEventType } from '../constants/event.constants'; -import { ListrEventFromType } from '../interfaces/listr.interface'; -import { ListrRenderer } from '../interfaces/renderer.interface'; -import { Task } from '../lib/task'; -/** - * This is the default renderer which is neither verbose or updating. - * It provides short output like update renderer, but does not disturb - * stdin during execution of listr tasks - */ -export declare class SimpleRenderer implements ListrRenderer { - readonly tasks: Task[]; - options: typeof SimpleRenderer['rendererOptions']; - static nonTTY: boolean; - static rendererOptions: { - /** - * if true this will add - * timestamp at the begin of the rendered line - * - * @example - * - * ```bash - * [12:33:44] ✔ Do something important - * ``` - * - * @default false - */ - prefixWithTimestamp?: boolean; - /** - * choose between process.stdout and process.stderr - * - * @default stdout - */ - output?: 'stdout' | 'stderr'; - }; - static rendererTaskOptions: never; - /** - * Event type renderer map contains functions to process different task events - */ - eventTypeRendererMap: Partial<{ - [P in ListrEventType]: (t: Task, event: ListrEventFromType

) => void; - }>; - constructor(tasks: Task[], options: typeof SimpleRenderer['rendererOptions']); - static now(): Date; - static formatTitle(task?: Task): string; - log(output?: string): void; - end(): void; - render(tasks?: Task[]): void; -} diff --git a/node_modules/listr2/dist/renderer/simple.renderer.js b/node_modules/listr2/dist/renderer/simple.renderer.js deleted file mode 100644 index 87686c538..000000000 --- a/node_modules/listr2/dist/renderer/simple.renderer.js +++ /dev/null @@ -1,119 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SimpleRenderer = void 0; -const log_update_1 = require("log-update"); -const os_1 = require("os"); -const event_constants_1 = require("../constants/event.constants"); -const colorette_1 = require("../utils/colorette"); -const figures_1 = require("../utils/figures"); -/** - * This is the default renderer which is neither verbose or updating. - * It provides short output like update renderer, but does not disturb - * stdin during execution of listr tasks - */ -class SimpleRenderer { - constructor(tasks, options) { - this.tasks = tasks; - this.options = options; - /** - * Event type renderer map contains functions to process different task events - */ - this.eventTypeRendererMap = { - [event_constants_1.ListrEventType.SUBTASK]: (task) => { - if (task.hasTitle()) { - // if Task has subtasks where we want to log the group indication - this.log(`${colorette_1.default.blue(figures_1.figures.pointer)} ${task.title}`); - } - if (task.hasSubtasks()) { - this.render(task.subtasks); - } - }, - [event_constants_1.ListrEventType.STATE]: (task) => { - if (task.isCompleted() && task.hasTitle()) { - // The title is only logged at the end of the task execution - this.log(`${colorette_1.default.green(figures_1.figures.tick)} ${task.title}`); - } - }, - [event_constants_1.ListrEventType.DATA]: (task, event) => { - // ! This is where it gets dirty - // * We want the prompt to stay visible after confirmation - if (task.isPrompt() && !String(event.data).match(/^\n$/)) { - (0, log_update_1.stderr)(`${event.data}`); - } - else { - this.log(`${figures_1.figures.pointerSmall} ${event.data}`); - } - }, - [event_constants_1.ListrEventType.MESSAGE]: (task, event) => { - if (event.data.error) { - // error message - const title = SimpleRenderer.formatTitle(task); - this.log(`${colorette_1.default.red(figures_1.figures.cross)}${title}: ${event.data.error}`); - } - else if (event.data.skip) { - // Skip message - const title = SimpleRenderer.formatTitle(task); - const skip = task.title !== event.data.skip ? `: ${event.data.skip}` : ''; - this.log(`${colorette_1.default.yellow(figures_1.figures.arrowDown)}${title} [${colorette_1.default.yellow(`skipped${skip}`)}]`); - } - else if (event.data.rollback) { - // rollback message - const title = SimpleRenderer.formatTitle(task); - this.log(`${colorette_1.default.red(figures_1.figures.arrowLeft)}${title}: ${event.data.rollback}`); - } - else if (event.data.retry) { - // Retry Message - const title = SimpleRenderer.formatTitle(task); - this.log(`[${colorette_1.default.yellow(`${event.data.retry.count}`)}]${title}`); - } - } - // * We do not log out initial title. Only the final one. - // [ListrEventType.TITLE]: (t, e) => this.renderTitle(t, e), - }; - this.options = { ...SimpleRenderer.rendererOptions, ...options }; - } - // This is used for mocks, since mocking Date is cumbesome - static now() { - return new Date(); - } - // Used to sanitize title output - static formatTitle(task) { - return (task === null || task === void 0 ? void 0 : task.title) ? ` ${task.title}` : ''; - } - // Writes sanitized output - log(output) { - const logOut = (msg) => { - // Need appent \n to mimic console.log - process[this.options.output].write(msg.endsWith(os_1.EOL) ? msg : `${msg}${os_1.EOL}`); - }; - if (!this.options.prefixWithTimestamp) { - logOut(`${output}`); - return; - } - const now = SimpleRenderer.now(); - const timestamp = String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0'); - logOut(`${colorette_1.default.dim(`[${timestamp}]`)} ${output}`); - } - // eslint-disable-next-line - end() { } - // yes this is a misuse :) - render(tasks) { - if (tasks === null || tasks === void 0 ? void 0 : tasks.length) { - tasks.forEach((task) => { - task.subscribe((event) => { - var _a, _b; - // Here event type will match event.type anyway - (_b = (_a = this.eventTypeRendererMap)[event.type]) === null || _b === void 0 ? void 0 : _b.call(_a, task, event); - }, this.log); - }); - } - else { - this.render(this.tasks); - } - } -} -exports.SimpleRenderer = SimpleRenderer; -// Designate this renderer as tty or nonTTY -SimpleRenderer.nonTTY = true; -// designate your renderer options that will be showed inside the `ListrOptions` as rendererOptions -SimpleRenderer.rendererOptions = { prefixWithTimestamp: false, output: 'stdout' }; diff --git a/node_modules/listr2/dist/renderer/verbose.renderer.d.ts b/node_modules/listr2/dist/renderer/verbose.renderer.d.ts deleted file mode 100644 index 63fe419d7..000000000 --- a/node_modules/listr2/dist/renderer/verbose.renderer.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { ListrRenderer } from '../interfaces/renderer.interface'; -import { Task } from '../lib/task'; -import { Logger } from '../utils/logger'; -export declare class VerboseRenderer implements ListrRenderer { - tasks: Task[]; - options: typeof VerboseRenderer['rendererOptions']; - /** designates whether this renderer can output to a non-tty console */ - static nonTTY: boolean; - /** renderer options for the verbose renderer */ - static rendererOptions: ({ - /** - * useIcons instead of text for log level - * @default false - */ - useIcons?: boolean; - /** - * log tasks with empty titles - * @default true - */ - logEmptyTitle?: boolean; - /** - * log title changes - * @default true - */ - logTitleChange?: boolean; - /** - * show duration for all tasks - */ - showTimer?: boolean; - } & { - /** - * inject a custom logger - */ - logger?: new (...args: any) => Logger; - /** - * inject options to custom logger - */ - options?: any; - }); - /** per task options for the verbose renderer */ - static rendererTaskOptions: never; - private logger; - constructor(tasks: Task[], options: typeof VerboseRenderer['rendererOptions']); - render(): void; - end(): void; - private verboseRenderer; -} diff --git a/node_modules/listr2/dist/renderer/verbose.renderer.js b/node_modules/listr2/dist/renderer/verbose.renderer.js deleted file mode 100644 index b3901a444..000000000 --- a/node_modules/listr2/dist/renderer/verbose.renderer.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.VerboseRenderer = void 0; -const event_constants_1 = require("../constants/event.constants"); -const logger_1 = require("../utils/logger"); -const parse_time_1 = require("../utils/parse-time"); -class VerboseRenderer { - constructor(tasks, options) { - var _a, _b, _c, _d; - this.tasks = tasks; - this.options = options; - if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.logger) && ((_b = this.options) === null || _b === void 0 ? void 0 : _b.options)) { - this.logger = new this.options.logger(this.options.options); - } - else if ((_c = this.options) === null || _c === void 0 ? void 0 : _c.logger) { - this.logger = new this.options.logger(); - } - else { - this.logger = new logger_1.Logger({ useIcons: (_d = this.options) === null || _d === void 0 ? void 0 : _d.useIcons }); - } - this.options = { ...VerboseRenderer.rendererOptions, ...this.options }; - } - render() { - this.verboseRenderer(this.tasks); - } - // eslint-disable-next-line @typescript-eslint/no-empty-function - end() { } - // verbose renderer multi-level - verboseRenderer(tasks) { - return tasks === null || tasks === void 0 ? void 0 : tasks.forEach((task) => { - task.subscribe( - // eslint-disable-next-line complexity - (event) => { - var _a, _b, _c, _d, _e, _f, _g, _h; - if (task.isEnabled()) { - // render depending on the state - const taskTitle = task.hasTitle() ? task.title : 'Task without title.'; - if (event.type === event_constants_1.ListrEventType.SUBTASK && task.hasSubtasks()) { - // render lower level if multi-level - this.verboseRenderer(task.subtasks); - } - else if (event.type === event_constants_1.ListrEventType.STATE) { - if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.logEmptyTitle) !== false || task.hasTitle()) { - if (task.isPending()) { - this.logger.start(taskTitle); - } - else if (task.isCompleted()) { - this.logger.success(taskTitle + (((_b = this.options) === null || _b === void 0 ? void 0 : _b.showTimer) && ((_c = task.message) === null || _c === void 0 ? void 0 : _c.duration) ? ` [${(0, parse_time_1.parseTaskTime)(task.message.duration)}]` : '')); - } - } - } - else if (event.type === event_constants_1.ListrEventType.DATA && !!event.data) { - this.logger.data(String(event.data)); - } - else if (event.type === event_constants_1.ListrEventType.TITLE) { - if (((_d = this.options) === null || _d === void 0 ? void 0 : _d.logTitleChange) !== false) { - this.logger.title(String(event.data)); - } - } - else if (event.type === event_constants_1.ListrEventType.MESSAGE) { - if ((_e = event.data) === null || _e === void 0 ? void 0 : _e.error) { - // error message - this.logger.fail(String(event.data.error)); - } - else if ((_f = event.data) === null || _f === void 0 ? void 0 : _f.skip) { - // skip message - this.logger.skip(String(event.data.skip)); - } - else if ((_g = event.data) === null || _g === void 0 ? void 0 : _g.rollback) { - // rollback message - this.logger.rollback(String(event.data.rollback)); - } - else if ((_h = event.data) === null || _h === void 0 ? void 0 : _h.retry) { - // inform of retry count - this.logger.retry(`[${event.data.retry.count}] ` + String(taskTitle)); - } - } - } - }, - /* istanbul ignore next */ (err) => { - this.logger.fail(err); - }); - }); - } -} -exports.VerboseRenderer = VerboseRenderer; -/** designates whether this renderer can output to a non-tty console */ -VerboseRenderer.nonTTY = true; -/** renderer options for the verbose renderer */ -VerboseRenderer.rendererOptions = { - useIcons: false, - logEmptyTitle: true, - logTitleChange: true -}; diff --git a/node_modules/listr2/dist/utils/assert.d.ts b/node_modules/listr2/dist/utils/assert.d.ts deleted file mode 100644 index e90b139e9..000000000 --- a/node_modules/listr2/dist/utils/assert.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * This function asserts the given value as a function or itself. - * If the value itself is a function it will evaluate it with the passed in arguments, - * elsewise it will directly return itself. - */ -export declare function assertFunctionOrSelf(functionOrSelf: T, ...args: T extends (...args: any[]) => any ? Parameters : never): T extends (...args: any[]) => any ? ReturnType : T; diff --git a/node_modules/listr2/dist/utils/assert.js b/node_modules/listr2/dist/utils/assert.js deleted file mode 100644 index b37cb6587..000000000 --- a/node_modules/listr2/dist/utils/assert.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assertFunctionOrSelf = void 0; -/** - * This function asserts the given value as a function or itself. - * If the value itself is a function it will evaluate it with the passed in arguments, - * elsewise it will directly return itself. - */ -function assertFunctionOrSelf(functionOrSelf, ...args) { - if (typeof functionOrSelf === 'function') { - return functionOrSelf(...args); - } - else { - return functionOrSelf; - } -} -exports.assertFunctionOrSelf = assertFunctionOrSelf; diff --git a/node_modules/listr2/dist/utils/colorette.d.ts b/node_modules/listr2/dist/utils/colorette.d.ts deleted file mode 100644 index a574ee491..000000000 --- a/node_modules/listr2/dist/utils/colorette.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -declare const _default: import("colorette").Colorette; -export default _default; diff --git a/node_modules/listr2/dist/utils/colorette.js b/node_modules/listr2/dist/utils/colorette.js deleted file mode 100644 index ec04bd3bc..000000000 --- a/node_modules/listr2/dist/utils/colorette.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -const colorette_1 = require("colorette"); -exports.default = (0, colorette_1.createColors)({ useColor: ((_a = process.env) === null || _a === void 0 ? void 0 : _a.LISTR_DISABLE_COLOR) !== '1' }); diff --git a/node_modules/listr2/dist/utils/figures.d.ts b/node_modules/listr2/dist/utils/figures.d.ts deleted file mode 100644 index 9b20bcc15..000000000 --- a/node_modules/listr2/dist/utils/figures.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare const figures: { - warning: string; - cross: string; - arrowDown: string; - tick: string; - arrowRight: string; - pointer: string; - checkboxOn: string; - arrowLeft: string; - squareSmallFilled: string; - pointerSmall: string; -}; diff --git a/node_modules/listr2/dist/utils/figures.js b/node_modules/listr2/dist/utils/figures.js deleted file mode 100644 index 2b7f1732b..000000000 --- a/node_modules/listr2/dist/utils/figures.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.figures = void 0; -const is_unicode_supported_1 = require("./is-unicode-supported"); -const FIGURES_MAIN = { - warning: '⚠', - cross: '✖', - arrowDown: '↓', - tick: '✔', - arrowRight: '→', - pointer: '❯', - checkboxOn: '☒', - arrowLeft: '←', - squareSmallFilled: '◼', - pointerSmall: '›' -}; -const FIGURES_FALLBACK = { - ...FIGURES_MAIN, - warning: '‼', - cross: '×', - tick: '√', - pointer: '>', - checkboxOn: '[×]', - squareSmallFilled: '■' -}; -exports.figures = (0, is_unicode_supported_1.isUnicodeSupported)() ? FIGURES_MAIN : FIGURES_FALLBACK; diff --git a/node_modules/listr2/dist/utils/general.d.ts b/node_modules/listr2/dist/utils/general.d.ts deleted file mode 100644 index 444130363..000000000 --- a/node_modules/listr2/dist/utils/general.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Deep clones a object in the most easiest manner. - */ -export declare function cloneObject>(obj: T): T; diff --git a/node_modules/listr2/dist/utils/general.js b/node_modules/listr2/dist/utils/general.js deleted file mode 100644 index 162b46289..000000000 --- a/node_modules/listr2/dist/utils/general.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.cloneObject = void 0; -const rfdc = require("rfdc"); -const clone = rfdc({ circles: true }); -/** - * Deep clones a object in the most easiest manner. - */ -function cloneObject(obj) { - return clone(obj); -} -exports.cloneObject = cloneObject; diff --git a/node_modules/listr2/dist/utils/indent-string.d.ts b/node_modules/listr2/dist/utils/indent-string.d.ts deleted file mode 100644 index 1861681d5..000000000 --- a/node_modules/listr2/dist/utils/indent-string.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function indentString(string: string, count: number): string; diff --git a/node_modules/listr2/dist/utils/indent-string.js b/node_modules/listr2/dist/utils/indent-string.js deleted file mode 100644 index a82ec1f10..000000000 --- a/node_modules/listr2/dist/utils/indent-string.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.indentString = void 0; -function indentString(string, count) { - return string.replace(/^(?!\s*$)/gm, ' '.repeat(count)); -} -exports.indentString = indentString; diff --git a/node_modules/listr2/dist/utils/is-unicode-supported.d.ts b/node_modules/listr2/dist/utils/is-unicode-supported.d.ts deleted file mode 100644 index 67274305e..000000000 --- a/node_modules/listr2/dist/utils/is-unicode-supported.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function isUnicodeSupported(): boolean; diff --git a/node_modules/listr2/dist/utils/is-unicode-supported.js b/node_modules/listr2/dist/utils/is-unicode-supported.js deleted file mode 100644 index 405e5da88..000000000 --- a/node_modules/listr2/dist/utils/is-unicode-supported.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isUnicodeSupported = void 0; -function isUnicodeSupported() { - if (process.platform !== 'win32') { - return true; - } - /* istanbul ignore next */ - return (Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) || process.env.TERM_PROGRAM === 'vscode' || process.env.TERM === 'xterm-256color' || process.env.TERM === 'alacritty'); -} -exports.isUnicodeSupported = isUnicodeSupported; diff --git a/node_modules/listr2/dist/utils/logger.constants.d.ts b/node_modules/listr2/dist/utils/logger.constants.d.ts deleted file mode 100644 index 635cf193a..000000000 --- a/node_modules/listr2/dist/utils/logger.constants.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** Default loglevels for the logger */ -export declare enum LogLevels { - SILENT = "SILENT", - FAILED = "FAILED", - SKIPPED = "SKIPPED", - SUCCESS = "SUCCESS", - DATA = "DATA", - STARTED = "STARTED", - TITLE = "TITLE", - RETRY = "RETRY", - ROLLBACK = "ROLLBACK" -} diff --git a/node_modules/listr2/dist/utils/logger.constants.js b/node_modules/listr2/dist/utils/logger.constants.js deleted file mode 100644 index 2e8bb4153..000000000 --- a/node_modules/listr2/dist/utils/logger.constants.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LogLevels = void 0; -/** Default loglevels for the logger */ -var LogLevels; -(function (LogLevels) { - LogLevels["SILENT"] = "SILENT"; - LogLevels["FAILED"] = "FAILED"; - LogLevels["SKIPPED"] = "SKIPPED"; - LogLevels["SUCCESS"] = "SUCCESS"; - LogLevels["DATA"] = "DATA"; - LogLevels["STARTED"] = "STARTED"; - LogLevels["TITLE"] = "TITLE"; - LogLevels["RETRY"] = "RETRY"; - LogLevels["ROLLBACK"] = "ROLLBACK"; -})(LogLevels = exports.LogLevels || (exports.LogLevels = {})); diff --git a/node_modules/listr2/dist/utils/logger.d.ts b/node_modules/listr2/dist/utils/logger.d.ts deleted file mode 100644 index 061e1af33..000000000 --- a/node_modules/listr2/dist/utils/logger.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { LogLevels } from './logger.constants'; -import { LoggerOptions } from './logger.interface'; -/** - * A internal logger for using in the verbose renderer mostly. - */ -export declare class Logger { - private options?; - constructor(options?: LoggerOptions); - fail(message: string): void; - skip(message: string): void; - success(message: string): void; - data(message: string): void; - start(message: string): void; - title(message: string): void; - retry(message: string): void; - rollback(message: string): void; - protected parseMessage(level: LogLevels, message: string): string; - protected logColoring({ level, message }: { - level: LogLevels; - message: string; - }): string; - private wrapInBrackets; -} diff --git a/node_modules/listr2/dist/utils/logger.interface.d.ts b/node_modules/listr2/dist/utils/logger.interface.d.ts deleted file mode 100644 index 3e4a3cae9..000000000 --- a/node_modules/listr2/dist/utils/logger.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Options for the logger - */ -export interface LoggerOptions { - useIcons: boolean; -} diff --git a/node_modules/listr2/dist/utils/logger.interface.js b/node_modules/listr2/dist/utils/logger.interface.js deleted file mode 100644 index c8ad2e549..000000000 --- a/node_modules/listr2/dist/utils/logger.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/listr2/dist/utils/logger.js b/node_modules/listr2/dist/utils/logger.js deleted file mode 100644 index 2eb76b9e9..000000000 --- a/node_modules/listr2/dist/utils/logger.js +++ /dev/null @@ -1,159 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Logger = void 0; -/* eslint-disable no-console */ -const figures_1 = require("./figures"); -const logger_constants_1 = require("./logger.constants"); -const colorette_1 = require("./colorette"); -/** - * A internal logger for using in the verbose renderer mostly. - */ -class Logger { - constructor(options) { - this.options = options; - } - fail(message) { - message = this.parseMessage(logger_constants_1.LogLevels.FAILED, message); - console.error(message); - } - skip(message) { - message = this.parseMessage(logger_constants_1.LogLevels.SKIPPED, message); - console.info(message); - } - success(message) { - message = this.parseMessage(logger_constants_1.LogLevels.SUCCESS, message); - console.log(message); - } - data(message) { - message = this.parseMessage(logger_constants_1.LogLevels.DATA, message); - console.info(message); - } - start(message) { - message = this.parseMessage(logger_constants_1.LogLevels.STARTED, message); - console.log(message); - } - title(message) { - message = this.parseMessage(logger_constants_1.LogLevels.TITLE, message); - console.info(message); - } - retry(message) { - message = this.parseMessage(logger_constants_1.LogLevels.RETRY, message); - console.warn(message); - } - rollback(message) { - message = this.parseMessage(logger_constants_1.LogLevels.ROLLBACK, message); - console.warn(message); - } - parseMessage(level, message) { - // parse multi line messages - let multiLineMessage; - try { - multiLineMessage = message.split('\n'); - } - catch /* istanbul ignore next */ { - multiLineMessage = [message]; - } - multiLineMessage = multiLineMessage.map((msg) => { - // format messages - return this.logColoring({ - level, - message: msg - }); - }); - // join back multi line messages - message = multiLineMessage.join('\n'); - return message; - } - logColoring({ level, message }) { - var _a, _b, _c, _d, _e, _f, _g, _h; - let icon; - // do the coloring - let coloring = (input) => { - return input; - }; - switch (level) { - case logger_constants_1.LogLevels.FAILED: - /* istanbul ignore if */ - if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.useIcons) { - coloring = colorette_1.default.red; - icon = figures_1.figures.cross; - } - else { - icon = this.wrapInBrackets(level); - } - break; - case logger_constants_1.LogLevels.SKIPPED: - /* istanbul ignore if */ - if ((_b = this.options) === null || _b === void 0 ? void 0 : _b.useIcons) { - coloring = colorette_1.default.yellow; - icon = figures_1.figures.arrowDown; - } - else { - icon = this.wrapInBrackets(level); - } - break; - case logger_constants_1.LogLevels.SUCCESS: - /* istanbul ignore if */ - if ((_c = this.options) === null || _c === void 0 ? void 0 : _c.useIcons) { - coloring = colorette_1.default.green; - icon = figures_1.figures.tick; - } - else { - icon = this.wrapInBrackets(level); - } - break; - case logger_constants_1.LogLevels.DATA: - /* istanbul ignore if */ - if ((_d = this.options) === null || _d === void 0 ? void 0 : _d.useIcons) { - icon = figures_1.figures.arrowRight; - } - else { - icon = this.wrapInBrackets(level); - } - break; - case logger_constants_1.LogLevels.STARTED: - /* istanbul ignore if */ - if ((_e = this.options) === null || _e === void 0 ? void 0 : _e.useIcons) { - icon = figures_1.figures.pointer; - } - else { - icon = this.wrapInBrackets(level); - } - break; - case logger_constants_1.LogLevels.TITLE: - /* istanbul ignore if */ - if ((_f = this.options) === null || _f === void 0 ? void 0 : _f.useIcons) { - icon = figures_1.figures.checkboxOn; - } - else { - icon = this.wrapInBrackets(level); - } - break; - case logger_constants_1.LogLevels.RETRY: - /* istanbul ignore if */ - if ((_g = this.options) === null || _g === void 0 ? void 0 : _g.useIcons) { - coloring = colorette_1.default.yellow; - icon = figures_1.figures.pointer; - } - else { - icon = this.wrapInBrackets(level); - } - break; - case logger_constants_1.LogLevels.ROLLBACK: - /* istanbul ignore if */ - if ((_h = this.options) === null || _h === void 0 ? void 0 : _h.useIcons) { - coloring = colorette_1.default.red; - icon = figures_1.figures.arrowLeft; - } - else { - icon = this.wrapInBrackets(level); - } - break; - } - return coloring(`${icon} ${message}`); - } - wrapInBrackets(level) { - return `[${level}]`; - } -} -exports.Logger = Logger; diff --git a/node_modules/listr2/dist/utils/parse-time.d.ts b/node_modules/listr2/dist/utils/parse-time.d.ts deleted file mode 100644 index 1d1ee3707..000000000 --- a/node_modules/listr2/dist/utils/parse-time.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function parseTaskTime(duration: number): string; diff --git a/node_modules/listr2/dist/utils/parse-time.js b/node_modules/listr2/dist/utils/parse-time.js deleted file mode 100644 index eaf3fe003..000000000 --- a/node_modules/listr2/dist/utils/parse-time.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseTaskTime = void 0; -function parseTaskTime(duration) { - const seconds = Math.floor(duration / 1000); - const minutes = Math.floor(seconds / 60); - let parsedTime; - if (seconds === 0 && minutes === 0) { - parsedTime = `0.${Math.floor(duration / 100)}s`; - } - if (seconds > 0) { - parsedTime = `${seconds % 60}s`; - } - if (minutes > 0) { - parsedTime = `${minutes}m${parsedTime}`; - } - return parsedTime; -} -exports.parseTaskTime = parseTaskTime; diff --git a/node_modules/listr2/dist/utils/prompt.d.ts b/node_modules/listr2/dist/utils/prompt.d.ts deleted file mode 100644 index dd511418f..000000000 --- a/node_modules/listr2/dist/utils/prompt.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { PromptOptions, PromptSettings } from './prompt.interface'; -import { TaskWrapper } from '../lib/task-wrapper'; -/** - * Create a new prompt with Enquirer externally. - * This extends enquirer so you dont have to give a name to single prompts and such so it is also - * useful to use externally. - * @param this - * @param options - * @param settings - */ -export declare function createPrompt(this: any, options: PromptOptions | PromptOptions[], settings?: PromptSettings): Promise; -export declare function destroyPrompt(this: TaskWrapper, throwError?: boolean): void; diff --git a/node_modules/listr2/dist/utils/prompt.interface.d.ts b/node_modules/listr2/dist/utils/prompt.interface.d.ts deleted file mode 100644 index ee74c54f4..000000000 --- a/node_modules/listr2/dist/utils/prompt.interface.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -/// -import * as Enquirer from 'enquirer'; -import { WriteStream } from 'fs'; -import { Writable } from 'stream'; -import { PromptError } from '../interfaces/listr-error.interface'; -/** Returns all the prompt options depending on the type selected. */ -export declare type PromptOptions = Unionize<{ - [K in PromptTypes]-?: T extends true ? { - type: K; - } & PromptOptionsType & { - name: string | (() => string); - } : { - type: K; - } & PromptOptionsType; -}> | ({ - type: string; -} & T extends true ? PromptOptionsType & { - name: string | (() => string); -} : PromptOptionsType); -export declare type Unionize> = { - [P in keyof T]: T[P]; -}[keyof T]; -interface BasePromptOptions { - message: string | (() => string) | (() => Promise); - initial?: boolean | number | number[] | string | (() => string) | (() => Promise); - required?: boolean; - stdin?: NodeJS.ReadStream; - stdout?: NodeJS.WriteStream; - header?: string; - footer?: string; - skip?(value: any): boolean | Promise; - format?(value: any): any | Promise; - result?(value: any): any | Promise; - validate?(value: any, state: any): boolean | Promise | string | Promise | Promise; - onSubmit?(name: any, value: any, prompt: Enquirer.Prompt): boolean | Promise; - onCancel?(name: any, value: any, prompt: Enquirer.Prompt): boolean | Promise; -} -interface BasePromptOptionsWithName extends BasePromptOptions { - name: string | (() => string); -} -interface ArrayPromptOptions extends BasePromptOptions { - choices: string[] | BasePromptOptionsWithName[]; - maxChoices?: number; - multiple?: boolean; - initial?: number | number[]; - delay?: number; - separator?: boolean; - sort?: boolean; - linebreak?: boolean; - edgeLength?: number; - align?: 'left' | 'right'; - scroll?: boolean; -} -interface BooleanPromptOptions extends BasePromptOptions { - initial?: boolean | (() => string) | (() => Promise); -} -interface StringPromptOptions extends BasePromptOptions { - initial?: string; - multiline?: boolean; -} -interface ScalePromptOptions extends ArrayPromptOptions { - scale: StringPromptOptions[]; - margin?: [number, number, number, number]; -} -interface NumberPromptOptions extends BasePromptOptions { - min?: number; - max?: number; - delay?: number; - float?: boolean; - round?: boolean; - major?: number; - minor?: number; - initial?: number; -} -interface SnippetPromptOptions extends BasePromptOptions { - newline?: string; - fields: Partial[]; - template: string; -} -interface SortPromptOptions extends BasePromptOptions { - hint?: string; - drag?: boolean; - numbered?: boolean; -} -interface SurveyPromptOptions extends ArrayPromptOptions { - scale: BasePromptOptionsWithName[]; - margin: [number, number, number, number]; -} -interface QuizPromptOptions extends ArrayPromptOptions { - correctChoice: number; -} -interface TogglePromptOptions extends BasePromptOptions { - enabled?: string; - disabled?: string; -} -export declare type PromptTypes = 'AutoComplete' | 'BasicAuth' | 'Confirm' | 'Editable' | 'Form' | 'Input' | 'Invisible' | 'List' | 'MultiSelect' | 'Numeral' | 'Password' | 'Quiz' | 'Scale' | 'Select' | 'Snippet' | 'Sort' | 'Survey' | 'Text' | 'Toggle'; -export declare type PromptOptionsType = T extends keyof PromptOptionsMap ? PromptOptionsMap[T] : T extends string ? BasePromptOptions & Record : any; -export declare class PromptOptionsMap implements Record> { - AutoComplete: ArrayPromptOptions; - BasicAuth: StringPromptOptions; - Confirm: BooleanPromptOptions; - Editable: ArrayPromptOptions; - Form: ArrayPromptOptions; - Input: StringPromptOptions; - Invisible: StringPromptOptions; - List: ArrayPromptOptions; - MultiSelect: ArrayPromptOptions; - Numeral: NumberPromptOptions; - Password: StringPromptOptions; - Quiz: QuizPromptOptions; - Scale: ScalePromptOptions; - Select: ArrayPromptOptions; - Snippet: SnippetPromptOptions; - Sort: SortPromptOptions; - Survey: SurveyPromptOptions; - Text: StringPromptOptions; - Toggle: TogglePromptOptions; -} -export interface PromptSettings { - error?: boolean; - cancelCallback?: (settings?: PromptSettings) => string | Error | PromptError | void; - stdout?: WriteStream | Writable; - enquirer?: Enquirer; -} -export interface PromptInstance extends Omit { - submit(): void; - cancel(err?: string): void; -} -export {}; diff --git a/node_modules/listr2/dist/utils/prompt.interface.js b/node_modules/listr2/dist/utils/prompt.interface.js deleted file mode 100644 index c8ad2e549..000000000 --- a/node_modules/listr2/dist/utils/prompt.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/listr2/dist/utils/prompt.js b/node_modules/listr2/dist/utils/prompt.js deleted file mode 100644 index 859a917b0..000000000 --- a/node_modules/listr2/dist/utils/prompt.js +++ /dev/null @@ -1,110 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.destroyPrompt = exports.createPrompt = void 0; -const event_constants_1 = require("../constants/event.constants"); -const state_constants_1 = require("../constants/state.constants"); -const listr_error_interface_1 = require("../interfaces/listr-error.interface"); -const task_wrapper_1 = require("../lib/task-wrapper"); -/** - * Create a new prompt with Enquirer externally. - * This extends enquirer so you dont have to give a name to single prompts and such so it is also - * useful to use externally. - * @param this - * @param options - * @param settings - */ -async function createPrompt(options, settings) { - // override cancel callback - let cancelCallback; - /* istanbul ignore if */ - if (settings === null || settings === void 0 ? void 0 : settings.cancelCallback) { - cancelCallback = settings.cancelCallback; - } /* istanbul ignore next */ - else { - cancelCallback = defaultCancelCallback; - } - // assign default if there is single prompt - if (!Array.isArray(options)) { - options = [{ ...options, name: 'default' }]; - } /* istanbul ignore next */ - else if (options.length === 1) { - options = options.reduce((o, option) => { - return [...o, Object.assign(option, { name: 'default' })]; - }, []); - } - // assign default enquirer options - options = options.reduce((o, option) => { - var _a; - return [ - ...o, - Object.assign(option, { - // this is for outside calls, if it is not called from taskwrapper with bind - stdout: this instanceof task_wrapper_1.TaskWrapper ? (_a = settings === null || settings === void 0 ? void 0 : settings.stdout) !== null && _a !== void 0 ? _a : this.stdout() : process.stdout, - onCancel: cancelCallback.bind(this, settings) - }) - ]; - }, []); - let enquirer; - if (settings === null || settings === void 0 ? void 0 : settings.enquirer) { - // injected enquirer - enquirer = settings.enquirer; - } - else { - try { - enquirer = new (await Promise.resolve().then(() => require('enquirer')))(); - } /* istanbul ignore next */ - catch (e) { - this.task.prompt = new listr_error_interface_1.PromptError('Enquirer is a peer dependency that must be installed separately.'); - throw new Error(e); - } - } - // i use this externally as well, this is a bandaid - if (this instanceof task_wrapper_1.TaskWrapper) { - // Capture the prompt instance so we can use it later - enquirer.on('prompt', (prompt) => this.task.prompt = prompt); - // Clear the prompt instance once it's submitted - // Can't use on cancel, since that might hold a PromptError object - enquirer.on('submit', () => this.task.prompt = undefined); - this.task.subscribe((event) => { - if (event.type === event_constants_1.ListrEventType.STATE && event.data === state_constants_1.ListrTaskState.SKIPPED) { - if (this.task.prompt && !(this.task.prompt instanceof listr_error_interface_1.PromptError)) { - this.task.prompt.submit(); - } - } - }); - } - const response = (await enquirer.prompt(options)); - // return default name if it is single prompt - if (options.length === 1) { - return response.default; - } - else { - return response; - } -} -exports.createPrompt = createPrompt; -function destroyPrompt(throwError = false) { - if (!this.task.prompt || this.task.prompt instanceof listr_error_interface_1.PromptError) { - // If there's no prompt, can't cancel - return; - } - if (throwError) { - this.task.prompt.cancel(); - } - else { - this.task.prompt.submit(); - } -} -exports.destroyPrompt = destroyPrompt; -function defaultCancelCallback(settings) { - const errorMsg = 'Cancelled prompt.'; - if (this instanceof task_wrapper_1.TaskWrapper) { - this.task.prompt = new listr_error_interface_1.PromptError(errorMsg); - } /* istanbul ignore next */ - else if ((settings === null || settings === void 0 ? void 0 : settings.error) !== false) { - throw new Error(errorMsg); - } /* istanbul ignore next */ - else { - return errorMsg; - } -} diff --git a/node_modules/listr2/dist/utils/renderer.d.ts b/node_modules/listr2/dist/utils/renderer.d.ts deleted file mode 100644 index 72b41a55e..000000000 --- a/node_modules/listr2/dist/utils/renderer.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ListrOptions } from '../interfaces/listr.interface'; -import { SupportedRenderer, ListrRendererValue } from '../interfaces/renderer.interface'; -export declare function getRenderer(renderer: ListrRendererValue, fallbackRenderer?: ListrRendererValue, fallbackCondition?: ListrOptions['rendererFallback'], silentCondition?: ListrOptions['rendererSilent']): SupportedRenderer; diff --git a/node_modules/listr2/dist/utils/renderer.js b/node_modules/listr2/dist/utils/renderer.js deleted file mode 100644 index 758ce762b..000000000 --- a/node_modules/listr2/dist/utils/renderer.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getRenderer = void 0; -const default_renderer_1 = require("../renderer/default.renderer"); -const silent_renderer_1 = require("../renderer/silent.renderer"); -const simple_renderer_1 = require("../renderer/simple.renderer"); -const verbose_renderer_1 = require("../renderer/verbose.renderer"); -const assert_1 = require("./assert"); -const renderers = { - default: default_renderer_1.DefaultRenderer, - simple: simple_renderer_1.SimpleRenderer, - verbose: verbose_renderer_1.VerboseRenderer, - silent: silent_renderer_1.SilentRenderer -}; -function isRendererSupported(renderer) { - return process.stdout.isTTY === true || renderer.nonTTY === true; -} -function getRendererClass(renderer) { - if (typeof renderer === 'string') { - return renderers[renderer] || renderers.default; - } - return typeof renderer === 'function' ? renderer : renderers.default; -} -function getRenderer(renderer, fallbackRenderer, fallbackCondition, silentCondition) { - let returnValue; - let ret = getRendererClass(renderer); - returnValue = { renderer: ret, nonTTY: false }; - const evaluateSilent = (0, assert_1.assertFunctionOrSelf)(silentCondition); - const evaluateFallback = (0, assert_1.assertFunctionOrSelf)(fallbackCondition); - if (evaluateSilent) { - ret = getRendererClass('silent'); - returnValue = { renderer: ret, nonTTY: true }; - } - else if (!isRendererSupported(ret) || evaluateFallback) { - ret = getRendererClass(fallbackRenderer); - returnValue = { renderer: ret, nonTTY: true }; - } - return returnValue; -} -exports.getRenderer = getRenderer; diff --git a/node_modules/listr2/dist/utils/uuid.d.ts b/node_modules/listr2/dist/utils/uuid.d.ts deleted file mode 100644 index e0eadd957..000000000 --- a/node_modules/listr2/dist/utils/uuid.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/** Generate a basic uuid with no requirement of being unbelievable unique. */ -export declare function generateUUID(): string; diff --git a/node_modules/listr2/dist/utils/uuid.js b/node_modules/listr2/dist/utils/uuid.js deleted file mode 100644 index 952af489d..000000000 --- a/node_modules/listr2/dist/utils/uuid.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.generateUUID = void 0; -/** Generate a basic uuid with no requirement of being unbelievable unique. */ -function generateUUID() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { - const r = Math.random() * 16 || 0; - const v = c === 'x' ? r : r && 0x3 || 0x8; - return v.toString(16); - }); -} -exports.generateUUID = generateUUID; diff --git a/node_modules/listr2/package.json b/node_modules/listr2/package.json index 2055ad3a8..36a5f9b3a 100644 --- a/node_modules/listr2/package.json +++ b/node_modules/listr2/package.json @@ -1,8 +1,15 @@ { - "_from": "listr2@^3.13.5", - "_id": "listr2@3.14.0", + "_args": [ + [ + "listr2@4.0.2", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_development": true, + "_from": "listr2@4.0.2", + "_id": "listr2@4.0.2", "_inBundle": false, - "_integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", + "_integrity": "sha512-YcgwfCWpvPbj9FLUGqvdFvd3hrFWKpOeuXznRgfWEJ7RNr8b/IKKIKZABHx3aU+4CWN/iSAFFSReziQG6vTeIA==", "_location": "/listr2", "_phantomChildren": { "ansi-styles": "4.3.0", @@ -11,31 +18,29 @@ "string-width": "4.2.3" }, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "listr2@^3.13.5", + "raw": "listr2@4.0.2", "name": "listr2", "escapedName": "listr2", - "rawSpec": "^3.13.5", + "rawSpec": "4.0.2", "saveSpec": null, - "fetchSpec": "^3.13.5" + "fetchSpec": "4.0.2" }, "_requiredBy": [ "/lint-staged" ], - "_resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", - "_shasum": "23101cc62e1375fd5836b248276d1d2b51fdbe9e", - "_spec": "listr2@^3.13.5", - "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue/node_modules/lint-staged", + "_resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.2.tgz", + "_spec": "4.0.2", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", "author": { "name": "Cenk Kilic", "email": "cenk@kilic.dev", - "url": "https://srcs.kilic.dev" + "url": "https://cenk.kilic.dev" }, "bugs": { "url": "https://github.com/cenk1cenk2/listr2/issues" }, - "bundleDependencies": false, "config": { "commitizen": { "path": "./node_modules/@cenk1cenk2/cz-cc" @@ -47,43 +52,45 @@ "log-update": "^4.0.0", "p-map": "^4.0.0", "rfdc": "^1.3.0", - "rxjs": "^7.5.1", + "rxjs": "^7.5.2", "through": "^2.3.8", "wrap-ansi": "^7.0.0" }, - "deprecated": false, "description": "Terminal task list reborn! Create beautiful CLI interfaces via easy and logical to implement task lists that feel alive and interactive.", "devDependencies": { "@cenk1cenk2/cz-cc": "^1.4.11", - "@cenk1cenk2/eslint-config": "^1.0.9", + "@cenk1cenk2/eslint-config": "^2.4.0", "@types/clone": "^2.1.1", "@types/jest": "^27.4.0", - "@types/node": "^17.0.7", - "@types/rewire": "^2.5.28", + "@types/node": "^17.0.13", "@types/through": "^0.0.30", "@types/wrap-ansi": "^3.0.0", "delay": "^5.0.0", "enquirer": "^2.3.6", - "eslint": "^8.6.0", - "jest": "^27.4.5", + "eslint": "^8.8.0", + "jest": "^27.4.7", "jest-mock-process": "^1.4.1", - "lint-staged": "^11.2.6", + "lint-staged": "^12.3.2", "prettier": "^2.5.1", - "rewire": "^6.0.0", "rimraf": "^3.0.2", "simple-git-hooks": "^2.7.0", - "ts-jest": "^27.1.2", + "ts-jest": "^27.1.3", "ts-node": "^10.4.0", - "tsc-watch": "^4.6.0", "tsconfig-paths": "^3.12.0", - "tsconfig-replace-paths": "^0.0.11", - "tscpaths": "^0.0.9", - "typedoc": "^0.22.10", - "typedoc-plugin-markdown": "^3.11.8", - "typescript": "^4.5.4" + "tsup": "5.11.13", + "typedoc": "^0.22.11", + "typedoc-plugin-markdown": "^3.11.12", + "typescript": "^4.6.0-dev.20220131" }, "engines": { - "node": ">=10.0.0" + "node": ">=12" + }, + "exports": { + ".": { + "require": "./dist/index.cjs", + "import": "./dist/index.js", + "types": "./dist/index.d.ts" + } }, "homepage": "https://github.com/cenk1cenk2/listr2#readme", "keywords": [ @@ -114,7 +121,8 @@ "prettier --loglevel warn --write" ] }, - "main": "./dist/index.js", + "main": "./dist/index.cjs", + "module": "./dist/index.js", "name": "listr2", "peerDependencies": { "enquirer": ">= 2.3.0 < 3" @@ -129,26 +137,24 @@ "url": "git+https://github.com/cenk1cenk2/listr2.git" }, "scripts": { - "build": "tsc -P tsconfig.build.json", + "build": "tsup-node", "clean": "rimraf node_modules yarn.lock", - "dev:build": "yarn prebuild && tsc -p tsconfig.json && yarn postbuild", - "dev:start": "yarn dev:build && tsc-watch --noClear --onSuccess \"yarn postbuild\"", - "dev:test": "LISTR_DISABLE_COLOR=1 TS_NODE_PROJECT=tests/tsconfig.json node --inspect=0.0.0.0:${DEBUG_PORT:-9229} -r tsconfig-paths/register -r ts-node/register node_modules/jest/bin/jest.js --verbose --watchAll --config ./tests/jest.config.js", + "dev:start": "tsup-node --watch", + "dev:test": "TS_NODE_PROJECT=tests/tsconfig.json node --inspect=0.0.0.0:${DEBUG_PORT:-9229} -r tsconfig-paths/register -r ts-node/register node_modules/jest/bin/jest.js --verbose --watchAll --config ./tests/jest.config.cjs", "docs": "typedoc --options .typedoc.json --hideInPageTOC --hideBreadcrumbs", - "example": "ts-node -r tsconfig-paths/register", - "lint": "prettier --loglevel warn --write src/ tests/ examples/ && eslint --ext .ts,.js,.tsx,.jsx --fix src/ tests/ examples/", - "lint:check": "eslint --ext .ts,.js,.tsx,.jsx src/", - "postbuild": "tsconfig-replace-paths --project tsconfig.build.json", - "prebuild": "rimraf tsconfig*.tsbuildinfo && rimraf dist/", + "example": "ts-node -r tsconfig-paths/register --project examples/tsconfig.json", + "lint": "prettier --loglevel warn --write src/ tests/ examples/ && yarn run lint:check --fix", + "lint:check": "eslint --ext .ts,.js,.tsx,.jsx src/ tests/ examples/", "read-snapshot": "./tests/read-terminal-snapshots.sh", - "test": "LISTR_DISABLE_COLOR=1 ts-node -P tests/tsconfig.json -r tsconfig-paths/register node_modules/jest/bin/jest.js --config ./tests/jest.config.js", - "test:cov": "LISTR_DISABLE_COLOR=1 ts-node -P tests/tsconfig.json -r tsconfig-paths/register node_modules/jest/bin/jest.js --coverage --config ./tests/jest.config.js" + "test": "ts-node -P tests/tsconfig.json -r tsconfig-paths/register node_modules/jest/bin/jest.js --config ./tests/jest.config.cjs", + "test:cov": "ts-node -P tests/tsconfig.json -r tsconfig-paths/register node_modules/jest/bin/jest.js --coverage --config ./tests/jest.config.cjs" }, "simple-git-hooks": { - "pre-commit": "yarn exec lint-staged", + "pre-commit": "yarn lint-staged", "prepare-commit-msg": "[ -t 1 ] && exec < /dev/tty && git cz --hook || true", "pre-push": "yarn test" }, + "type": "module", "types": "./dist/index.d.ts", - "version": "3.14.0" + "version": "4.0.2" } diff --git a/node_modules/node-fetch/CHANGELOG.md b/node_modules/node-fetch/CHANGELOG.md deleted file mode 100644 index 543d3d947..000000000 --- a/node_modules/node-fetch/CHANGELOG.md +++ /dev/null @@ -1,272 +0,0 @@ - -Changelog -========= - - -# 2.x release - -## v2.6.1 - -**This is an important security release. It is strongly recommended to update as soon as possible.** - -- Fix: honor the `size` option after following a redirect. - -## v2.6.0 - -- Enhance: `options.agent`, it now accepts a function that returns custom http(s).Agent instance based on current URL, see readme for more information. -- Fix: incorrect `Content-Length` was returned for stream body in 2.5.0 release; note that `node-fetch` doesn't calculate content length for stream body. -- Fix: `Response.url` should return empty string instead of `null` by default. - -## v2.5.0 - -- Enhance: `Response` object now includes `redirected` property. -- Enhance: `fetch()` now accepts third-party `Blob` implementation as body. -- Other: disable `package-lock.json` generation as we never commit them. -- Other: dev dependency update. -- Other: readme update. - -## v2.4.1 - -- Fix: `Blob` import rule for node < 10, as `Readable` isn't a named export. - -## v2.4.0 - -- Enhance: added `Brotli` compression support (using node's zlib). -- Enhance: updated `Blob` implementation per spec. -- Fix: set content type automatically for `URLSearchParams`. -- Fix: `Headers` now reject empty header names. -- Fix: test cases, as node 12+ no longer accepts invalid header response. - -## v2.3.0 - -- Enhance: added `AbortSignal` support, with README example. -- Enhance: handle invalid `Location` header during redirect by rejecting them explicitly with `FetchError`. -- Fix: update `browser.js` to support react-native environment, where `self` isn't available globally. - -## v2.2.1 - -- Fix: `compress` flag shouldn't overwrite existing `Accept-Encoding` header. -- Fix: multiple `import` rules, where `PassThrough` etc. doesn't have a named export when using node <10 and `--exerimental-modules` flag. -- Other: Better README. - -## v2.2.0 - -- Enhance: Support all `ArrayBuffer` view types -- Enhance: Support Web Workers -- Enhance: Support Node.js' `--experimental-modules` mode; deprecate `.es.js` file -- Fix: Add `__esModule` property to the exports object -- Other: Better example in README for writing response to a file -- Other: More tests for Agent - -## v2.1.2 - -- Fix: allow `Body` methods to work on `ArrayBuffer`-backed `Body` objects -- Fix: reject promise returned by `Body` methods when the accumulated `Buffer` exceeds the maximum size -- Fix: support custom `Host` headers with any casing -- Fix: support importing `fetch()` from TypeScript in `browser.js` -- Fix: handle the redirect response body properly - -## v2.1.1 - -Fix packaging errors in v2.1.0. - -## v2.1.0 - -- Enhance: allow using ArrayBuffer as the `body` of a `fetch()` or `Request` -- Fix: store HTTP headers of a `Headers` object internally with the given case, for compatibility with older servers that incorrectly treated header names in a case-sensitive manner -- Fix: silently ignore invalid HTTP headers -- Fix: handle HTTP redirect responses without a `Location` header just like non-redirect responses -- Fix: include bodies when following a redirection when appropriate - -## v2.0.0 - -This is a major release. Check [our upgrade guide](https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md) for an overview on some key differences between v1 and v2. - -### General changes - -- Major: Node.js 0.10.x and 0.12.x support is dropped -- Major: `require('node-fetch/lib/response')` etc. is now unsupported; use `require('node-fetch').Response` or ES6 module imports -- Enhance: start testing on Node.js v4.x, v6.x, v8.x LTS, as well as v9.x stable -- Enhance: use Rollup to produce a distributed bundle (less memory overhead and faster startup) -- Enhance: make `Object.prototype.toString()` on Headers, Requests, and Responses return correct class strings -- Other: rewrite in ES2015 using Babel -- Other: use Codecov for code coverage tracking -- Other: update package.json script for npm 5 -- Other: `encoding` module is now optional (alpha.7) -- Other: expose browser.js through package.json, avoid bundling mishaps (alpha.9) -- Other: allow TypeScript to `import` node-fetch by exposing default (alpha.9) - -### HTTP requests - -- Major: overwrite user's `Content-Length` if we can be sure our information is correct (per spec) -- Fix: errors in a response are caught before the body is accessed -- Fix: support WHATWG URL objects, created by `whatwg-url` package or `require('url').URL` in Node.js 7+ - -### Response and Request classes - -- Major: `response.text()` no longer attempts to detect encoding, instead always opting for UTF-8 (per spec); use `response.textConverted()` for the v1 behavior -- Major: make `response.json()` throw error instead of returning an empty object on 204 no-content respose (per spec; reverts behavior changed in v1.6.2) -- Major: internal methods are no longer exposed -- Major: throw error when a `GET` or `HEAD` Request is constructed with a non-null body (per spec) -- Enhance: add `response.arrayBuffer()` (also applies to Requests) -- Enhance: add experimental `response.blob()` (also applies to Requests) -- Enhance: `URLSearchParams` is now accepted as a body -- Enhance: wrap `response.json()` json parsing error as `FetchError` -- Fix: fix Request and Response with `null` body - -### Headers class - -- Major: remove `headers.getAll()`; make `get()` return all headers delimited by commas (per spec) -- Enhance: make Headers iterable -- Enhance: make Headers constructor accept an array of tuples -- Enhance: make sure header names and values are valid in HTTP -- Fix: coerce Headers prototype function parameters to strings, where applicable - -### Documentation - -- Enhance: more comprehensive API docs -- Enhance: add a list of default headers in README - - -# 1.x release - -## backport releases (v1.7.0 and beyond) - -See [changelog on 1.x branch](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) for details. - -## v1.6.3 - -- Enhance: error handling document to explain `FetchError` design -- Fix: support `form-data` 2.x releases (requires `form-data` >= 2.1.0) - -## v1.6.2 - -- Enhance: minor document update -- Fix: response.json() returns empty object on 204 no-content response instead of throwing a syntax error - -## v1.6.1 - -- Fix: if `res.body` is a non-stream non-formdata object, we will call `body.toString` and send it as a string -- Fix: `counter` value is incorrectly set to `follow` value when wrapping Request instance -- Fix: documentation update - -## v1.6.0 - -- Enhance: added `res.buffer()` api for convenience, it returns body as a Node.js buffer -- Enhance: better old server support by handling raw deflate response -- Enhance: skip encoding detection for non-HTML/XML response -- Enhance: minor document update -- Fix: HEAD request doesn't need decompression, as body is empty -- Fix: `req.body` now accepts a Node.js buffer - -## v1.5.3 - -- Fix: handle 204 and 304 responses when body is empty but content-encoding is gzip/deflate -- Fix: allow resolving response and cloned response in any order -- Fix: avoid setting `content-length` when `form-data` body use streams -- Fix: send DELETE request with content-length when body is present -- Fix: allow any url when calling new Request, but still reject non-http(s) url in fetch - -## v1.5.2 - -- Fix: allow node.js core to handle keep-alive connection pool when passing a custom agent - -## v1.5.1 - -- Fix: redirect mode `manual` should work even when there is no redirection or broken redirection - -## v1.5.0 - -- Enhance: rejected promise now use custom `Error` (thx to @pekeler) -- Enhance: `FetchError` contains `err.type` and `err.code`, allows for better error handling (thx to @pekeler) -- Enhance: basic support for redirect mode `manual` and `error`, allows for location header extraction (thx to @jimmywarting for the initial PR) - -## v1.4.1 - -- Fix: wrapping Request instance with FormData body again should preserve the body as-is - -## v1.4.0 - -- Enhance: Request and Response now have `clone` method (thx to @kirill-konshin for the initial PR) -- Enhance: Request and Response now have proper string and buffer body support (thx to @kirill-konshin) -- Enhance: Body constructor has been refactored out (thx to @kirill-konshin) -- Enhance: Headers now has `forEach` method (thx to @tricoder42) -- Enhance: back to 100% code coverage -- Fix: better form-data support (thx to @item4) -- Fix: better character encoding detection under chunked encoding (thx to @dsuket for the initial PR) - -## v1.3.3 - -- Fix: make sure `Content-Length` header is set when body is string for POST/PUT/PATCH requests -- Fix: handle body stream error, for cases such as incorrect `Content-Encoding` header -- Fix: when following certain redirects, use `GET` on subsequent request per Fetch Spec -- Fix: `Request` and `Response` constructors now parse headers input using `Headers` - -## v1.3.2 - -- Enhance: allow auto detect of form-data input (no `FormData` spec on node.js, this is form-data specific feature) - -## v1.3.1 - -- Enhance: allow custom host header to be set (server-side only feature, as it's a forbidden header on client-side) - -## v1.3.0 - -- Enhance: now `fetch.Request` is exposed as well - -## v1.2.1 - -- Enhance: `Headers` now normalized `Number` value to `String`, prevent common mistakes - -## v1.2.0 - -- Enhance: now fetch.Headers and fetch.Response are exposed, making testing easier - -## v1.1.2 - -- Fix: `Headers` should only support `String` and `Array` properties, and ignore others - -## v1.1.1 - -- Enhance: now req.headers accept both plain object and `Headers` instance - -## v1.1.0 - -- Enhance: timeout now also applies to response body (in case of slow response) -- Fix: timeout is now cleared properly when fetch is done/has failed - -## v1.0.6 - -- Fix: less greedy content-type charset matching - -## v1.0.5 - -- Fix: when `follow = 0`, fetch should not follow redirect -- Enhance: update tests for better coverage -- Enhance: code formatting -- Enhance: clean up doc - -## v1.0.4 - -- Enhance: test iojs support -- Enhance: timeout attached to socket event only fire once per redirect - -## v1.0.3 - -- Fix: response size limit should reject large chunk -- Enhance: added character encoding detection for xml, such as rss/atom feed (encoding in DTD) - -## v1.0.2 - -- Fix: added res.ok per spec change - -## v1.0.0 - -- Enhance: better test coverage and doc - - -# 0.x release - -## v0.1 - -- Major: initial public release diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js index 61906c959..4852f7cba 100644 --- a/node_modules/node-fetch/lib/index.es.js +++ b/node_modules/node-fetch/lib/index.es.js @@ -3,6 +3,7 @@ process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); import Stream from 'stream'; import http from 'http'; import Url from 'url'; +import whatwgUrl from 'whatwg-url'; import https from 'https'; import zlib from 'zlib'; @@ -1137,11 +1138,32 @@ Object.defineProperty(Response.prototype, Symbol.toStringTag, { }); const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; // fix an issue where "format", "parse" aren't a named export for node <10 const parse_url = Url.parse; const format_url = Url.format; +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; /** @@ -1178,14 +1200,14 @@ class Request { // in order to support Node.js' Url objects; though WHATWG's URL objects // will fall into this branch also (since their `toString()` will return // `href` property anyway) - parsedURL = parse_url(input.href); + parsedURL = parseURL(input.href); } else { // coerce input to a string before attempting to parse - parsedURL = parse_url(`${input}`); + parsedURL = parseURL(`${input}`); } input = {}; } else { - parsedURL = parse_url(input.url); + parsedURL = parseURL(input.url); } let method = init.method || input.method || 'GET'; @@ -1379,9 +1401,17 @@ AbortError.prototype = Object.create(Error.prototype); AbortError.prototype.constructor = AbortError; AbortError.prototype.name = 'AbortError'; +const URL$1 = Url.URL || whatwgUrl.URL; + // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 const PassThrough$1 = Stream.PassThrough; -const resolve_url = Url.resolve; + +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; + + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; /** * Fetch function @@ -1469,7 +1499,19 @@ function fetch(url, opts) { const location = headers.get('Location'); // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } // HTTP fetch step 5.5 switch (request.redirect) { @@ -1517,6 +1559,12 @@ function fetch(url, opts) { size: request.size }; + if (!isDomainOrSubdomain(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + // HTTP-redirect fetch step 9 if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js index 4b241bfbf..e5b04f107 100644 --- a/node_modules/node-fetch/lib/index.js +++ b/node_modules/node-fetch/lib/index.js @@ -7,6 +7,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau var Stream = _interopDefault(require('stream')); var http = _interopDefault(require('http')); var Url = _interopDefault(require('url')); +var whatwgUrl = _interopDefault(require('whatwg-url')); var https = _interopDefault(require('https')); var zlib = _interopDefault(require('zlib')); @@ -1141,11 +1142,32 @@ Object.defineProperty(Response.prototype, Symbol.toStringTag, { }); const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; // fix an issue where "format", "parse" aren't a named export for node <10 const parse_url = Url.parse; const format_url = Url.format; +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; /** @@ -1182,14 +1204,14 @@ class Request { // in order to support Node.js' Url objects; though WHATWG's URL objects // will fall into this branch also (since their `toString()` will return // `href` property anyway) - parsedURL = parse_url(input.href); + parsedURL = parseURL(input.href); } else { // coerce input to a string before attempting to parse - parsedURL = parse_url(`${input}`); + parsedURL = parseURL(`${input}`); } input = {}; } else { - parsedURL = parse_url(input.url); + parsedURL = parseURL(input.url); } let method = init.method || input.method || 'GET'; @@ -1383,9 +1405,17 @@ AbortError.prototype = Object.create(Error.prototype); AbortError.prototype.constructor = AbortError; AbortError.prototype.name = 'AbortError'; +const URL$1 = Url.URL || whatwgUrl.URL; + // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 const PassThrough$1 = Stream.PassThrough; -const resolve_url = Url.resolve; + +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; + + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; /** * Fetch function @@ -1473,7 +1503,19 @@ function fetch(url, opts) { const location = headers.get('Location'); // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } // HTTP fetch step 5.5 switch (request.redirect) { @@ -1521,6 +1563,12 @@ function fetch(url, opts) { size: request.size }; + if (!isDomainOrSubdomain(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + // HTTP-redirect fetch step 9 if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs index ecf59af8c..49ee05ecf 100644 --- a/node_modules/node-fetch/lib/index.mjs +++ b/node_modules/node-fetch/lib/index.mjs @@ -1,6 +1,7 @@ import Stream from 'stream'; import http from 'http'; import Url from 'url'; +import whatwgUrl from 'whatwg-url'; import https from 'https'; import zlib from 'zlib'; @@ -1135,11 +1136,32 @@ Object.defineProperty(Response.prototype, Symbol.toStringTag, { }); const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; // fix an issue where "format", "parse" aren't a named export for node <10 const parse_url = Url.parse; const format_url = Url.format; +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; /** @@ -1176,14 +1198,14 @@ class Request { // in order to support Node.js' Url objects; though WHATWG's URL objects // will fall into this branch also (since their `toString()` will return // `href` property anyway) - parsedURL = parse_url(input.href); + parsedURL = parseURL(input.href); } else { // coerce input to a string before attempting to parse - parsedURL = parse_url(`${input}`); + parsedURL = parseURL(`${input}`); } input = {}; } else { - parsedURL = parse_url(input.url); + parsedURL = parseURL(input.url); } let method = init.method || input.method || 'GET'; @@ -1377,9 +1399,17 @@ AbortError.prototype = Object.create(Error.prototype); AbortError.prototype.constructor = AbortError; AbortError.prototype.name = 'AbortError'; +const URL$1 = Url.URL || whatwgUrl.URL; + // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 const PassThrough$1 = Stream.PassThrough; -const resolve_url = Url.resolve; + +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; + + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; /** * Fetch function @@ -1467,7 +1497,19 @@ function fetch(url, opts) { const location = headers.get('Location'); // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } // HTTP fetch step 5.5 switch (request.redirect) { @@ -1515,6 +1557,12 @@ function fetch(url, opts) { size: request.size }; + if (!isDomainOrSubdomain(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + // HTTP-redirect fetch step 9 if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); diff --git a/node_modules/node-fetch/node_modules/tr46/.npmignore b/node_modules/node-fetch/node_modules/tr46/.npmignore new file mode 100644 index 000000000..96e9161fd --- /dev/null +++ b/node_modules/node-fetch/node_modules/tr46/.npmignore @@ -0,0 +1,4 @@ +scripts/ +test/ + +!lib/mapping_table.json diff --git a/node_modules/node-fetch/node_modules/tr46/index.js b/node_modules/node-fetch/node_modules/tr46/index.js new file mode 100644 index 000000000..9ce12ca2d --- /dev/null +++ b/node_modules/node-fetch/node_modules/tr46/index.js @@ -0,0 +1,193 @@ +"use strict"; + +var punycode = require("punycode"); +var mappingTable = require("./lib/mappingTable.json"); + +var PROCESSING_OPTIONS = { + TRANSITIONAL: 0, + NONTRANSITIONAL: 1 +}; + +function normalize(str) { // fix bug in v8 + return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000'); +} + +function findStatus(val) { + var start = 0; + var end = mappingTable.length - 1; + + while (start <= end) { + var mid = Math.floor((start + end) / 2); + + var target = mappingTable[mid]; + if (target[0][0] <= val && target[0][1] >= val) { + return target; + } else if (target[0][0] > val) { + end = mid - 1; + } else { + start = mid + 1; + } + } + + return null; +} + +var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + +function countSymbols(string) { + return string + // replace every surrogate pair with a BMP symbol + .replace(regexAstralSymbols, '_') + // then get the length + .length; +} + +function mapChars(domain_name, useSTD3, processing_option) { + var hasError = false; + var processed = ""; + + var len = countSymbols(domain_name); + for (var i = 0; i < len; ++i) { + var codePoint = domain_name.codePointAt(i); + var status = findStatus(codePoint); + + switch (status[1]) { + case "disallowed": + hasError = true; + processed += String.fromCodePoint(codePoint); + break; + case "ignored": + break; + case "mapped": + processed += String.fromCodePoint.apply(String, status[2]); + break; + case "deviation": + if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) { + processed += String.fromCodePoint.apply(String, status[2]); + } else { + processed += String.fromCodePoint(codePoint); + } + break; + case "valid": + processed += String.fromCodePoint(codePoint); + break; + case "disallowed_STD3_mapped": + if (useSTD3) { + hasError = true; + processed += String.fromCodePoint(codePoint); + } else { + processed += String.fromCodePoint.apply(String, status[2]); + } + break; + case "disallowed_STD3_valid": + if (useSTD3) { + hasError = true; + } + + processed += String.fromCodePoint(codePoint); + break; + } + } + + return { + string: processed, + error: hasError + }; +} + +var 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]/; + +function validateLabel(label, processing_option) { + if (label.substr(0, 4) === "xn--") { + label = punycode.toUnicode(label); + processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; + } + + var error = false; + + if (normalize(label) !== label || + (label[3] === "-" && label[4] === "-") || + label[0] === "-" || label[label.length - 1] === "-" || + label.indexOf(".") !== -1 || + label.search(combiningMarksRegex) === 0) { + error = true; + } + + var len = countSymbols(label); + for (var i = 0; i < len; ++i) { + var status = findStatus(label.codePointAt(i)); + if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") || + (processing === PROCESSING_OPTIONS.NONTRANSITIONAL && + status[1] !== "valid" && status[1] !== "deviation")) { + error = true; + break; + } + } + + return { + label: label, + error: error + }; +} + +function processing(domain_name, useSTD3, processing_option) { + var result = mapChars(domain_name, useSTD3, processing_option); + result.string = normalize(result.string); + + var labels = result.string.split("."); + for (var i = 0; i < labels.length; ++i) { + try { + var validation = validateLabel(labels[i]); + labels[i] = validation.label; + result.error = result.error || validation.error; + } catch(e) { + result.error = true; + } + } + + return { + string: labels.join("."), + error: result.error + }; +} + +module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { + var result = processing(domain_name, useSTD3, processing_option); + var labels = result.string.split("."); + labels = labels.map(function(l) { + try { + return punycode.toASCII(l); + } catch(e) { + result.error = true; + return l; + } + }); + + if (verifyDnsLength) { + var total = labels.slice(0, labels.length - 1).join(".").length; + if (total.length > 253 || total.length === 0) { + result.error = true; + } + + for (var i=0; i < labels.length; ++i) { + if (labels.length > 63 || labels.length === 0) { + result.error = true; + break; + } + } + } + + if (result.error) return null; + return labels.join("."); +}; + +module.exports.toUnicode = function(domain_name, useSTD3) { + var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL); + + return { + domain: result.string, + error: result.error + }; +}; + +module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; diff --git a/node_modules/node-fetch/node_modules/tr46/lib/.gitkeep b/node_modules/node-fetch/node_modules/tr46/lib/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/node_modules/node-fetch/node_modules/tr46/lib/mappingTable.json b/node_modules/node-fetch/node_modules/tr46/lib/mappingTable.json new file mode 100644 index 000000000..89cf19a74 --- /dev/null +++ b/node_modules/node-fetch/node_modules/tr46/lib/mappingTable.json @@ -0,0 +1 @@ +[[[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"]] \ No newline at end of file diff --git a/node_modules/node-fetch/node_modules/tr46/package.json b/node_modules/node-fetch/node_modules/tr46/package.json new file mode 100644 index 000000000..8bc11de6f --- /dev/null +++ b/node_modules/node-fetch/node_modules/tr46/package.json @@ -0,0 +1,62 @@ +{ + "_args": [ + [ + "tr46@0.0.3", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_from": "tr46@0.0.3", + "_id": "tr46@0.0.3", + "_inBundle": false, + "_integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "_location": "/node-fetch/tr46", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "tr46@0.0.3", + "name": "tr46", + "escapedName": "tr46", + "rawSpec": "0.0.3", + "saveSpec": null, + "fetchSpec": "0.0.3" + }, + "_requiredBy": [ + "/node-fetch/whatwg-url" + ], + "_resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "_spec": "0.0.3", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", + "author": { + "name": "Sebastian Mayr", + "email": "npm@smayr.name" + }, + "bugs": { + "url": "https://github.com/Sebmaster/tr46.js/issues" + }, + "description": "An implementation of the Unicode TR46 spec", + "devDependencies": { + "mocha": "^2.2.5", + "request": "^2.57.0" + }, + "homepage": "https://github.com/Sebmaster/tr46.js#readme", + "keywords": [ + "unicode", + "tr46", + "url", + "whatwg" + ], + "license": "MIT", + "main": "index.js", + "name": "tr46", + "repository": { + "type": "git", + "url": "git+https://github.com/Sebmaster/tr46.js.git" + }, + "scripts": { + "prepublish": "node scripts/generateMappingTable.js", + "pretest": "node scripts/getLatestUnicodeTests.js", + "test": "mocha" + }, + "version": "0.0.3" +} diff --git a/node_modules/node-fetch/node_modules/webidl-conversions/LICENSE.md b/node_modules/node-fetch/node_modules/webidl-conversions/LICENSE.md new file mode 100644 index 000000000..d4a994f50 --- /dev/null +++ b/node_modules/node-fetch/node_modules/webidl-conversions/LICENSE.md @@ -0,0 +1,12 @@ +# The BSD 2-Clause License + +Copyright (c) 2014, Domenic Denicola +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/node-fetch/node_modules/webidl-conversions/README.md b/node_modules/node-fetch/node_modules/webidl-conversions/README.md new file mode 100644 index 000000000..3657890a1 --- /dev/null +++ b/node_modules/node-fetch/node_modules/webidl-conversions/README.md @@ -0,0 +1,53 @@ +# WebIDL Type Conversions on JavaScript Values + +This package implements, in JavaScript, the algorithms to convert a given JavaScript value according to a given [WebIDL](http://heycam.github.io/webidl/) [type](http://heycam.github.io/webidl/#idl-types). + +The goal is that you should be able to write code like + +```js +const conversions = require("webidl-conversions"); + +function doStuff(x, y) { + x = conversions["boolean"](x); + y = conversions["unsigned long"](y); + // actual algorithm code here +} +``` + +and your function `doStuff` will behave the same as a WebIDL operation declared as + +```webidl +void doStuff(boolean x, unsigned long y); +``` + +## API + +This package's main module's default export is an object with a variety of methods, each corresponding to a different WebIDL type. Each method, when invoked on a JavaScript value, will give back the new JavaScript value that results after passing through the WebIDL conversion rules. (See below for more details on what that means.) Alternately, the method could throw an error, if the WebIDL algorithm is specified to do so: for example `conversions["float"](NaN)` [will throw a `TypeError`](http://heycam.github.io/webidl/#es-float). + +## Status + +All of the numeric types are implemented (float being implemented as double) and some others are as well - check the source for all of them. This list will grow over time in service of the [HTML as Custom Elements](https://github.com/dglazkov/html-as-custom-elements) project, but in the meantime, pull requests welcome! + +I'm not sure yet what the strategy will be for modifiers, e.g. [`[Clamp]`](http://heycam.github.io/webidl/#Clamp). Maybe something like `conversions["unsigned long"](x, { clamp: true })`? We'll see. + +We might also want to extend the API to give better error messages, e.g. "Argument 1 of HTMLMediaElement.fastSeek is not a finite floating-point value" instead of "Argument is not a finite floating-point value." This would require passing in more information to the conversion functions than we currently do. + +## Background + +What's actually going on here, conceptually, is pretty weird. Let's try to explain. + +WebIDL, as part of its madness-inducing design, has its own type system. When people write algorithms in web platform specs, they usually operate on WebIDL values, i.e. instances of WebIDL types. For example, if they were specifying the algorithm for our `doStuff` operation above, they would treat `x` as a WebIDL value of [WebIDL type `boolean`](http://heycam.github.io/webidl/#idl-boolean). Crucially, they would _not_ treat `x` as a JavaScript variable whose value is either the JavaScript `true` or `false`. They're instead working in a different type system altogether, with its own rules. + +Separately from its type system, WebIDL defines a ["binding"](http://heycam.github.io/webidl/#ecmascript-binding) of the type system into JavaScript. This contains rules like: when you pass a JavaScript value to the JavaScript method that manifests a given WebIDL operation, how does that get converted into a WebIDL value? For example, a JavaScript `true` passed in the position of a WebIDL `boolean` argument becomes a WebIDL `true`. But, a JavaScript `true` passed in the position of a [WebIDL `unsigned long`](http://heycam.github.io/webidl/#idl-unsigned-long) becomes a WebIDL `1`. And so on. + +Finally, we have the actual implementation code. This is usually C++, although these days [some smart people are using Rust](https://github.com/servo/servo). The implementation, of course, has its own type system. So when they implement the WebIDL algorithms, they don't actually use WebIDL values, since those aren't "real" outside of specs. Instead, implementations apply the WebIDL binding rules in such a way as to convert incoming JavaScript values into C++ values. For example, if code in the browser called `doStuff(true, true)`, then the implementation code would eventually receive a C++ `bool` containing `true` and a C++ `uint32_t` containing `1`. + +The upside of all this is that implementations can abstract all the conversion logic away, letting WebIDL handle it, and focus on implementing the relevant methods in C++ with values of the correct type already provided. That is payoff of WebIDL, in a nutshell. + +And getting to that payoff is the goal of _this_ project—but for JavaScript implementations, instead of C++ ones. That is, this library is designed to make it easier for JavaScript developers to write functions that behave like a given WebIDL operation. So conceptually, the conversion pipeline, which in its general form is JavaScript values ↦ WebIDL values ↦ implementation-language values, in this case becomes JavaScript values ↦ WebIDL values ↦ JavaScript values. And that intermediate step is where all the logic is performed: a JavaScript `true` becomes a WebIDL `1` in an unsigned long context, which then becomes a JavaScript `1`. + +## Don't Use This + +Seriously, why would you ever use this? You really shouldn't. WebIDL is … not great, and you shouldn't be emulating its semantics. If you're looking for a generic argument-processing library, you should find one with better rules than those from WebIDL. In general, your JavaScript should not be trying to become more like WebIDL; if anything, we should fix WebIDL to make it more like JavaScript. + +The _only_ people who should use this are those trying to create faithful implementations (or polyfills) of web platform interfaces defined in WebIDL. diff --git a/node_modules/node-fetch/node_modules/webidl-conversions/lib/index.js b/node_modules/node-fetch/node_modules/webidl-conversions/lib/index.js new file mode 100644 index 000000000..c5153a3ab --- /dev/null +++ b/node_modules/node-fetch/node_modules/webidl-conversions/lib/index.js @@ -0,0 +1,189 @@ +"use strict"; + +var conversions = {}; +module.exports = conversions; + +function sign(x) { + return x < 0 ? -1 : 1; +} + +function evenRound(x) { + // Round x to the nearest integer, choosing the even integer if it lies halfway between two. + if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor) + return Math.floor(x); + } else { + return Math.round(x); + } +} + +function createNumberConversion(bitLength, typeOpts) { + if (!typeOpts.unsigned) { + --bitLength; + } + const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength); + const upperBound = Math.pow(2, bitLength) - 1; + + const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength); + const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1); + + return function(V, opts) { + if (!opts) opts = {}; + + let x = +V; + + if (opts.enforceRange) { + if (!Number.isFinite(x)) { + throw new TypeError("Argument is not a finite number"); + } + + x = sign(x) * Math.floor(Math.abs(x)); + if (x < lowerBound || x > upperBound) { + throw new TypeError("Argument is not in byte range"); + } + + return x; + } + + if (!isNaN(x) && opts.clamp) { + x = evenRound(x); + + if (x < lowerBound) x = lowerBound; + if (x > upperBound) x = upperBound; + return x; + } + + if (!Number.isFinite(x) || x === 0) { + return 0; + } + + x = sign(x) * Math.floor(Math.abs(x)); + x = x % moduloVal; + + if (!typeOpts.unsigned && x >= moduloBound) { + return x - moduloVal; + } else if (typeOpts.unsigned) { + if (x < 0) { + x += moduloVal; + } else if (x === -0) { // don't return negative zero + return 0; + } + } + + return x; + } +} + +conversions["void"] = function () { + return undefined; +}; + +conversions["boolean"] = function (val) { + return !!val; +}; + +conversions["byte"] = createNumberConversion(8, { unsigned: false }); +conversions["octet"] = createNumberConversion(8, { unsigned: true }); + +conversions["short"] = createNumberConversion(16, { unsigned: false }); +conversions["unsigned short"] = createNumberConversion(16, { unsigned: true }); + +conversions["long"] = createNumberConversion(32, { unsigned: false }); +conversions["unsigned long"] = createNumberConversion(32, { unsigned: true }); + +conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 }); +conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 }); + +conversions["double"] = function (V) { + const x = +V; + + if (!Number.isFinite(x)) { + throw new TypeError("Argument is not a finite floating-point value"); + } + + return x; +}; + +conversions["unrestricted double"] = function (V) { + const x = +V; + + if (isNaN(x)) { + throw new TypeError("Argument is NaN"); + } + + return x; +}; + +// not quite valid, but good enough for JS +conversions["float"] = conversions["double"]; +conversions["unrestricted float"] = conversions["unrestricted double"]; + +conversions["DOMString"] = function (V, opts) { + if (!opts) opts = {}; + + if (opts.treatNullAsEmptyString && V === null) { + return ""; + } + + return String(V); +}; + +conversions["ByteString"] = function (V, opts) { + const x = String(V); + let c = undefined; + for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { + if (c > 255) { + throw new TypeError("Argument is not a valid bytestring"); + } + } + + return x; +}; + +conversions["USVString"] = function (V) { + const S = String(V); + const n = S.length; + const U = []; + for (let i = 0; i < n; ++i) { + const c = S.charCodeAt(i); + if (c < 0xD800 || c > 0xDFFF) { + U.push(String.fromCodePoint(c)); + } else if (0xDC00 <= c && c <= 0xDFFF) { + U.push(String.fromCodePoint(0xFFFD)); + } else { + if (i === n - 1) { + U.push(String.fromCodePoint(0xFFFD)); + } else { + const d = S.charCodeAt(i + 1); + if (0xDC00 <= d && d <= 0xDFFF) { + const a = c & 0x3FF; + const b = d & 0x3FF; + U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b)); + ++i; + } else { + U.push(String.fromCodePoint(0xFFFD)); + } + } + } + } + + return U.join(''); +}; + +conversions["Date"] = function (V, opts) { + if (!(V instanceof Date)) { + throw new TypeError("Argument is not a Date object"); + } + if (isNaN(V)) { + return undefined; + } + + return V; +}; + +conversions["RegExp"] = function (V, opts) { + if (!(V instanceof RegExp)) { + V = new RegExp(V); + } + + return V; +}; diff --git a/node_modules/node-fetch/node_modules/webidl-conversions/package.json b/node_modules/node-fetch/node_modules/webidl-conversions/package.json new file mode 100644 index 000000000..279f8b942 --- /dev/null +++ b/node_modules/node-fetch/node_modules/webidl-conversions/package.json @@ -0,0 +1,62 @@ +{ + "_args": [ + [ + "webidl-conversions@3.0.1", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_from": "webidl-conversions@3.0.1", + "_id": "webidl-conversions@3.0.1", + "_inBundle": false, + "_integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "_location": "/node-fetch/webidl-conversions", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "webidl-conversions@3.0.1", + "name": "webidl-conversions", + "escapedName": "webidl-conversions", + "rawSpec": "3.0.1", + "saveSpec": null, + "fetchSpec": "3.0.1" + }, + "_requiredBy": [ + "/node-fetch/whatwg-url" + ], + "_resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "_spec": "3.0.1", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", + "author": { + "name": "Domenic Denicola", + "email": "d@domenic.me", + "url": "https://domenic.me/" + }, + "bugs": { + "url": "https://github.com/jsdom/webidl-conversions/issues" + }, + "description": "Implements the WebIDL algorithms for converting to and from JavaScript values", + "devDependencies": { + "mocha": "^1.21.4" + }, + "files": [ + "lib/" + ], + "homepage": "https://github.com/jsdom/webidl-conversions#readme", + "keywords": [ + "webidl", + "web", + "types" + ], + "license": "BSD-2-Clause", + "main": "lib/index.js", + "name": "webidl-conversions", + "repository": { + "type": "git", + "url": "git+https://github.com/jsdom/webidl-conversions.git" + }, + "scripts": { + "test": "mocha test/*.js" + }, + "version": "3.0.1" +} diff --git a/node_modules/ansi-colors/LICENSE b/node_modules/node-fetch/node_modules/whatwg-url/LICENSE.txt similarity index 95% rename from node_modules/ansi-colors/LICENSE rename to node_modules/node-fetch/node_modules/whatwg-url/LICENSE.txt index 8749cc754..54dfac39d 100644 --- a/node_modules/ansi-colors/LICENSE +++ b/node_modules/node-fetch/node_modules/whatwg-url/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-present, Brian Woodward. +Copyright (c) 2015–2016 Sebastian Mayr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/node-fetch/node_modules/whatwg-url/README.md b/node_modules/node-fetch/node_modules/whatwg-url/README.md new file mode 100644 index 000000000..4347a7fc5 --- /dev/null +++ b/node_modules/node-fetch/node_modules/whatwg-url/README.md @@ -0,0 +1,67 @@ +# whatwg-url + +whatwg-url is a full implementation of the WHATWG [URL Standard](https://url.spec.whatwg.org/). It can be used standalone, but it also exposes a lot of the internal algorithms that are useful for integrating a URL parser into a project like [jsdom](https://github.com/tmpvar/jsdom). + +## Current Status + +whatwg-url is currently up to date with the URL spec up to commit [a62223](https://github.com/whatwg/url/commit/a622235308342c9adc7fc2fd1659ff059f7d5e2a). + +## API + +### The `URL` Constructor + +The main API is the [`URL`](https://url.spec.whatwg.org/#url) export, which follows the spec's behavior in all ways (including e.g. `USVString` conversion). Most consumers of this library will want to use this. + +### Low-level URL Standard API + +The following methods are exported for use by places like jsdom that need to implement things like [`HTMLHyperlinkElementUtils`](https://html.spec.whatwg.org/#htmlhyperlinkelementutils). They operate on or return an "internal URL" or ["URL record"](https://url.spec.whatwg.org/#concept-url) type. + +- [URL parser](https://url.spec.whatwg.org/#concept-url-parser): `parseURL(input, { baseURL, encodingOverride })` +- [Basic URL parser](https://url.spec.whatwg.org/#concept-basic-url-parser): `basicURLParse(input, { baseURL, encodingOverride, url, stateOverride })` +- [URL serializer](https://url.spec.whatwg.org/#concept-url-serializer): `serializeURL(urlRecord, excludeFragment)` +- [Host serializer](https://url.spec.whatwg.org/#concept-host-serializer): `serializeHost(hostFromURLRecord)` +- [Serialize an integer](https://url.spec.whatwg.org/#serialize-an-integer): `serializeInteger(number)` +- [Origin](https://url.spec.whatwg.org/#concept-url-origin) [serializer](https://html.spec.whatwg.org/multipage/browsers.html#serialization-of-an-origin): `serializeURLOrigin(urlRecord)` +- [Set the username](https://url.spec.whatwg.org/#set-the-username): `setTheUsername(urlRecord, usernameString)` +- [Set the password](https://url.spec.whatwg.org/#set-the-password): `setThePassword(urlRecord, passwordString)` +- [Cannot have a username/password/port](https://url.spec.whatwg.org/#cannot-have-a-username-password-port): `cannotHaveAUsernamePasswordPort(urlRecord)` + +The `stateOverride` parameter is one of the following strings: + +- [`"scheme start"`](https://url.spec.whatwg.org/#scheme-start-state) +- [`"scheme"`](https://url.spec.whatwg.org/#scheme-state) +- [`"no scheme"`](https://url.spec.whatwg.org/#no-scheme-state) +- [`"special relative or authority"`](https://url.spec.whatwg.org/#special-relative-or-authority-state) +- [`"path or authority"`](https://url.spec.whatwg.org/#path-or-authority-state) +- [`"relative"`](https://url.spec.whatwg.org/#relative-state) +- [`"relative slash"`](https://url.spec.whatwg.org/#relative-slash-state) +- [`"special authority slashes"`](https://url.spec.whatwg.org/#special-authority-slashes-state) +- [`"special authority ignore slashes"`](https://url.spec.whatwg.org/#special-authority-ignore-slashes-state) +- [`"authority"`](https://url.spec.whatwg.org/#authority-state) +- [`"host"`](https://url.spec.whatwg.org/#host-state) +- [`"hostname"`](https://url.spec.whatwg.org/#hostname-state) +- [`"port"`](https://url.spec.whatwg.org/#port-state) +- [`"file"`](https://url.spec.whatwg.org/#file-state) +- [`"file slash"`](https://url.spec.whatwg.org/#file-slash-state) +- [`"file host"`](https://url.spec.whatwg.org/#file-host-state) +- [`"path start"`](https://url.spec.whatwg.org/#path-start-state) +- [`"path"`](https://url.spec.whatwg.org/#path-state) +- [`"cannot-be-a-base-URL path"`](https://url.spec.whatwg.org/#cannot-be-a-base-url-path-state) +- [`"query"`](https://url.spec.whatwg.org/#query-state) +- [`"fragment"`](https://url.spec.whatwg.org/#fragment-state) + +The URL record type has the following API: + +- [`scheme`](https://url.spec.whatwg.org/#concept-url-scheme) +- [`username`](https://url.spec.whatwg.org/#concept-url-username) +- [`password`](https://url.spec.whatwg.org/#concept-url-password) +- [`host`](https://url.spec.whatwg.org/#concept-url-host) +- [`port`](https://url.spec.whatwg.org/#concept-url-port) +- [`path`](https://url.spec.whatwg.org/#concept-url-path) (as an array) +- [`query`](https://url.spec.whatwg.org/#concept-url-query) +- [`fragment`](https://url.spec.whatwg.org/#concept-url-fragment) +- [`cannotBeABaseURL`](https://url.spec.whatwg.org/#url-cannot-be-a-base-url-flag) (as a boolean) + +These properties should be treated with care, as in general changing them will cause the URL record to be in an inconsistent state until the appropriate invocation of `basicURLParse` is used to fix it up. You can see examples of this in the URL Standard, where there are many step sequences like "4. Set context object’s url’s fragment to the empty string. 5. Basic URL parse _input_ with context object’s url as _url_ and fragment state as _state override_." In between those two steps, a URL record is in an unusable state. + +The return value of "failure" in the spec is represented by the string `"failure"`. That is, functions like `parseURL` and `basicURLParse` can return _either_ a URL record _or_ the string `"failure"`. diff --git a/node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js b/node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js new file mode 100644 index 000000000..dc7452cc5 --- /dev/null +++ b/node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js @@ -0,0 +1,200 @@ +"use strict"; +const usm = require("./url-state-machine"); + +exports.implementation = class URLImpl { + constructor(constructorArgs) { + const url = constructorArgs[0]; + const base = constructorArgs[1]; + + let parsedBase = null; + if (base !== undefined) { + parsedBase = usm.basicURLParse(base); + if (parsedBase === "failure") { + throw new TypeError("Invalid base URL"); + } + } + + const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); + if (parsedURL === "failure") { + throw new TypeError("Invalid URL"); + } + + this._url = parsedURL; + + // TODO: query stuff + } + + get href() { + return usm.serializeURL(this._url); + } + + set href(v) { + const parsedURL = usm.basicURLParse(v); + if (parsedURL === "failure") { + throw new TypeError("Invalid URL"); + } + + this._url = parsedURL; + } + + get origin() { + return usm.serializeURLOrigin(this._url); + } + + get protocol() { + return this._url.scheme + ":"; + } + + set protocol(v) { + usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" }); + } + + get username() { + return this._url.username; + } + + set username(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } + + usm.setTheUsername(this._url, v); + } + + get password() { + return this._url.password; + } + + set password(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } + + usm.setThePassword(this._url, v); + } + + get host() { + const url = this._url; + + if (url.host === null) { + return ""; + } + + if (url.port === null) { + return usm.serializeHost(url.host); + } + + return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); + } + + set host(v) { + if (this._url.cannotBeABaseURL) { + return; + } + + usm.basicURLParse(v, { url: this._url, stateOverride: "host" }); + } + + get hostname() { + if (this._url.host === null) { + return ""; + } + + return usm.serializeHost(this._url.host); + } + + set hostname(v) { + if (this._url.cannotBeABaseURL) { + return; + } + + usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" }); + } + + get port() { + if (this._url.port === null) { + return ""; + } + + return usm.serializeInteger(this._url.port); + } + + set port(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } + + if (v === "") { + this._url.port = null; + } else { + usm.basicURLParse(v, { url: this._url, stateOverride: "port" }); + } + } + + get pathname() { + if (this._url.cannotBeABaseURL) { + return this._url.path[0]; + } + + if (this._url.path.length === 0) { + return ""; + } + + return "/" + this._url.path.join("/"); + } + + set pathname(v) { + if (this._url.cannotBeABaseURL) { + return; + } + + this._url.path = []; + usm.basicURLParse(v, { url: this._url, stateOverride: "path start" }); + } + + get search() { + if (this._url.query === null || this._url.query === "") { + return ""; + } + + return "?" + this._url.query; + } + + set search(v) { + // TODO: query stuff + + const url = this._url; + + if (v === "") { + url.query = null; + return; + } + + const input = v[0] === "?" ? v.substring(1) : v; + url.query = ""; + usm.basicURLParse(input, { url, stateOverride: "query" }); + } + + get hash() { + if (this._url.fragment === null || this._url.fragment === "") { + return ""; + } + + return "#" + this._url.fragment; + } + + set hash(v) { + if (v === "") { + this._url.fragment = null; + return; + } + + const input = v[0] === "#" ? v.substring(1) : v; + this._url.fragment = ""; + usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); + } + + toJSON() { + return this.href; + } +}; diff --git a/node_modules/node-fetch/node_modules/whatwg-url/lib/URL.js b/node_modules/node-fetch/node_modules/whatwg-url/lib/URL.js new file mode 100644 index 000000000..78c7207ef --- /dev/null +++ b/node_modules/node-fetch/node_modules/whatwg-url/lib/URL.js @@ -0,0 +1,196 @@ +"use strict"; + +const conversions = require("webidl-conversions"); +const utils = require("./utils.js"); +const Impl = require(".//URL-impl.js"); + +const impl = utils.implSymbol; + +function URL(url) { + if (!this || this[impl] || !(this instanceof URL)) { + throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); + } + if (arguments.length < 1) { + throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present."); + } + const args = []; + for (let i = 0; i < arguments.length && i < 2; ++i) { + args[i] = arguments[i]; + } + args[0] = conversions["USVString"](args[0]); + if (args[1] !== undefined) { + args[1] = conversions["USVString"](args[1]); + } + + module.exports.setup(this, args); +} + +URL.prototype.toJSON = function toJSON() { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); + } + const args = []; + for (let i = 0; i < arguments.length && i < 0; ++i) { + args[i] = arguments[i]; + } + return this[impl].toJSON.apply(this[impl], args); +}; +Object.defineProperty(URL.prototype, "href", { + get() { + return this[impl].href; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].href = V; + }, + enumerable: true, + configurable: true +}); + +URL.prototype.toString = function () { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); + } + return this.href; +}; + +Object.defineProperty(URL.prototype, "origin", { + get() { + return this[impl].origin; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "protocol", { + get() { + return this[impl].protocol; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].protocol = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "username", { + get() { + return this[impl].username; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].username = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "password", { + get() { + return this[impl].password; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].password = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "host", { + get() { + return this[impl].host; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].host = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "hostname", { + get() { + return this[impl].hostname; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].hostname = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "port", { + get() { + return this[impl].port; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].port = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "pathname", { + get() { + return this[impl].pathname; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].pathname = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "search", { + get() { + return this[impl].search; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].search = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "hash", { + get() { + return this[impl].hash; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].hash = V; + }, + enumerable: true, + configurable: true +}); + + +module.exports = { + is(obj) { + return !!obj && obj[impl] instanceof Impl.implementation; + }, + create(constructorArgs, privateData) { + let obj = Object.create(URL.prototype); + this.setup(obj, constructorArgs, privateData); + return obj; + }, + setup(obj, constructorArgs, privateData) { + if (!privateData) privateData = {}; + privateData.wrapper = obj; + + obj[impl] = new Impl.implementation(constructorArgs, privateData); + obj[impl][utils.wrapperSymbol] = obj; + }, + interface: URL, + expose: { + Window: { URL: URL }, + Worker: { URL: URL } + } +}; + diff --git a/node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js b/node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js new file mode 100644 index 000000000..932dcada4 --- /dev/null +++ b/node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js @@ -0,0 +1,11 @@ +"use strict"; + +exports.URL = require("./URL").interface; +exports.serializeURL = require("./url-state-machine").serializeURL; +exports.serializeURLOrigin = require("./url-state-machine").serializeURLOrigin; +exports.basicURLParse = require("./url-state-machine").basicURLParse; +exports.setTheUsername = require("./url-state-machine").setTheUsername; +exports.setThePassword = require("./url-state-machine").setThePassword; +exports.serializeHost = require("./url-state-machine").serializeHost; +exports.serializeInteger = require("./url-state-machine").serializeInteger; +exports.parseURL = require("./url-state-machine").parseURL; diff --git a/node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js b/node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js new file mode 100644 index 000000000..c25dbc2c4 --- /dev/null +++ b/node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js @@ -0,0 +1,1297 @@ +"use strict"; +const punycode = require("punycode"); +const tr46 = require("tr46"); + +const specialSchemes = { + ftp: 21, + file: null, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443 +}; + +const failure = Symbol("failure"); + +function countSymbols(str) { + return punycode.ucs2.decode(str).length; +} + +function at(input, idx) { + const c = input[idx]; + return isNaN(c) ? undefined : String.fromCodePoint(c); +} + +function isASCIIDigit(c) { + return c >= 0x30 && c <= 0x39; +} + +function isASCIIAlpha(c) { + return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); +} + +function isASCIIAlphanumeric(c) { + return isASCIIAlpha(c) || isASCIIDigit(c); +} + +function isASCIIHex(c) { + return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); +} + +function isSingleDot(buffer) { + return buffer === "." || buffer.toLowerCase() === "%2e"; +} + +function isDoubleDot(buffer) { + buffer = buffer.toLowerCase(); + return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; +} + +function isWindowsDriveLetterCodePoints(cp1, cp2) { + return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); +} + +function isWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); +} + +function isNormalizedWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; +} + +function containsForbiddenHostCodePoint(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; +} + +function containsForbiddenHostCodePointExcludingPercent(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; +} + +function isSpecialScheme(scheme) { + return specialSchemes[scheme] !== undefined; +} + +function isSpecial(url) { + return isSpecialScheme(url.scheme); +} + +function defaultPort(scheme) { + return specialSchemes[scheme]; +} + +function percentEncode(c) { + let hex = c.toString(16).toUpperCase(); + if (hex.length === 1) { + hex = "0" + hex; + } + + return "%" + hex; +} + +function utf8PercentEncode(c) { + const buf = new Buffer(c); + + let str = ""; + + for (let i = 0; i < buf.length; ++i) { + str += percentEncode(buf[i]); + } + + return str; +} + +function utf8PercentDecode(str) { + const input = new Buffer(str); + const output = []; + for (let i = 0; i < input.length; ++i) { + if (input[i] !== 37) { + output.push(input[i]); + } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { + output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); + i += 2; + } else { + output.push(input[i]); + } + } + return new Buffer(output).toString(); +} + +function isC0ControlPercentEncode(c) { + return c <= 0x1F || c > 0x7E; +} + +const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); +function isPathPercentEncode(c) { + return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); +} + +const extraUserinfoPercentEncodeSet = + new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); +function isUserinfoPercentEncode(c) { + return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); +} + +function percentEncodeChar(c, encodeSetPredicate) { + const cStr = String.fromCodePoint(c); + + if (encodeSetPredicate(c)) { + return utf8PercentEncode(cStr); + } + + return cStr; +} + +function parseIPv4Number(input) { + let R = 10; + + if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { + input = input.substring(2); + R = 16; + } else if (input.length >= 2 && input.charAt(0) === "0") { + input = input.substring(1); + R = 8; + } + + if (input === "") { + return 0; + } + + const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); + if (regex.test(input)) { + return failure; + } + + return parseInt(input, R); +} + +function parseIPv4(input) { + const parts = input.split("."); + if (parts[parts.length - 1] === "") { + if (parts.length > 1) { + parts.pop(); + } + } + + if (parts.length > 4) { + return input; + } + + const numbers = []; + for (const part of parts) { + if (part === "") { + return input; + } + const n = parseIPv4Number(part); + if (n === failure) { + return input; + } + + numbers.push(n); + } + + for (let i = 0; i < numbers.length - 1; ++i) { + if (numbers[i] > 255) { + return failure; + } + } + if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { + return failure; + } + + let ipv4 = numbers.pop(); + let counter = 0; + + for (const n of numbers) { + ipv4 += n * Math.pow(256, 3 - counter); + ++counter; + } + + return ipv4; +} + +function serializeIPv4(address) { + let output = ""; + let n = address; + + for (let i = 1; i <= 4; ++i) { + output = String(n % 256) + output; + if (i !== 4) { + output = "." + output; + } + n = Math.floor(n / 256); + } + + return output; +} + +function parseIPv6(input) { + const address = [0, 0, 0, 0, 0, 0, 0, 0]; + let pieceIndex = 0; + let compress = null; + let pointer = 0; + + input = punycode.ucs2.decode(input); + + if (input[pointer] === 58) { + if (input[pointer + 1] !== 58) { + return failure; + } + + pointer += 2; + ++pieceIndex; + compress = pieceIndex; + } + + while (pointer < input.length) { + if (pieceIndex === 8) { + return failure; + } + + if (input[pointer] === 58) { + if (compress !== null) { + return failure; + } + ++pointer; + ++pieceIndex; + compress = pieceIndex; + continue; + } + + let value = 0; + let length = 0; + + while (length < 4 && isASCIIHex(input[pointer])) { + value = value * 0x10 + parseInt(at(input, pointer), 16); + ++pointer; + ++length; + } + + if (input[pointer] === 46) { + if (length === 0) { + return failure; + } + + pointer -= length; + + if (pieceIndex > 6) { + return failure; + } + + let numbersSeen = 0; + + while (input[pointer] !== undefined) { + let ipv4Piece = null; + + if (numbersSeen > 0) { + if (input[pointer] === 46 && numbersSeen < 4) { + ++pointer; + } else { + return failure; + } + } + + if (!isASCIIDigit(input[pointer])) { + return failure; + } + + while (isASCIIDigit(input[pointer])) { + const number = parseInt(at(input, pointer)); + if (ipv4Piece === null) { + ipv4Piece = number; + } else if (ipv4Piece === 0) { + return failure; + } else { + ipv4Piece = ipv4Piece * 10 + number; + } + if (ipv4Piece > 255) { + return failure; + } + ++pointer; + } + + address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; + + ++numbersSeen; + + if (numbersSeen === 2 || numbersSeen === 4) { + ++pieceIndex; + } + } + + if (numbersSeen !== 4) { + return failure; + } + + break; + } else if (input[pointer] === 58) { + ++pointer; + if (input[pointer] === undefined) { + return failure; + } + } else if (input[pointer] !== undefined) { + return failure; + } + + address[pieceIndex] = value; + ++pieceIndex; + } + + if (compress !== null) { + let swaps = pieceIndex - compress; + pieceIndex = 7; + while (pieceIndex !== 0 && swaps > 0) { + const temp = address[compress + swaps - 1]; + address[compress + swaps - 1] = address[pieceIndex]; + address[pieceIndex] = temp; + --pieceIndex; + --swaps; + } + } else if (compress === null && pieceIndex !== 8) { + return failure; + } + + return address; +} + +function serializeIPv6(address) { + let output = ""; + const seqResult = findLongestZeroSequence(address); + const compress = seqResult.idx; + let ignore0 = false; + + for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { + if (ignore0 && address[pieceIndex] === 0) { + continue; + } else if (ignore0) { + ignore0 = false; + } + + if (compress === pieceIndex) { + const separator = pieceIndex === 0 ? "::" : ":"; + output += separator; + ignore0 = true; + continue; + } + + output += address[pieceIndex].toString(16); + + if (pieceIndex !== 7) { + output += ":"; + } + } + + return output; +} + +function parseHost(input, isSpecialArg) { + if (input[0] === "[") { + if (input[input.length - 1] !== "]") { + return failure; + } + + return parseIPv6(input.substring(1, input.length - 1)); + } + + if (!isSpecialArg) { + return parseOpaqueHost(input); + } + + const domain = utf8PercentDecode(input); + const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); + if (asciiDomain === null) { + return failure; + } + + if (containsForbiddenHostCodePoint(asciiDomain)) { + return failure; + } + + const ipv4Host = parseIPv4(asciiDomain); + if (typeof ipv4Host === "number" || ipv4Host === failure) { + return ipv4Host; + } + + return asciiDomain; +} + +function parseOpaqueHost(input) { + if (containsForbiddenHostCodePointExcludingPercent(input)) { + return failure; + } + + let output = ""; + const decoded = punycode.ucs2.decode(input); + for (let i = 0; i < decoded.length; ++i) { + output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); + } + return output; +} + +function findLongestZeroSequence(arr) { + let maxIdx = null; + let maxLen = 1; // only find elements > 1 + let currStart = null; + let currLen = 0; + + for (let i = 0; i < arr.length; ++i) { + if (arr[i] !== 0) { + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } + + currStart = null; + currLen = 0; + } else { + if (currStart === null) { + currStart = i; + } + ++currLen; + } + } + + // if trailing zeros + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } + + return { + idx: maxIdx, + len: maxLen + }; +} + +function serializeHost(host) { + if (typeof host === "number") { + return serializeIPv4(host); + } + + // IPv6 serializer + if (host instanceof Array) { + return "[" + serializeIPv6(host) + "]"; + } + + return host; +} + +function trimControlChars(url) { + return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); +} + +function trimTabAndNewline(url) { + return url.replace(/\u0009|\u000A|\u000D/g, ""); +} + +function shortenPath(url) { + const path = url.path; + if (path.length === 0) { + return; + } + if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { + return; + } + + path.pop(); +} + +function includesCredentials(url) { + return url.username !== "" || url.password !== ""; +} + +function cannotHaveAUsernamePasswordPort(url) { + return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; +} + +function isNormalizedWindowsDriveLetter(string) { + return /^[A-Za-z]:$/.test(string); +} + +function URLStateMachine(input, base, encodingOverride, url, stateOverride) { + this.pointer = 0; + this.input = input; + this.base = base || null; + this.encodingOverride = encodingOverride || "utf-8"; + this.stateOverride = stateOverride; + this.url = url; + this.failure = false; + this.parseError = false; + + if (!this.url) { + this.url = { + scheme: "", + username: "", + password: "", + host: null, + port: null, + path: [], + query: null, + fragment: null, + + cannotBeABaseURL: false + }; + + const res = trimControlChars(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; + } + + const res = trimTabAndNewline(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; + + this.state = stateOverride || "scheme start"; + + this.buffer = ""; + this.atFlag = false; + this.arrFlag = false; + this.passwordTokenSeenFlag = false; + + this.input = punycode.ucs2.decode(this.input); + + for (; this.pointer <= this.input.length; ++this.pointer) { + const c = this.input[this.pointer]; + const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); + + // exec state machine + const ret = this["parse " + this.state](c, cStr); + if (!ret) { + break; // terminate algorithm + } else if (ret === failure) { + this.failure = true; + break; + } + } +} + +URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { + if (isASCIIAlpha(c)) { + this.buffer += cStr.toLowerCase(); + this.state = "scheme"; + } else if (!this.stateOverride) { + this.state = "no scheme"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { + if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { + this.buffer += cStr.toLowerCase(); + } else if (c === 58) { + if (this.stateOverride) { + if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { + return false; + } + + if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { + return false; + } + + if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { + return false; + } + + if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { + return false; + } + } + this.url.scheme = this.buffer; + this.buffer = ""; + if (this.stateOverride) { + return false; + } + if (this.url.scheme === "file") { + if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { + this.parseError = true; + } + this.state = "file"; + } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { + this.state = "special relative or authority"; + } else if (isSpecial(this.url)) { + this.state = "special authority slashes"; + } else if (this.input[this.pointer + 1] === 47) { + this.state = "path or authority"; + ++this.pointer; + } else { + this.url.cannotBeABaseURL = true; + this.url.path.push(""); + this.state = "cannot-be-a-base-URL path"; + } + } else if (!this.stateOverride) { + this.buffer = ""; + this.state = "no scheme"; + this.pointer = -1; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { + if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { + return failure; + } else if (this.base.cannotBeABaseURL && c === 35) { + this.url.scheme = this.base.scheme; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.url.cannotBeABaseURL = true; + this.state = "fragment"; + } else if (this.base.scheme === "file") { + this.state = "file"; + --this.pointer; + } else { + this.state = "relative"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "relative"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { + if (c === 47) { + this.state = "authority"; + } else { + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse relative"] = function parseRelative(c) { + this.url.scheme = this.base.scheme; + if (isNaN(c)) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 47) { + this.state = "relative slash"; + } else if (c === 63) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else if (isSpecial(this.url) && c === 92) { + this.parseError = true; + this.state = "relative slash"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(0, this.base.path.length - 1); + + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { + if (isSpecial(this.url) && (c === 47 || c === 92)) { + if (c === 92) { + this.parseError = true; + } + this.state = "special authority ignore slashes"; + } else if (c === 47) { + this.state = "authority"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "special authority ignore slashes"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { + if (c !== 47 && c !== 92) { + this.state = "authority"; + --this.pointer; + } else { + this.parseError = true; + } + + return true; +}; + +URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { + if (c === 64) { + this.parseError = true; + if (this.atFlag) { + this.buffer = "%40" + this.buffer; + } + this.atFlag = true; + + // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars + const len = countSymbols(this.buffer); + for (let pointer = 0; pointer < len; ++pointer) { + const codePoint = this.buffer.codePointAt(pointer); + + if (codePoint === 58 && !this.passwordTokenSeenFlag) { + this.passwordTokenSeenFlag = true; + continue; + } + const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); + if (this.passwordTokenSeenFlag) { + this.url.password += encodedCodePoints; + } else { + this.url.username += encodedCodePoints; + } + } + this.buffer = ""; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + if (this.atFlag && this.buffer === "") { + this.parseError = true; + return failure; + } + this.pointer -= countSymbols(this.buffer) + 1; + this.buffer = ""; + this.state = "host"; + } else { + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse hostname"] = +URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { + if (this.stateOverride && this.url.scheme === "file") { + --this.pointer; + this.state = "file host"; + } else if (c === 58 && !this.arrFlag) { + if (this.buffer === "") { + this.parseError = true; + return failure; + } + + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + + this.url.host = host; + this.buffer = ""; + this.state = "port"; + if (this.stateOverride === "hostname") { + return false; + } + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + --this.pointer; + if (isSpecial(this.url) && this.buffer === "") { + this.parseError = true; + return failure; + } else if (this.stateOverride && this.buffer === "" && + (includesCredentials(this.url) || this.url.port !== null)) { + this.parseError = true; + return false; + } + + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + + this.url.host = host; + this.buffer = ""; + this.state = "path start"; + if (this.stateOverride) { + return false; + } + } else { + if (c === 91) { + this.arrFlag = true; + } else if (c === 93) { + this.arrFlag = false; + } + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { + if (isASCIIDigit(c)) { + this.buffer += cStr; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92) || + this.stateOverride) { + if (this.buffer !== "") { + const port = parseInt(this.buffer); + if (port > Math.pow(2, 16) - 1) { + this.parseError = true; + return failure; + } + this.url.port = port === defaultPort(this.url.scheme) ? null : port; + this.buffer = ""; + } + if (this.stateOverride) { + return false; + } + this.state = "path start"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); + +URLStateMachine.prototype["parse file"] = function parseFile(c) { + this.url.scheme = "file"; + + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file slash"; + } else if (this.base !== null && this.base.scheme === "file") { + if (isNaN(c)) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 63) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else { + if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points + !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || + (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points + !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + shortenPath(this.url); + } else { + this.parseError = true; + } + + this.state = "path"; + --this.pointer; + } + } else { + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file host"; + } else { + if (this.base !== null && this.base.scheme === "file") { + if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { + this.url.path.push(this.base.path[0]); + } else { + this.url.host = this.base.host; + } + } + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { + if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { + --this.pointer; + if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { + this.parseError = true; + this.state = "path"; + } else if (this.buffer === "") { + this.url.host = ""; + if (this.stateOverride) { + return false; + } + this.state = "path start"; + } else { + let host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + if (host === "localhost") { + host = ""; + } + this.url.host = host; + + if (this.stateOverride) { + return false; + } + + this.buffer = ""; + this.state = "path start"; + } + } else { + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { + if (isSpecial(this.url)) { + if (c === 92) { + this.parseError = true; + } + this.state = "path"; + + if (c !== 47 && c !== 92) { + --this.pointer; + } + } else if (!this.stateOverride && c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (!this.stateOverride && c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else if (c !== undefined) { + this.state = "path"; + if (c !== 47) { + --this.pointer; + } + } + + return true; +}; + +URLStateMachine.prototype["parse path"] = function parsePath(c) { + if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || + (!this.stateOverride && (c === 63 || c === 35))) { + if (isSpecial(this.url) && c === 92) { + this.parseError = true; + } + + if (isDoubleDot(this.buffer)) { + shortenPath(this.url); + if (c !== 47 && !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } + } else if (isSingleDot(this.buffer) && c !== 47 && + !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } else if (!isSingleDot(this.buffer)) { + if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { + if (this.url.host !== "" && this.url.host !== null) { + this.parseError = true; + this.url.host = ""; + } + this.buffer = this.buffer[0] + ":"; + } + this.url.path.push(this.buffer); + } + this.buffer = ""; + if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { + while (this.url.path.length > 1 && this.url.path[0] === "") { + this.parseError = true; + this.url.path.shift(); + } + } + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.buffer += percentEncodeChar(c, isPathPercentEncode); + } + + return true; +}; + +URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else { + // TODO: Add: not a URL code point + if (!isNaN(c) && c !== 37) { + this.parseError = true; + } + + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + if (!isNaN(c)) { + this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); + } + } + + return true; +}; + +URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { + if (isNaN(c) || (!this.stateOverride && c === 35)) { + if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { + this.encodingOverride = "utf-8"; + } + + const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead + for (let i = 0; i < buffer.length; ++i) { + if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || + buffer[i] === 0x3C || buffer[i] === 0x3E) { + this.url.query += percentEncode(buffer[i]); + } else { + this.url.query += String.fromCodePoint(buffer[i]); + } + } + + this.buffer = ""; + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { + if (isNaN(c)) { // do nothing + } else if (c === 0x0) { + this.parseError = true; + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); + } + + return true; +}; + +function serializeURL(url, excludeFragment) { + let output = url.scheme + ":"; + if (url.host !== null) { + output += "//"; + + if (url.username !== "" || url.password !== "") { + output += url.username; + if (url.password !== "") { + output += ":" + url.password; + } + output += "@"; + } + + output += serializeHost(url.host); + + if (url.port !== null) { + output += ":" + url.port; + } + } else if (url.host === null && url.scheme === "file") { + output += "//"; + } + + if (url.cannotBeABaseURL) { + output += url.path[0]; + } else { + for (const string of url.path) { + output += "/" + string; + } + } + + if (url.query !== null) { + output += "?" + url.query; + } + + if (!excludeFragment && url.fragment !== null) { + output += "#" + url.fragment; + } + + return output; +} + +function serializeOrigin(tuple) { + let result = tuple.scheme + "://"; + result += serializeHost(tuple.host); + + if (tuple.port !== null) { + result += ":" + tuple.port; + } + + return result; +} + +module.exports.serializeURL = serializeURL; + +module.exports.serializeURLOrigin = function (url) { + // https://url.spec.whatwg.org/#concept-url-origin + switch (url.scheme) { + case "blob": + try { + return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); + } catch (e) { + // serializing an opaque origin returns "null" + return "null"; + } + case "ftp": + case "gopher": + case "http": + case "https": + case "ws": + case "wss": + return serializeOrigin({ + scheme: url.scheme, + host: url.host, + port: url.port + }); + case "file": + // spec says "exercise to the reader", chrome says "file://" + return "file://"; + default: + // serializing an opaque origin returns "null" + return "null"; + } +}; + +module.exports.basicURLParse = function (input, options) { + if (options === undefined) { + options = {}; + } + + const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); + if (usm.failure) { + return "failure"; + } + + return usm.url; +}; + +module.exports.setTheUsername = function (url, username) { + url.username = ""; + const decoded = punycode.ucs2.decode(username); + for (let i = 0; i < decoded.length; ++i) { + url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.setThePassword = function (url, password) { + url.password = ""; + const decoded = punycode.ucs2.decode(password); + for (let i = 0; i < decoded.length; ++i) { + url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.serializeHost = serializeHost; + +module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; + +module.exports.serializeInteger = function (integer) { + return String(integer); +}; + +module.exports.parseURL = function (input, options) { + if (options === undefined) { + options = {}; + } + + // We don't handle blobs, so this just delegates: + return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); +}; diff --git a/node_modules/node-fetch/node_modules/whatwg-url/lib/utils.js b/node_modules/node-fetch/node_modules/whatwg-url/lib/utils.js new file mode 100644 index 000000000..a562009c8 --- /dev/null +++ b/node_modules/node-fetch/node_modules/whatwg-url/lib/utils.js @@ -0,0 +1,20 @@ +"use strict"; + +module.exports.mixin = function mixin(target, source) { + const keys = Object.getOwnPropertyNames(source); + for (let i = 0; i < keys.length; ++i) { + Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); + } +}; + +module.exports.wrapperSymbol = Symbol("wrapper"); +module.exports.implSymbol = Symbol("impl"); + +module.exports.wrapperForImpl = function (impl) { + return impl[module.exports.wrapperSymbol]; +}; + +module.exports.implForWrapper = function (wrapper) { + return wrapper[module.exports.implSymbol]; +}; + diff --git a/node_modules/node-fetch/node_modules/whatwg-url/package.json b/node_modules/node-fetch/node_modules/whatwg-url/package.json new file mode 100644 index 000000000..a3d4e447b --- /dev/null +++ b/node_modules/node-fetch/node_modules/whatwg-url/package.json @@ -0,0 +1,70 @@ +{ + "_args": [ + [ + "whatwg-url@5.0.0", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" + ] + ], + "_from": "whatwg-url@5.0.0", + "_id": "whatwg-url@5.0.0", + "_inBundle": false, + "_integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "_location": "/node-fetch/whatwg-url", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "whatwg-url@5.0.0", + "name": "whatwg-url", + "escapedName": "whatwg-url", + "rawSpec": "5.0.0", + "saveSpec": null, + "fetchSpec": "5.0.0" + }, + "_requiredBy": [ + "/node-fetch" + ], + "_resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "_spec": "5.0.0", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", + "author": { + "name": "Sebastian Mayr", + "email": "github@smayr.name" + }, + "bugs": { + "url": "https://github.com/jsdom/whatwg-url/issues" + }, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + }, + "description": "An implementation of the WHATWG URL Standard's URL API and parsing machinery", + "devDependencies": { + "eslint": "^2.6.0", + "istanbul": "~0.4.3", + "mocha": "^2.2.4", + "recast": "~0.10.29", + "request": "^2.55.0", + "webidl2js": "^3.0.2" + }, + "files": [ + "lib/" + ], + "homepage": "https://github.com/jsdom/whatwg-url#readme", + "license": "MIT", + "main": "lib/public-api.js", + "name": "whatwg-url", + "repository": { + "type": "git", + "url": "git+https://github.com/jsdom/whatwg-url.git" + }, + "scripts": { + "build": "node scripts/transform.js && node scripts/convert-idl.js", + "coverage": "istanbul cover node_modules/mocha/bin/_mocha", + "lint": "eslint .", + "prepublish": "npm run build", + "pretest": "node scripts/get-latest-platform-tests.js && npm run build", + "test": "mocha" + }, + "version": "5.0.0" +} diff --git a/node_modules/node-fetch/package.json b/node_modules/node-fetch/package.json index b3f8af9f3..46eea823d 100644 --- a/node_modules/node-fetch/package.json +++ b/node_modules/node-fetch/package.json @@ -1,32 +1,32 @@ { "_args": [ [ - "node-fetch@2.6.1", - "/Users/pozil/poz/git/auto-assign-issue" + "node-fetch@2.6.7", + "/Users/pozil/poz/git/github-actions/auto-assign-issue" ] ], - "_from": "node-fetch@2.6.1", - "_id": "node-fetch@2.6.1", + "_from": "node-fetch@2.6.7", + "_id": "node-fetch@2.6.7", "_inBundle": false, - "_integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "_integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "_location": "/node-fetch", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "node-fetch@2.6.1", + "raw": "node-fetch@2.6.7", "name": "node-fetch", "escapedName": "node-fetch", - "rawSpec": "2.6.1", + "rawSpec": "2.6.7", "saveSpec": null, - "fetchSpec": "2.6.1" + "fetchSpec": "2.6.7" }, "_requiredBy": [ "/@octokit/request" ], - "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "_spec": "2.6.1", - "_where": "/Users/pozil/poz/git/auto-assign-issue", + "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "_spec": "2.6.7", + "_where": "/Users/pozil/poz/git/github-actions/auto-assign-issue", "author": { "name": "David Frank" }, @@ -34,7 +34,9 @@ "bugs": { "url": "https://github.com/bitinn/node-fetch/issues" }, - "dependencies": {}, + "dependencies": { + "whatwg-url": "^5.0.0" + }, "description": "A light-weight module that brings window.fetch to node.js", "devDependencies": { "@ungap/url-search-params": "^0.1.2", @@ -48,7 +50,7 @@ "chai-as-promised": "^7.1.1", "chai-iterator": "^1.1.1", "chai-string": "~1.3.0", - "codecov": "^3.3.0", + "codecov": "3.3.0", "cross-env": "^5.2.0", "form-data": "^2.3.3", "is-builtin-module": "^1.0.0", @@ -60,7 +62,7 @@ "rollup": "^0.63.4", "rollup-plugin-babel": "^3.0.7", "string-to-arraybuffer": "^1.0.2", - "whatwg-url": "^5.0.0" + "teeny-request": "3.7.0" }, "engines": { "node": "4.x || >=6.0.0" @@ -78,9 +80,17 @@ "promise" ], "license": "MIT", - "main": "lib/index", + "main": "lib/index.js", "module": "lib/index.mjs", "name": "node-fetch", + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + }, "repository": { "type": "git", "url": "git+https://github.com/bitinn/node-fetch.git" @@ -92,5 +102,5 @@ "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js", "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js" }, - "version": "2.6.1" + "version": "2.6.7" } diff --git a/node_modules/progress/CHANGELOG.md b/node_modules/progress/CHANGELOG.md deleted file mode 100644 index d9be0aa18..000000000 --- a/node_modules/progress/CHANGELOG.md +++ /dev/null @@ -1,115 +0,0 @@ - -2.0.0 / 2017-04-04 -================== - - * Fix: check before using stream.clearLine to prevent crash in Docker - * Fix: fixed output multiline on windows cmd - * Fix: Bug with array length when window is too small - * Fix: Don't clear whole line every time; instead, clear everything after end of line - * Fix: Use `this.stream` instead of `console.log` when terminating a progress bar to ensure that, if a writable stream is provided, it uses that rather than process.stdout - * Fix: Bug causing potentially stale tokens on render - * Feature: configurable cursor - * Feature: feature to interrupt the bar and display a message - * Feature: Add rate reporting to progress bar - * Improvement: Add head option to specify head character - * Improvement: Rename tickTokens to tokens - * Improvement: Change default throttle time to 16ms - * Improvement: Rename renderDelay to renderThrottle - * Improvement: Add delay between render updates - * Docs: Add example and documentation for custom token usage - * Docs: Add head option to readme - * Docs: Updated README example for public use - * Docs: Add renderThrottle option to code documentation - -1.1.7 / 2014-06-30 -================== - - * fixed a bug that occurs when a progress bar attempts to draw itself - on a console with very few columns - -1.1.6 / 2014-06-16 -================== - - * now prevents progress bar from exceeding TTY width by limiting its width to - the with of the TTY - -1.1.5 / 2014-03-25 -================== - - * updated documentation and various other repo maintenance - * updated makefile to run examples with `make` - * removed dependency on readline module - -1.1.4 / 2014-03-14 -================== - - * now supports streams, for example output progress bar to stderr, while piping - stdout - * increases performance and flicker by remembering the last drawn progress bar - -1.1.3 / 2013-12-31 -================== - - * fixes a bug where bar would bug when initializing - * allows to pass updated tokens when ticking or updating the bar - * fixes a bug where the bar would throw if skipping to far - -1.1.2 / 2013-10-17 -================== - - * lets you pass an `fmt` and a `total` instead of an options object - -1.1.0 / 2013-09-18 -================== - - * eta and elapsed tokens default to 0.0 instead of ?.? - * better JSDocs - * added back and forth example - * added method to update the progress bar to a specific percentage - * added an option to hide the bar on completion - -1.0.1 / 2013-08-07 -================== - - * on os x readline now works, reverting the terminal hack - -1.0.0 / 2013-06-18 -================== - - * remove .version - * merge pull request #15 from davglass/readline-osx - * on OSX revert back to terminal hack to avoid a readline bug - -0.1.0 / 2012-09-19 -================== - - * fixed logic bug that caused bar to jump one extra space at the end [davglass] - * working with readline impl, even on Windows [davglass] - * using readline instead of the \r hack [davglass] - -0.0.5 / 2012-08-07 -================== - - * add ability to tick by zero chunks - tick(0) - * fix ETA. Closes #4 [lwille] - -0.0.4 / 2011-11-14 -================== - - * allow more recent versions of node - -0.0.3 / 2011-04-20 -================== - - * changed; erase the line when complete - -0.0.2 / 2011-04-20 -================== - - * added custom tokens support - * fixed; clear line before writing - -0.0.1 / 2010-01-03 -================== - - * initial release diff --git a/node_modules/progress/Makefile b/node_modules/progress/Makefile deleted file mode 100644 index f933be10a..000000000 --- a/node_modules/progress/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -EXAMPLES = $(foreach EXAMPLE, $(wildcard examples/*.js), $(EXAMPLE)) - -.PHONY: test -test: $(EXAMPLES) - -.PHONY: $(EXAMPLES) -$(EXAMPLES): ; node $@ && echo diff --git a/node_modules/progress/Readme.md b/node_modules/progress/Readme.md deleted file mode 100644 index 6d4271abc..000000000 --- a/node_modules/progress/Readme.md +++ /dev/null @@ -1,146 +0,0 @@ -Flexible ascii progress bar. - -## Installation - -```bash -$ npm install progress -``` - -## Usage - -First we create a `ProgressBar`, giving it a format string -as well as the `total`, telling the progress bar when it will -be considered complete. After that all we need to do is `tick()` appropriately. - -```javascript -var ProgressBar = require('progress'); - -var bar = new ProgressBar(':bar', { total: 10 }); -var timer = setInterval(function () { - bar.tick(); - if (bar.complete) { - console.log('\ncomplete\n'); - clearInterval(timer); - } -}, 100); -``` - -### Options - -These are keys in the options object you can pass to the progress bar along with -`total` as seen in the example above. - -- `curr` current completed index -- `total` total number of ticks to complete -- `width` the displayed width of the progress bar defaulting to total -- `stream` the output stream defaulting to stderr -- `head` head character defaulting to complete character -- `complete` completion character defaulting to "=" -- `incomplete` incomplete character defaulting to "-" -- `renderThrottle` minimum time between updates in milliseconds defaulting to 16 -- `clear` option to clear the bar on completion defaulting to false -- `callback` optional function to call when the progress bar completes - -### Tokens - -These are tokens you can use in the format of your progress bar. - -- `:bar` the progress bar itself -- `:current` current tick number -- `:total` total ticks -- `:elapsed` time elapsed in seconds -- `:percent` completion percentage -- `:eta` estimated completion time in seconds -- `:rate` rate of ticks per second - -### Custom Tokens - -You can define custom tokens by adding a `{'name': value}` object parameter to your method (`tick()`, `update()`, etc.) calls. - -```javascript -var bar = new ProgressBar(':current: :token1 :token2', { total: 3 }) -bar.tick({ - 'token1': "Hello", - 'token2': "World!\n" -}) -bar.tick(2, { - 'token1': "Goodbye", - 'token2': "World!" -}) -``` -The above example would result in the output below. - -``` -1: Hello World! -3: Goodbye World! -``` - -## Examples - -### Download - -In our download example each tick has a variable influence, so we pass the chunk -length which adjusts the progress bar appropriately relative to the total -length. - -```javascript -var ProgressBar = require('progress'); -var https = require('https'); - -var req = https.request({ - host: 'download.github.com', - port: 443, - path: '/visionmedia-node-jscoverage-0d4608a.zip' -}); - -req.on('response', function(res){ - var len = parseInt(res.headers['content-length'], 10); - - console.log(); - var bar = new ProgressBar(' downloading [:bar] :rate/bps :percent :etas', { - complete: '=', - incomplete: ' ', - width: 20, - total: len - }); - - res.on('data', function (chunk) { - bar.tick(chunk.length); - }); - - res.on('end', function () { - console.log('\n'); - }); -}); - -req.end(); -``` - -The above example result in a progress bar like the one below. - -``` -downloading [===== ] 39/bps 29% 3.7s -``` - -### Interrupt - -To display a message during progress bar execution, use `interrupt()` -```javascript -var ProgressBar = require('progress'); - -var bar = new ProgressBar(':bar :current/:total', { total: 10 }); -var timer = setInterval(function () { - bar.tick(); - if (bar.complete) { - clearInterval(timer); - } else if (bar.curr === 5) { - bar.interrupt('this message appears above the progress bar\ncurrent progress is ' + bar.curr + '/' + bar.total); - } -}, 1000); -``` - -You can see more examples in the `examples` folder. - -## License - -MIT diff --git a/node_modules/progress/index.js b/node_modules/progress/index.js deleted file mode 100644 index 4449dd30d..000000000 --- a/node_modules/progress/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/node-progress'); diff --git a/node_modules/progress/lib/node-progress.js b/node_modules/progress/lib/node-progress.js deleted file mode 100644 index 8eb0740a7..000000000 --- a/node_modules/progress/lib/node-progress.js +++ /dev/null @@ -1,236 +0,0 @@ -/*! - * node-progress - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Expose `ProgressBar`. - */ - -exports = module.exports = ProgressBar; - -/** - * Initialize a `ProgressBar` with the given `fmt` string and `options` or - * `total`. - * - * Options: - * - * - `curr` current completed index - * - `total` total number of ticks to complete - * - `width` the displayed width of the progress bar defaulting to total - * - `stream` the output stream defaulting to stderr - * - `head` head character defaulting to complete character - * - `complete` completion character defaulting to "=" - * - `incomplete` incomplete character defaulting to "-" - * - `renderThrottle` minimum time between updates in milliseconds defaulting to 16 - * - `callback` optional function to call when the progress bar completes - * - `clear` will clear the progress bar upon termination - * - * Tokens: - * - * - `:bar` the progress bar itself - * - `:current` current tick number - * - `:total` total ticks - * - `:elapsed` time elapsed in seconds - * - `:percent` completion percentage - * - `:eta` eta in seconds - * - `:rate` rate of ticks per second - * - * @param {string} fmt - * @param {object|number} options or total - * @api public - */ - -function ProgressBar(fmt, options) { - this.stream = options.stream || process.stderr; - - if (typeof(options) == 'number') { - var total = options; - options = {}; - options.total = total; - } else { - options = options || {}; - if ('string' != typeof fmt) throw new Error('format required'); - if ('number' != typeof options.total) throw new Error('total required'); - } - - this.fmt = fmt; - this.curr = options.curr || 0; - this.total = options.total; - this.width = options.width || this.total; - this.clear = options.clear - this.chars = { - complete : options.complete || '=', - incomplete : options.incomplete || '-', - head : options.head || (options.complete || '=') - }; - this.renderThrottle = options.renderThrottle !== 0 ? (options.renderThrottle || 16) : 0; - this.lastRender = -Infinity; - this.callback = options.callback || function () {}; - this.tokens = {}; - this.lastDraw = ''; -} - -/** - * "tick" the progress bar with optional `len` and optional `tokens`. - * - * @param {number|object} len or tokens - * @param {object} tokens - * @api public - */ - -ProgressBar.prototype.tick = function(len, tokens){ - if (len !== 0) - len = len || 1; - - // swap tokens - if ('object' == typeof len) tokens = len, len = 1; - if (tokens) this.tokens = tokens; - - // start time for eta - if (0 == this.curr) this.start = new Date; - - this.curr += len - - // try to render - this.render(); - - // progress complete - if (this.curr >= this.total) { - this.render(undefined, true); - this.complete = true; - this.terminate(); - this.callback(this); - return; - } -}; - -/** - * Method to render the progress bar with optional `tokens` to place in the - * progress bar's `fmt` field. - * - * @param {object} tokens - * @api public - */ - -ProgressBar.prototype.render = function (tokens, force) { - force = force !== undefined ? force : false; - if (tokens) this.tokens = tokens; - - if (!this.stream.isTTY) return; - - var now = Date.now(); - var delta = now - this.lastRender; - if (!force && (delta < this.renderThrottle)) { - return; - } else { - this.lastRender = now; - } - - var ratio = this.curr / this.total; - ratio = Math.min(Math.max(ratio, 0), 1); - - var percent = Math.floor(ratio * 100); - var incomplete, complete, completeLength; - var elapsed = new Date - this.start; - var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); - var rate = this.curr / (elapsed / 1000); - - /* populate the bar template with percentages and timestamps */ - var str = this.fmt - .replace(':current', this.curr) - .replace(':total', this.total) - .replace(':elapsed', isNaN(elapsed) ? '0.0' : (elapsed / 1000).toFixed(1)) - .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? '0.0' : (eta / 1000) - .toFixed(1)) - .replace(':percent', percent.toFixed(0) + '%') - .replace(':rate', Math.round(rate)); - - /* compute the available space (non-zero) for the bar */ - var availableSpace = Math.max(0, this.stream.columns - str.replace(':bar', '').length); - if(availableSpace && process.platform === 'win32'){ - availableSpace = availableSpace - 1; - } - - var width = Math.min(this.width, availableSpace); - - /* TODO: the following assumes the user has one ':bar' token */ - completeLength = Math.round(width * ratio); - complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete); - incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete); - - /* add head to the complete string */ - if(completeLength > 0) - complete = complete.slice(0, -1) + this.chars.head; - - /* fill in the actual progress bar */ - str = str.replace(':bar', complete + incomplete); - - /* replace the extra tokens */ - if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]); - - if (this.lastDraw !== str) { - this.stream.cursorTo(0); - this.stream.write(str); - this.stream.clearLine(1); - this.lastDraw = str; - } -}; - -/** - * "update" the progress bar to represent an exact percentage. - * The ratio (between 0 and 1) specified will be multiplied by `total` and - * floored, representing the closest available "tick." For example, if a - * progress bar has a length of 3 and `update(0.5)` is called, the progress - * will be set to 1. - * - * A ratio of 0.5 will attempt to set the progress to halfway. - * - * @param {number} ratio The ratio (between 0 and 1 inclusive) to set the - * overall completion to. - * @api public - */ - -ProgressBar.prototype.update = function (ratio, tokens) { - var goal = Math.floor(ratio * this.total); - var delta = goal - this.curr; - - this.tick(delta, tokens); -}; - -/** - * "interrupt" the progress bar and write a message above it. - * @param {string} message The message to write. - * @api public - */ - -ProgressBar.prototype.interrupt = function (message) { - // clear the current line - this.stream.clearLine(); - // move the cursor to the start of the line - this.stream.cursorTo(0); - // write the message text - this.stream.write(message); - // terminate the line after writing the message - this.stream.write('\n'); - // re-display the progress bar with its lastDraw - this.stream.write(this.lastDraw); -}; - -/** - * Terminates a progress bar. - * - * @api public - */ - -ProgressBar.prototype.terminate = function () { - if (this.clear) { - if (this.stream.clearLine) { - this.stream.clearLine(); - this.stream.cursorTo(0); - } - } else { - this.stream.write('\n'); - } -}; diff --git a/node_modules/progress/package.json b/node_modules/progress/package.json deleted file mode 100644 index 08ec859aa..000000000 --- a/node_modules/progress/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "progress@^2.0.0", - "_id": "progress@2.0.3", - "_inBundle": false, - "_integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "_location": "/progress", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "progress@^2.0.0", - "name": "progress", - "escapedName": "progress", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "_shasum": "7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8", - "_spec": "progress@^2.0.0", - "_where": "/Users/pozil/poz/git/auto-assign-issue/node_modules/eslint", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "bugs": { - "url": "https://github.com/visionmedia/node-progress/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Christoffer Hallas", - "email": "christoffer.hallas@gmail.com" - }, - { - "name": "Jordan Scales", - "email": "scalesjordan@gmail.com" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - }, - { - "name": "Marco Brack", - "email": "PapstDonB@Googlemail.com" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Flexible ascii progress bar", - "engines": { - "node": ">=0.4.0" - }, - "homepage": "https://github.com/visionmedia/node-progress#readme", - "keywords": [ - "cli", - "progress" - ], - "license": "MIT", - "main": "./index.js", - "name": "progress", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-progress.git" - }, - "version": "2.0.3" -} diff --git a/node_modules/rxjs/dist/bundles/rxjs.umd.js b/node_modules/rxjs/dist/bundles/rxjs.umd.js index 02667fcc0..f48d0e23b 100644 --- a/node_modules/rxjs/dist/bundles/rxjs.umd.js +++ b/node_modules/rxjs/dist/bundles/rxjs.umd.js @@ -411,164 +411,368 @@ **/ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define('rxjs', ['exports'], factory) : - (factory((global.rxjs = {}))); -}(this, (function (exports) { 'use strict'; - - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise */ - - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - - function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - - var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; - - function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - } - - function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - } - - function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - } - - function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - } - - function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - } - - function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - } - - function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - } - - function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - } - - function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - 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); - 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); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + typeof exports === 'object' && typeof module !== 'undefined' + ? factory(exports) + : typeof define === 'function' && define.amd + ? define('rxjs', ['exports'], factory) + : factory((global.rxjs = {})); +})(this, function (exports) { + 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise */ + + var extendStatics = function (d, b) { + extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + }; + return extendStatics(d, b); + }; + + function __extends(d, b) { + if (typeof b !== 'function' && b !== null) + throw new TypeError( + 'Class extends value ' + + String(b) + + ' is not a constructor or null' + ); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + } + + var __assign = function () { + __assign = + Object.assign || + function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + function __rest(s, e) { + var t = {}; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === 'function') + for ( + var i = 0, p = Object.getOwnPropertySymbols(s); + i < p.length; + i++ + ) { + if ( + e.indexOf(p[i]) < 0 && + Object.prototype.propertyIsEnumerable.call(s, p[i]) + ) + t[p[i]] = s[p[i]]; + } + return t; + } + + function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator['throw'](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step( + (generator = generator.apply(thisArg, _arguments || [])).next() + ); + }); + } + + function __generator(thisArg, body) { + var _ = { + label: 0, + sent: function () { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return ( + (g = { next: verb(0), throw: verb(1), return: verb(2) }), + typeof Symbol === 'function' && + (g[Symbol.iterator] = function () { + return this; + }), + g + ); + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError('Generator is already executing.'); + while (_) + try { + 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; + if (((y = 0), t)) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if ( + !((t = _.trys), + (t = t.length > 0 && t[t.length - 1])) && + (op[0] === 6 || op[0] === 2) + ) { + _ = 0; + continue; + } + if ( + op[0] === 3 && + (!t || (op[1] > t[0] && op[1] < t[3])) + ) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + function __values(o) { + var s = typeof Symbol === 'function' && Symbol.iterator, + m = s && o[s], + i = 0; + if (m) return m.call(o); + if (o && typeof o.length === 'number') + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError( + s ? 'Object is not iterable.' : 'Symbol.iterator is not defined.' + ); + } + + function __read(o, n) { + var m = typeof Symbol === 'function' && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error: error }; + } finally { + try { + if (r && !r.done && (m = i['return'])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + } + + function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) + for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + } + + function __await(v) { + return this instanceof __await ? ((this.v = v), this) : new __await(v); + } + + function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError('Symbol.asyncIterator is not defined.'); + var g = generator.apply(thisArg, _arguments || []), + i, + q = []; + return ( + (i = {}), + verb('next'), + verb('throw'), + verb('return'), + (i[Symbol.asyncIterator] = function () { + return this; + }), + i + ); + function verb(n) { + if (g[n]) + i[n] = function (v) { + return new Promise(function (a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await + ? Promise.resolve(r.value.v).then(fulfill, reject) + : settle(q[0][2], r); + } + function fulfill(value) { + resume('next', value); + } + function reject(value) { + resume('throw', value); + } + function settle(f, v) { + if ((f(v), q.shift(), q.length)) resume(q[0][0], q[0][1]); + } + } + + function __asyncValues(o) { + if (!Symbol.asyncIterator) + throw new TypeError('Symbol.asyncIterator is not defined.'); + var m = o[Symbol.asyncIterator], + i; + 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); + 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); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function (v) { + resolve({ value: v, done: d }); + }, reject); + } } function isFunction(value) { @@ -590,7 +794,13 @@ return function UnsubscriptionErrorImpl(errors) { _super(this); this.message = errors - ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') + ? errors.length + + ' errors occurred during unsubscription:\n' + + errors + .map(function (err, i) { + return i + 1 + ') ' + err.toString(); + }) + .join('\n ') : ''; this.name = 'UnsubscriptionError'; this.errors = errors; @@ -621,20 +831,30 @@ this._parentage = null; if (Array.isArray(_parentage)) { try { - for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { + for ( + var _parentage_1 = __values(_parentage), + _parentage_1_1 = _parentage_1.next(); + !_parentage_1_1.done; + _parentage_1_1 = _parentage_1.next() + ) { var parent_1 = _parentage_1_1.value; parent_1.remove(this); } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { try { - if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); + if ( + _parentage_1_1 && + !_parentage_1_1.done && + (_a = _parentage_1.return) + ) + _a.call(_parentage_1); + } finally { + if (e_1) throw e_1.error; } - finally { if (e_1) throw e_1.error; } } - } - else { + } else { _parentage.remove(this); } } @@ -642,37 +862,52 @@ if (isFunction(initialTeardown)) { try { initialTeardown(); - } - catch (e) { - errors = e instanceof UnsubscriptionError ? e.errors : [e]; + } catch (e) { + errors = + e instanceof UnsubscriptionError ? e.errors : [e]; } } var _teardowns = this._teardowns; if (_teardowns) { this._teardowns = null; try { - for (var _teardowns_1 = __values(_teardowns), _teardowns_1_1 = _teardowns_1.next(); !_teardowns_1_1.done; _teardowns_1_1 = _teardowns_1.next()) { + for ( + var _teardowns_1 = __values(_teardowns), + _teardowns_1_1 = _teardowns_1.next(); + !_teardowns_1_1.done; + _teardowns_1_1 = _teardowns_1.next() + ) { var teardown_1 = _teardowns_1_1.value; try { execTeardown(teardown_1); - } - catch (err) { - errors = errors !== null && errors !== void 0 ? errors : []; + } catch (err) { + errors = + errors !== null && errors !== void 0 + ? errors + : []; if (err instanceof UnsubscriptionError) { - errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); - } - else { + errors = __spreadArray( + __spreadArray([], __read(errors)), + __read(err.errors) + ); + } else { errors.push(err); } } } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { try { - if (_teardowns_1_1 && !_teardowns_1_1.done && (_b = _teardowns_1.return)) _b.call(_teardowns_1); + if ( + _teardowns_1_1 && + !_teardowns_1_1.done && + (_b = _teardowns_1.return) + ) + _b.call(_teardowns_1); + } finally { + if (e_2) throw e_2.error; } - finally { if (e_2) throw e_2.error; } } } if (errors) { @@ -685,32 +920,40 @@ if (teardown && teardown !== this) { if (this.closed) { execTeardown(teardown); - } - else { + } else { if (teardown instanceof Subscription) { if (teardown.closed || teardown._hasParent(this)) { return; } teardown._addParent(this); } - (this._teardowns = (_a = this._teardowns) !== null && _a !== void 0 ? _a : []).push(teardown); + (this._teardowns = + (_a = this._teardowns) !== null && _a !== void 0 + ? _a + : []).push(teardown); } } }; Subscription.prototype._hasParent = function (parent) { var _parentage = this._parentage; - return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); + return ( + _parentage === parent || + (Array.isArray(_parentage) && _parentage.includes(parent)) + ); }; Subscription.prototype._addParent = function (parent) { var _parentage = this._parentage; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + this._parentage = Array.isArray(_parentage) + ? (_parentage.push(parent), _parentage) + : _parentage + ? [_parentage, parent] + : parent; }; Subscription.prototype._removeParent = function (parent) { var _parentage = this._parentage; if (_parentage === parent) { this._parentage = null; - } - else if (Array.isArray(_parentage)) { + } else if (Array.isArray(_parentage)) { arrRemove(_parentage, parent); } }; @@ -727,17 +970,22 @@ return empty; })(); return Subscription; - }()); + })(); var EMPTY_SUBSCRIPTION = Subscription.EMPTY; function isSubscription(value) { - return (value instanceof Subscription || - (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))); + return ( + value instanceof Subscription || + (value && + 'closed' in value && + isFunction(value.remove) && + isFunction(value.add) && + isFunction(value.unsubscribe)) + ); } function execTeardown(teardown) { if (isFunction(teardown)) { teardown(); - } - else { + } else { teardown.unsubscribe(); } } @@ -747,7 +995,7 @@ onStoppedNotification: null, Promise: undefined, useDeprecatedSynchronousErrorHandling: false, - useDeprecatedNextContext: false, + useDeprecatedNextContext: false }; var timeoutProvider = { @@ -757,13 +1005,21 @@ args[_i] = arguments[_i]; } var delegate = timeoutProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) || setTimeout).apply(void 0, __spreadArray([], __read(args))); + return ( + (delegate === null || delegate === void 0 + ? void 0 + : delegate.setTimeout) || setTimeout + ).apply(void 0, __spreadArray([], __read(args))); }, clearTimeout: function (handle) { var delegate = timeoutProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + return ( + (delegate === null || delegate === void 0 + ? void 0 + : delegate.clearTimeout) || clearTimeout + )(handle); }, - delegate: undefined, + delegate: undefined }; function reportUnhandledError(err) { @@ -771,16 +1027,17 @@ var onUnhandledError = config.onUnhandledError; if (onUnhandledError) { onUnhandledError(err); - } - else { + } else { throw err; } }); } - function noop() { } + function noop() {} - var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })(); + var COMPLETE_NOTIFICATION = (function () { + return createNotification('C', undefined, undefined); + })(); function errorNotification(error) { return createNotification('E', undefined, error); } @@ -791,7 +1048,7 @@ return { kind: kind, value: value, - error: error, + error: error }; } @@ -804,14 +1061,15 @@ } cb(); if (isRoot) { - var _a = context, errorThrown = _a.errorThrown, error = _a.error; + var _a = context, + errorThrown = _a.errorThrown, + error = _a.error; context = null; if (errorThrown) { throw error; } } - } - else { + } else { cb(); } } @@ -832,8 +1090,7 @@ if (isSubscription(destination)) { destination.add(_this); } - } - else { + } else { _this.destination = EMPTY_OBSERVER; } return _this; @@ -844,16 +1101,14 @@ Subscriber.prototype.next = function (value) { if (this.isStopped) { handleStoppedNotification(nextNotification(value), this); - } - else { + } else { this._next(value); } }; Subscriber.prototype.error = function (err) { if (this.isStopped) { handleStoppedNotification(errorNotification(err), this); - } - else { + } else { this.isStopped = true; this._error(err); } @@ -861,8 +1116,7 @@ Subscriber.prototype.complete = function () { if (this.isStopped) { handleStoppedNotification(COMPLETE_NOTIFICATION, this); - } - else { + } else { this.isStopped = true; this._complete(); } @@ -880,86 +1134,136 @@ Subscriber.prototype._error = function (err) { try { this.destination.error(err); - } - finally { + } finally { this.unsubscribe(); } }; Subscriber.prototype._complete = function () { try { this.destination.complete(); - } - finally { + } finally { this.unsubscribe(); } }; return Subscriber; - }(Subscription)); + })(Subscription); + var _bind = Function.prototype.bind; + function bind(fn, thisArg) { + return _bind.call(fn, thisArg); + } + var ConsumerObserver = (function () { + function ConsumerObserver(partialObserver) { + this.partialObserver = partialObserver; + } + ConsumerObserver.prototype.next = function (value) { + var partialObserver = this.partialObserver; + if (partialObserver.next) { + try { + partialObserver.next(value); + } catch (error) { + handleUnhandledError(error); + } + } + }; + ConsumerObserver.prototype.error = function (err) { + var partialObserver = this.partialObserver; + if (partialObserver.error) { + try { + partialObserver.error(err); + } catch (error) { + handleUnhandledError(error); + } + } else { + handleUnhandledError(err); + } + }; + ConsumerObserver.prototype.complete = function () { + var partialObserver = this.partialObserver; + if (partialObserver.complete) { + try { + partialObserver.complete(); + } catch (error) { + handleUnhandledError(error); + } + } + }; + return ConsumerObserver; + })(); var SafeSubscriber = (function (_super) { __extends(SafeSubscriber, _super); function SafeSubscriber(observerOrNext, error, complete) { var _this = _super.call(this) || this; - var next; - if (isFunction(observerOrNext)) { - next = observerOrNext; - } - else if (observerOrNext) { - (next = observerOrNext.next, error = observerOrNext.error, complete = observerOrNext.complete); + var partialObserver; + if (isFunction(observerOrNext) || !observerOrNext) { + partialObserver = { + next: + observerOrNext !== null && observerOrNext !== void 0 + ? observerOrNext + : undefined, + error: + error !== null && error !== void 0 ? error : undefined, + complete: + complete !== null && complete !== void 0 + ? complete + : undefined + }; + } else { var context_1; if (_this && config.useDeprecatedNextContext) { context_1 = Object.create(observerOrNext); - context_1.unsubscribe = function () { return _this.unsubscribe(); }; - } - else { - context_1 = observerOrNext; + context_1.unsubscribe = function () { + return _this.unsubscribe(); + }; + partialObserver = { + next: + observerOrNext.next && + bind(observerOrNext.next, context_1), + error: + observerOrNext.error && + bind(observerOrNext.error, context_1), + complete: + observerOrNext.complete && + bind(observerOrNext.complete, context_1) + }; + } else { + partialObserver = observerOrNext; } - next = next === null || next === void 0 ? void 0 : next.bind(context_1); - error = error === null || error === void 0 ? void 0 : error.bind(context_1); - complete = complete === null || complete === void 0 ? void 0 : complete.bind(context_1); - } - _this.destination = { - next: next ? wrapForErrorHandling(next, _this) : noop, - error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler, _this), - complete: complete ? wrapForErrorHandling(complete, _this) : noop, - }; + } + _this.destination = new ConsumerObserver(partialObserver); return _this; } return SafeSubscriber; - }(Subscriber)); - function wrapForErrorHandling(handler, instance) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - try { - handler.apply(void 0, __spreadArray([], __read(args))); - } - catch (err) { - if (config.useDeprecatedSynchronousErrorHandling) { - captureError(err); - } - else { - reportUnhandledError(err); - } - } - }; + })(Subscriber); + function handleUnhandledError(error) { + if (config.useDeprecatedSynchronousErrorHandling) { + captureError(error); + } else { + reportUnhandledError(error); + } } function defaultErrorHandler(err) { throw err; } function handleStoppedNotification(notification, subscriber) { var onStoppedNotification = config.onStoppedNotification; - onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); }); + onStoppedNotification && + timeoutProvider.setTimeout(function () { + return onStoppedNotification(notification, subscriber); + }); } var EMPTY_OBSERVER = { closed: true, next: noop, error: defaultErrorHandler, - complete: noop, + complete: noop }; - var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })(); + var observable = (function () { + return ( + (typeof Symbol === 'function' && Symbol.observable) || + '@@observable' + ); + })(); function identity(x) { return x; @@ -980,7 +1284,9 @@ return fns[0]; } return function piped(input) { - return fns.reduce(function (prev, fn) { return fn(prev); }, input); + return fns.reduce(function (prev, fn) { + return fn(prev); + }, input); }; } @@ -996,27 +1302,33 @@ observable$$1.operator = operator; return observable$$1; }; - Observable.prototype.subscribe = function (observerOrNext, error, complete) { + Observable.prototype.subscribe = function ( + observerOrNext, + error, + complete + ) { var _this = this; - var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); + var subscriber = isSubscriber(observerOrNext) + ? observerOrNext + : new SafeSubscriber(observerOrNext, error, complete); errorContext(function () { - var _a = _this, operator = _a.operator, source = _a.source; - subscriber.add(operator - ? - operator.call(subscriber, source) - : source - ? - _this._subscribe(subscriber) - : - _this._trySubscribe(subscriber)); + var _a = _this, + operator = _a.operator, + source = _a.source; + subscriber.add( + operator + ? operator.call(subscriber, source) + : source + ? _this._subscribe(subscriber) + : _this._trySubscribe(subscriber) + ); }); return subscriber; }; Observable.prototype._trySubscribe = function (sink) { try { return this._subscribe(sink); - } - catch (err) { + } catch (err) { sink.error(err); } }; @@ -1028,21 +1340,22 @@ next: function (value) { try { next(value); - } - catch (err) { + } catch (err) { reject(err); subscriber.unsubscribe(); } }, error: reject, - complete: resolve, + complete: resolve }); _this.subscribe(subscriber); }); }; Observable.prototype._subscribe = function (subscriber) { var _a; - return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); + return (_a = this.source) === null || _a === void 0 + ? void 0 + : _a.subscribe(subscriber); }; Observable.prototype[observable] = function () { return this; @@ -1059,27 +1372,52 @@ promiseCtor = getPromiseCtor(promiseCtor); return new promiseCtor(function (resolve, reject) { var value; - _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); }); + _this.subscribe( + function (x) { + return (value = x); + }, + function (err) { + return reject(err); + }, + function () { + return resolve(value); + } + ); }); }; Observable.create = function (subscribe) { return new Observable(subscribe); }; return Observable; - }()); + })(); function getPromiseCtor(promiseCtor) { var _a; - return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; + return (_a = + promiseCtor !== null && promiseCtor !== void 0 + ? promiseCtor + : config.Promise) !== null && _a !== void 0 + ? _a + : Promise; } function isObserver(value) { - return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); + return ( + value && + isFunction(value.next) && + isFunction(value.error) && + isFunction(value.complete) + ); } function isSubscriber(value) { - return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value)); + return ( + (value && value instanceof Subscriber) || + (isObserver(value) && isSubscription(value)) + ); } function hasLift(source) { - return isFunction(source === null || source === void 0 ? void 0 : source.lift); + return isFunction( + source === null || source === void 0 ? void 0 : source.lift + ); } function operate(init) { return function (source) { @@ -1087,8 +1425,7 @@ return source.lift(function (liftedSource) { try { return init(liftedSource, this); - } - catch (err) { + } catch (err) { this.error(err); } }); @@ -1097,75 +1434,111 @@ }; } + function createOperatorSubscriber( + destination, + onNext, + onComplete, + onError, + onFinalize + ) { + return new OperatorSubscriber( + destination, + onNext, + onComplete, + onError, + onFinalize + ); + } var OperatorSubscriber = (function (_super) { __extends(OperatorSubscriber, _super); - function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + function OperatorSubscriber( + destination, + onNext, + onComplete, + onError, + onFinalize, + shouldUnsubscribe + ) { var _this = _super.call(this, destination) || this; _this.onFinalize = onFinalize; + _this.shouldUnsubscribe = shouldUnsubscribe; _this._next = onNext ? function (value) { - try { - onNext(value); - } - catch (err) { - destination.error(err); - } - } + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } : _super.prototype._next; _this._error = onError ? function (err) { - try { - onError(err); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } + try { + onError(err); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._error; _this._complete = onComplete ? function () { - try { - onComplete(); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } + try { + onComplete(); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._complete; return _this; } OperatorSubscriber.prototype.unsubscribe = function () { var _a; - var closed = this.closed; - _super.prototype.unsubscribe.call(this); - !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { + var closed_1 = this.closed; + _super.prototype.unsubscribe.call(this); + !closed_1 && + ((_a = this.onFinalize) === null || _a === void 0 + ? void 0 + : _a.call(this)); + } }; return OperatorSubscriber; - }(Subscriber)); + })(Subscriber); function refCount() { return operate(function (source, subscriber) { var connection = null; source._refCount++; - var refCounter = new OperatorSubscriber(subscriber, undefined, undefined, undefined, function () { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { + var refCounter = createOperatorSubscriber( + subscriber, + undefined, + undefined, + undefined, + function () { + if ( + !source || + source._refCount <= 0 || + 0 < --source._refCount + ) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; connection = null; - return; - } - var sharedConnection = source._connection; - var conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); + if ( + sharedConnection && + (!conn || sharedConnection === conn) + ) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); } - subscriber.unsubscribe(); - }); + ); source.subscribe(refCounter); if (!refCounter.closed) { connection = source.connect(); @@ -1201,7 +1574,9 @@ this._refCount = 0; var _connection = this._connection; this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + _connection === null || _connection === void 0 + ? void 0 + : _connection.unsubscribe(); }; ConnectableObservable.prototype.connect = function () { var _this = this; @@ -1209,13 +1584,25 @@ if (!connection) { connection = this._connection = new Subscription(); var subject_1 = this.getSubject(); - connection.add(this.source.subscribe(new OperatorSubscriber(subject_1, undefined, function () { - _this._teardown(); - subject_1.complete(); - }, function (err) { - _this._teardown(); - subject_1.error(err); - }, function () { return _this._teardown(); }))); + connection.add( + this.source.subscribe( + createOperatorSubscriber( + subject_1, + undefined, + function () { + _this._teardown(); + subject_1.complete(); + }, + function (err) { + _this._teardown(); + subject_1.error(err); + }, + function () { + return _this._teardown(); + } + ) + ) + ); if (connection.closed) { this._connection = null; connection = Subscription.EMPTY; @@ -1227,13 +1614,13 @@ return refCount()(this); }; return ConnectableObservable; - }(Observable)); + })(Observable); var performanceTimestampProvider = { now: function () { return (performanceTimestampProvider.delegate || performance).now(); }, - delegate: undefined, + delegate: undefined }; var animationFrameProvider = { @@ -1249,7 +1636,11 @@ cancel = undefined; callback(timestamp); }); - return new Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); }); + return new Subscription(function () { + return cancel === null || cancel === void 0 + ? void 0 + : cancel(handle); + }); }, requestAnimationFrame: function () { var args = []; @@ -1257,7 +1648,11 @@ args[_i] = arguments[_i]; } var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + return ( + (delegate === null || delegate === void 0 + ? void 0 + : delegate.requestAnimationFrame) || requestAnimationFrame + ).apply(void 0, __spreadArray([], __read(args))); }, cancelAnimationFrame: function () { var args = []; @@ -1265,13 +1660,19 @@ args[_i] = arguments[_i]; } var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + return ( + (delegate === null || delegate === void 0 + ? void 0 + : delegate.cancelAnimationFrame) || cancelAnimationFrame + ).apply(void 0, __spreadArray([], __read(args))); }, - delegate: undefined, + delegate: undefined }; function animationFrames(timestampProvider) { - return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; + return timestampProvider + ? animationFramesFactory(timestampProvider) + : DEFAULT_ANIMATION_FRAMES; } function animationFramesFactory(timestampProvider) { var schedule = animationFrameProvider.schedule; @@ -1283,7 +1684,7 @@ var now = provider.now(); subscriber.next({ timestamp: timestampProvider ? now : timestamp, - elapsed: now - start, + elapsed: now - start }); if (!subscriber.closed) { subscription.add(schedule(run)); @@ -1332,17 +1733,28 @@ if (!_this.isStopped) { var copy = _this.observers.slice(); try { - for (var copy_1 = __values(copy), copy_1_1 = copy_1.next(); !copy_1_1.done; copy_1_1 = copy_1.next()) { + for ( + var copy_1 = __values(copy), + copy_1_1 = copy_1.next(); + !copy_1_1.done; + copy_1_1 = copy_1.next() + ) { var observer = copy_1_1.value; observer.next(value); } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { try { - if (copy_1_1 && !copy_1_1.done && (_a = copy_1.return)) _a.call(copy_1); + if ( + copy_1_1 && + !copy_1_1.done && + (_a = copy_1.return) + ) + _a.call(copy_1); + } finally { + if (e_1) throw e_1.error; } - finally { if (e_1) throw e_1.error; } } } }); @@ -1378,10 +1790,14 @@ this.isStopped = this.closed = true; this.observers = null; }; - Object.defineProperty(Subject.prototype, "observed", { + Object.defineProperty(Subject.prototype, 'observed', { get: function () { var _a; - return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + return ( + ((_a = this.observers) === null || _a === void 0 + ? void 0 + : _a.length) > 0 + ); }, enumerable: false, configurable: true @@ -1396,17 +1812,25 @@ return this._innerSubscribe(subscriber); }; Subject.prototype._innerSubscribe = function (subscriber) { - var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; + var _a = this, + hasError = _a.hasError, + isStopped = _a.isStopped, + observers = _a.observers; return hasError || isStopped ? EMPTY_SUBSCRIPTION - : (observers.push(subscriber), new Subscription(function () { return arrRemove(observers, subscriber); })); + : (observers.push(subscriber), + new Subscription(function () { + return arrRemove(observers, subscriber); + })); }; Subject.prototype._checkFinalizedStatuses = function (subscriber) { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; + var _a = this, + hasError = _a.hasError, + thrownError = _a.thrownError, + isStopped = _a.isStopped; if (hasError) { subscriber.error(thrownError); - } - else if (isStopped) { + } else if (isStopped) { subscriber.complete(); } }; @@ -1419,7 +1843,7 @@ return new AnonymousSubject(destination, source); }; return Subject; - }(Observable)); + })(Observable); var AnonymousSubject = (function (_super) { __extends(AnonymousSubject, _super); function AnonymousSubject(destination, source) { @@ -1430,22 +1854,42 @@ } AnonymousSubject.prototype.next = function (value) { var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); + (_b = + (_a = this.destination) === null || _a === void 0 + ? void 0 + : _a.next) === null || _b === void 0 + ? void 0 + : _b.call(_a, value); }; AnonymousSubject.prototype.error = function (err) { var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); + (_b = + (_a = this.destination) === null || _a === void 0 + ? void 0 + : _a.error) === null || _b === void 0 + ? void 0 + : _b.call(_a, err); }; AnonymousSubject.prototype.complete = function () { var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); + (_b = + (_a = this.destination) === null || _a === void 0 + ? void 0 + : _a.complete) === null || _b === void 0 + ? void 0 + : _b.call(_a); }; AnonymousSubject.prototype._subscribe = function (subscriber) { var _a, _b; - return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; + return (_b = + (_a = this.source) === null || _a === void 0 + ? void 0 + : _a.subscribe(subscriber)) !== null && _b !== void 0 + ? _b + : EMPTY_SUBSCRIPTION; }; return AnonymousSubject; - }(Subject)); + })(Subject); var BehaviorSubject = (function (_super) { __extends(BehaviorSubject, _super); @@ -1454,7 +1898,7 @@ _this._value = _value; return _this; } - Object.defineProperty(BehaviorSubject.prototype, "value", { + Object.defineProperty(BehaviorSubject.prototype, 'value', { get: function () { return this.getValue(); }, @@ -1462,12 +1906,18 @@ configurable: true }); BehaviorSubject.prototype._subscribe = function (subscriber) { - var subscription = _super.prototype._subscribe.call(this, subscriber); + var subscription = _super.prototype._subscribe.call( + this, + subscriber + ); !subscription.closed && subscriber.next(this._value); return subscription; }; BehaviorSubject.prototype.getValue = function () { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; + var _a = this, + hasError = _a.hasError, + thrownError = _a.thrownError, + _value = _a._value; if (hasError) { throw thrownError; } @@ -1478,21 +1928,27 @@ _super.prototype.next.call(this, (this._value = value)); }; return BehaviorSubject; - }(Subject)); + })(Subject); var dateTimestampProvider = { now: function () { return (dateTimestampProvider.delegate || Date).now(); }, - delegate: undefined, + delegate: undefined }; var ReplaySubject = (function (_super) { __extends(ReplaySubject, _super); function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) { - if (_bufferSize === void 0) { _bufferSize = Infinity; } - if (_windowTime === void 0) { _windowTime = Infinity; } - if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; } + if (_bufferSize === void 0) { + _bufferSize = Infinity; + } + if (_windowTime === void 0) { + _windowTime = Infinity; + } + if (_timestampProvider === void 0) { + _timestampProvider = dateTimestampProvider; + } var _this = _super.call(this) || this; _this._bufferSize = _bufferSize; _this._windowTime = _windowTime; @@ -1505,10 +1961,16 @@ return _this; } ReplaySubject.prototype.next = function (value) { - var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; + var _a = this, + isStopped = _a.isStopped, + _buffer = _a._buffer, + _infiniteTimeWindow = _a._infiniteTimeWindow, + _timestampProvider = _a._timestampProvider, + _windowTime = _a._windowTime; if (!isStopped) { _buffer.push(value); - !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + !_infiniteTimeWindow && + _buffer.push(_timestampProvider.now() + _windowTime); } this._trimBuffer(); _super.prototype.next.call(this, value); @@ -1517,45 +1979,68 @@ this._throwIfClosed(); this._trimBuffer(); var subscription = this._innerSubscribe(subscriber); - var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; + var _a = this, + _infiniteTimeWindow = _a._infiniteTimeWindow, + _buffer = _a._buffer; var copy = _buffer.slice(); - for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + for ( + var i = 0; + i < copy.length && !subscriber.closed; + i += _infiniteTimeWindow ? 1 : 2 + ) { subscriber.next(copy[i]); } this._checkFinalizedStatuses(subscriber); return subscription; }; ReplaySubject.prototype._trimBuffer = function () { - var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; - var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; - _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + var _a = this, + _bufferSize = _a._bufferSize, + _timestampProvider = _a._timestampProvider, + _buffer = _a._buffer, + _infiniteTimeWindow = _a._infiniteTimeWindow; + var adjustedBufferSize = + (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && + adjustedBufferSize < _buffer.length && + _buffer.splice(0, _buffer.length - adjustedBufferSize); if (!_infiniteTimeWindow) { var now = _timestampProvider.now(); var last = 0; - for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { + for ( + var i = 1; + i < _buffer.length && _buffer[i] <= now; + i += 2 + ) { last = i; } last && _buffer.splice(0, last + 1); } }; return ReplaySubject; - }(Subject)); + })(Subject); var AsyncSubject = (function (_super) { __extends(AsyncSubject, _super); function AsyncSubject() { - var _this = _super !== null && _super.apply(this, arguments) || this; + var _this = + (_super !== null && _super.apply(this, arguments)) || this; _this._value = null; _this._hasValue = false; _this._isComplete = false; return _this; } AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) { - var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; + var _a = this, + hasError = _a.hasError, + _hasValue = _a._hasValue, + _value = _a._value, + thrownError = _a.thrownError, + isStopped = _a.isStopped, + _isComplete = _a._isComplete; if (hasError) { subscriber.error(thrownError); - } - else if (isStopped || _isComplete) { + } else if (isStopped || _isComplete) { _hasValue && subscriber.next(_value); subscriber.complete(); } @@ -1567,7 +2052,10 @@ } }; AsyncSubject.prototype.complete = function () { - var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; + var _a = this, + _hasValue = _a._hasValue, + _value = _a._value, + _isComplete = _a._isComplete; if (!_isComplete) { this._isComplete = true; _hasValue && _super.prototype.next.call(this, _value); @@ -1575,7 +2063,7 @@ } }; return AsyncSubject; - }(Subject)); + })(Subject); var Action = (function (_super) { __extends(Action, _super); @@ -1583,11 +2071,13 @@ return _super.call(this) || this; } Action.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } + if (delay === void 0) { + delay = 0; + } return this; }; return Action; - }(Subscription)); + })(Subscription); var intervalProvider = { setInterval: function () { @@ -1596,13 +2086,21 @@ args[_i] = arguments[_i]; } var delegate = intervalProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) || setInterval).apply(void 0, __spreadArray([], __read(args))); + return ( + (delegate === null || delegate === void 0 + ? void 0 + : delegate.setInterval) || setInterval + ).apply(void 0, __spreadArray([], __read(args))); }, clearInterval: function (handle) { var delegate = intervalProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + return ( + (delegate === null || delegate === void 0 + ? void 0 + : delegate.clearInterval) || clearInterval + )(handle); }, - delegate: undefined, + delegate: undefined }; var AsyncAction = (function (_super) { @@ -1615,7 +2113,9 @@ return _this; } AsyncAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } + if (delay === void 0) { + delay = 0; + } if (this.closed) { return this; } @@ -1630,13 +2130,32 @@ this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); return this; }; - AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) { - if (delay === void 0) { delay = 0; } - return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); - }; - AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay != null && this.delay === delay && this.pending === false) { + AsyncAction.prototype.requestAsyncId = function ( + scheduler, + _id, + delay + ) { + if (delay === void 0) { + delay = 0; + } + return intervalProvider.setInterval( + scheduler.flush.bind(scheduler, this), + delay + ); + }; + AsyncAction.prototype.recycleAsyncId = function ( + _scheduler, + id, + delay + ) { + if (delay === void 0) { + delay = 0; + } + if ( + delay != null && + this.delay === delay && + this.pending === false + ) { return id; } intervalProvider.clearInterval(id); @@ -1650,8 +2169,7 @@ var error = this._execute(state, delay); if (error) { return error; - } - else if (this.pending === false && this.id != null) { + } else if (this.pending === false && this.id != null) { this.id = this.recycleAsyncId(this.scheduler, this.id, null); } }; @@ -1660,10 +2178,11 @@ var errorValue; try { this.work(state); - } - catch (e) { + } catch (e) { errored = true; - errorValue = e ? e : new Error('Scheduled action threw falsy error'); + errorValue = e + ? e + : new Error('Scheduled action threw falsy error'); } if (errored) { this.unsubscribe(); @@ -1672,7 +2191,9 @@ }; AsyncAction.prototype.unsubscribe = function () { if (!this.closed) { - var _a = this, id = _a.id, scheduler = _a.scheduler; + var _a = this, + id = _a.id, + scheduler = _a.scheduler; var actions = scheduler.actions; this.work = this.state = this.scheduler = null; this.pending = false; @@ -1685,7 +2206,7 @@ } }; return AsyncAction; - }(Action)); + })(Action); var nextHandle = 1; var resolved; @@ -1704,15 +2225,18 @@ if (!resolved) { resolved = Promise.resolve(); } - resolved.then(function () { return findAndClearHandle(handle) && cb(); }); + resolved.then(function () { + return findAndClearHandle(handle) && cb(); + }); return handle; }, clearImmediate: function (handle) { findAndClearHandle(handle); - }, + } }; - var setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate; + var setImmediate = Immediate.setImmediate, + clearImmediate = Immediate.clearImmediate; var immediateProvider = { setImmediate: function () { var args = []; @@ -1720,13 +2244,21 @@ args[_i] = arguments[_i]; } var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args))); + return ( + (delegate === null || delegate === void 0 + ? void 0 + : delegate.setImmediate) || setImmediate + ).apply(void 0, __spreadArray([], __read(args))); }, clearImmediate: function (handle) { var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); + return ( + (delegate === null || delegate === void 0 + ? void 0 + : delegate.clearImmediate) || clearImmediate + )(handle); }, - delegate: undefined, + delegate: undefined }; var AsapAction = (function (_super) { @@ -1738,45 +2270,80 @@ return _this; } AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } + if (delay === void 0) { + delay = 0; + } if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + return _super.prototype.requestAsyncId.call( + this, + scheduler, + id, + delay + ); } scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); + return ( + scheduler._scheduled || + (scheduler._scheduled = immediateProvider.setImmediate( + scheduler.flush.bind(scheduler, undefined) + )) + ); }; AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - if (!scheduler.actions.some(function (action) { return action.id === id; })) { + if (delay === void 0) { + delay = 0; + } + if ( + (delay != null && delay > 0) || + (delay == null && this.delay > 0) + ) { + return _super.prototype.recycleAsyncId.call( + this, + scheduler, + id, + delay + ); + } + if ( + !scheduler.actions.some(function (action) { + return action.id === id; + }) + ) { immediateProvider.clearImmediate(id); scheduler._scheduled = undefined; } return undefined; }; return AsapAction; - }(AsyncAction)); + })(AsyncAction); var Scheduler = (function () { function Scheduler(schedulerActionCtor, now) { - if (now === void 0) { now = Scheduler.now; } + if (now === void 0) { + now = Scheduler.now; + } this.schedulerActionCtor = schedulerActionCtor; this.now = now; } Scheduler.prototype.schedule = function (work, delay, state) { - if (delay === void 0) { delay = 0; } - return new this.schedulerActionCtor(this, work).schedule(state, delay); + if (delay === void 0) { + delay = 0; + } + return new this.schedulerActionCtor(this, work).schedule( + state, + delay + ); }; Scheduler.now = dateTimestampProvider.now; return Scheduler; - }()); + })(); var AsyncScheduler = (function (_super) { __extends(AsyncScheduler, _super); function AsyncScheduler(SchedulerAction, now) { - if (now === void 0) { now = Scheduler.now; } + if (now === void 0) { + now = Scheduler.now; + } var _this = _super.call(this, SchedulerAction, now) || this; _this.actions = []; _this._active = false; @@ -1805,12 +2372,12 @@ } }; return AsyncScheduler; - }(Scheduler)); + })(Scheduler); var AsapScheduler = (function (_super) { __extends(AsapScheduler, _super); function AsapScheduler() { - return _super !== null && _super.apply(this, arguments) || this; + return (_super !== null && _super.apply(this, arguments)) || this; } AsapScheduler.prototype.flush = function (action) { this._active = true; @@ -1823,17 +2390,25 @@ if ((error = action.execute(action.state, action.delay))) { break; } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); + } while ( + (action = actions[0]) && + action.id === flushId && + actions.shift() + ); this._active = false; if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { + while ( + (action = actions[0]) && + action.id === flushId && + actions.shift() + ) { action.unsubscribe(); } throw error; } }; return AsapScheduler; - }(AsyncScheduler)); + })(AsyncScheduler); var asapScheduler = new AsapScheduler(AsapAction); var asap = asapScheduler; @@ -1850,7 +2425,9 @@ return _this; } QueueAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } + if (delay === void 0) { + delay = 0; + } if (delay > 0) { return _super.prototype.schedule.call(this, state, delay); } @@ -1860,27 +2437,37 @@ return this; }; QueueAction.prototype.execute = function (state, delay) { - return (delay > 0 || this.closed) ? - _super.prototype.execute.call(this, state, delay) : - this._execute(state, delay); + return delay > 0 || this.closed + ? _super.prototype.execute.call(this, state, delay) + : this._execute(state, delay); }; QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + if (delay === void 0) { + delay = 0; + } + if ( + (delay != null && delay > 0) || + (delay == null && this.delay > 0) + ) { + return _super.prototype.requestAsyncId.call( + this, + scheduler, + id, + delay + ); } return scheduler.flush(this); }; return QueueAction; - }(AsyncAction)); + })(AsyncAction); var QueueScheduler = (function (_super) { __extends(QueueScheduler, _super); function QueueScheduler() { - return _super !== null && _super.apply(this, arguments) || this; + return (_super !== null && _super.apply(this, arguments)) || this; } return QueueScheduler; - }(AsyncScheduler)); + })(AsyncScheduler); var queueScheduler = new QueueScheduler(QueueAction); var queue = queueScheduler; @@ -1893,32 +2480,67 @@ _this.work = work; return _this; } - AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } + AnimationFrameAction.prototype.requestAsyncId = function ( + scheduler, + id, + delay + ) { + if (delay === void 0) { + delay = 0; + } if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + return _super.prototype.requestAsyncId.call( + this, + scheduler, + id, + delay + ); } scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); })); - }; - AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - if (!scheduler.actions.some(function (action) { return action.id === id; })) { + return ( + scheduler._scheduled || + (scheduler._scheduled = + animationFrameProvider.requestAnimationFrame(function () { + return scheduler.flush(undefined); + })) + ); + }; + AnimationFrameAction.prototype.recycleAsyncId = function ( + scheduler, + id, + delay + ) { + if (delay === void 0) { + delay = 0; + } + if ( + (delay != null && delay > 0) || + (delay == null && this.delay > 0) + ) { + return _super.prototype.recycleAsyncId.call( + this, + scheduler, + id, + delay + ); + } + if ( + !scheduler.actions.some(function (action) { + return action.id === id; + }) + ) { animationFrameProvider.cancelAnimationFrame(id); scheduler._scheduled = undefined; } return undefined; }; return AnimationFrameAction; - }(AsyncAction)); + })(AsyncAction); var AnimationFrameScheduler = (function (_super) { __extends(AnimationFrameScheduler, _super); function AnimationFrameScheduler() { - return _super !== null && _super.apply(this, arguments) || this; + return (_super !== null && _super.apply(this, arguments)) || this; } AnimationFrameScheduler.prototype.flush = function (action) { this._active = true; @@ -1931,34 +2553,53 @@ if ((error = action.execute(action.state, action.delay))) { break; } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); + } while ( + (action = actions[0]) && + action.id === flushId && + actions.shift() + ); this._active = false; if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { + while ( + (action = actions[0]) && + action.id === flushId && + actions.shift() + ) { action.unsubscribe(); } throw error; } }; return AnimationFrameScheduler; - }(AsyncScheduler)); + })(AsyncScheduler); - var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); + var animationFrameScheduler = new AnimationFrameScheduler( + AnimationFrameAction + ); var animationFrame = animationFrameScheduler; var VirtualTimeScheduler = (function (_super) { __extends(VirtualTimeScheduler, _super); function VirtualTimeScheduler(schedulerActionCtor, maxFrames) { - if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; } - if (maxFrames === void 0) { maxFrames = Infinity; } - var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this; + if (schedulerActionCtor === void 0) { + schedulerActionCtor = VirtualAction; + } + if (maxFrames === void 0) { + maxFrames = Infinity; + } + var _this = + _super.call(this, schedulerActionCtor, function () { + return _this.frame; + }) || this; _this.maxFrames = maxFrames; _this.frame = 0; _this.index = -1; return _this; } VirtualTimeScheduler.prototype.flush = function () { - var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; + var _a = this, + actions = _a.actions, + maxFrames = _a.maxFrames; var error; var action; while ((action = actions[0]) && action.delay <= maxFrames) { @@ -1977,11 +2618,13 @@ }; VirtualTimeScheduler.frameTimeFactor = 10; return VirtualTimeScheduler; - }(AsyncScheduler)); + })(AsyncScheduler); var VirtualAction = (function (_super) { __extends(VirtualAction, _super); function VirtualAction(scheduler, work, index) { - if (index === void 0) { index = (scheduler.index += 1); } + if (index === void 0) { + index = scheduler.index += 1; + } var _this = _super.call(this, scheduler, work) || this; _this.scheduler = scheduler; _this.work = work; @@ -1991,7 +2634,9 @@ return _this; } VirtualAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } + if (delay === void 0) { + delay = 0; + } if (Number.isFinite(delay)) { if (!this.id) { return _super.prototype.schedule.call(this, state, delay); @@ -2000,21 +2645,32 @@ var action = new VirtualAction(this.scheduler, this.work); this.add(action); return action.schedule(state, delay); - } - else { + } else { return Subscription.EMPTY; } }; - VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } + VirtualAction.prototype.requestAsyncId = function ( + scheduler, + id, + delay + ) { + if (delay === void 0) { + delay = 0; + } this.delay = scheduler.frame + delay; var actions = scheduler.actions; actions.push(this); actions.sort(VirtualAction.sortActions); return true; }; - VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } + VirtualAction.prototype.recycleAsyncId = function ( + scheduler, + id, + delay + ) { + if (delay === void 0) { + delay = 0; + } return undefined; }; VirtualAction.prototype._execute = function (state, delay) { @@ -2026,30 +2682,32 @@ if (a.delay === b.delay) { if (a.index === b.index) { return 0; - } - else if (a.index > b.index) { + } else if (a.index > b.index) { return 1; - } - else { + } else { return -1; } - } - else if (a.delay > b.delay) { + } else if (a.delay > b.delay) { return 1; - } - else { + } else { return -1; } }; return VirtualAction; - }(AsyncAction)); + })(AsyncAction); - var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); }); + var EMPTY = new Observable(function (subscriber) { + return subscriber.complete(); + }); function empty(scheduler) { return scheduler ? emptyScheduled(scheduler) : EMPTY; } function emptyScheduled(scheduler) { - return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); + return new Observable(function (subscriber) { + return scheduler.schedule(function () { + return subscriber.complete(); + }); + }); } function isScheduler(value) { @@ -2069,10 +2727,14 @@ return typeof last(args) === 'number' ? args.pop() : defaultValue; } - var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); + var isArrayLike = function (x) { + return x && typeof x.length === 'number' && typeof x !== 'function'; + }; function isPromise(value) { - return isFunction(value === null || value === void 0 ? void 0 : value.then); + return isFunction( + value === null || value === void 0 ? void 0 : value.then + ); } function isInteropObservable(input) { @@ -2080,11 +2742,24 @@ } function isAsyncIterable(obj) { - return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); + return ( + Symbol.asyncIterator && + isFunction( + obj === null || obj === void 0 + ? void 0 + : obj[Symbol.asyncIterator] + ) + ); } function createInvalidObservableTypeError(input) { - return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); + return new TypeError( + 'You provided ' + + (input !== null && typeof input === 'object' + ? 'an invalid object' + : "'" + input + "'") + + ' where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.' + ); } function getSymbolIterator() { @@ -2096,43 +2771,58 @@ var iterator = getSymbolIterator(); function isIterable(input) { - return isFunction(input === null || input === void 0 ? void 0 : input[iterator]); + return isFunction( + input === null || input === void 0 ? void 0 : input[iterator] + ); } function readableStreamLikeToAsyncGenerator(readableStream) { - return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { - var reader, _a, value, done; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - reader = readableStream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1, , 9, 10]); - _b.label = 2; - case 2: - return [4, __await(reader.read())]; - case 3: - _a = _b.sent(), value = _a.value, done = _a.done; - if (!done) return [3, 5]; - return [4, __await(void 0)]; - case 4: return [2, _b.sent()]; - case 5: return [4, __await(value)]; - case 6: return [4, _b.sent()]; - case 7: - _b.sent(); - return [3, 2]; - case 8: return [3, 10]; - case 9: - reader.releaseLock(); - return [7]; - case 10: return [2]; - } - }); - }); + return __asyncGenerator( + this, + arguments, + function readableStreamLikeToAsyncGenerator_1() { + var reader, _a, value, done; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + reader = readableStream.getReader(); + _b.label = 1; + case 1: + _b.trys.push([1, , 9, 10]); + _b.label = 2; + case 2: + return [4, __await(reader.read())]; + case 3: + (_a = _b.sent()), + (value = _a.value), + (done = _a.done); + if (!done) return [3, 5]; + return [4, __await(void 0)]; + case 4: + return [2, _b.sent()]; + case 5: + return [4, __await(value)]; + case 6: + return [4, _b.sent()]; + case 7: + _b.sent(); + return [3, 2]; + case 8: + return [3, 10]; + case 9: + reader.releaseLock(); + return [7]; + case 10: + return [2]; + } + }); + } + ); } function isReadableStreamLike(obj) { - return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); + return isFunction( + obj === null || obj === void 0 ? void 0 : obj.getReader + ); } function innerFrom(input) { @@ -2167,7 +2857,9 @@ if (isFunction(obs.subscribe)) { return obs.subscribe(subscriber); } - throw new TypeError('Provided object does not correctly implement Symbol.observable'); + throw new TypeError( + 'Provided object does not correctly implement Symbol.observable' + ); }); } function fromArrayLike(array) { @@ -2181,12 +2873,17 @@ function fromPromise(promise) { return new Observable(function (subscriber) { promise - .then(function (value) { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, function (err) { return subscriber.error(err); }) + .then( + function (value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, + function (err) { + return subscriber.error(err); + } + ) .then(null, reportUnhandledError); }); } @@ -2194,31 +2891,46 @@ return new Observable(function (subscriber) { var e_1, _a; try { - for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { + for ( + var iterable_1 = __values(iterable), + iterable_1_1 = iterable_1.next(); + !iterable_1_1.done; + iterable_1_1 = iterable_1.next() + ) { var value = iterable_1_1.value; subscriber.next(value); if (subscriber.closed) { return; } } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { try { - if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); + if ( + iterable_1_1 && + !iterable_1_1.done && + (_a = iterable_1.return) + ) + _a.call(iterable_1); + } finally { + if (e_1) throw e_1.error; } - finally { if (e_1) throw e_1.error; } } subscriber.complete(); }); } function fromAsyncIterable(asyncIterable) { return new Observable(function (subscriber) { - process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); }); + process(asyncIterable, subscriber).catch(function (err) { + return subscriber.error(err); + }); }); } function fromReadableStreamLike(readableStream) { - return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); + return fromAsyncIterable( + readableStreamLikeToAsyncGenerator(readableStream) + ); } function process(asyncIterable, subscriber) { var asyncIterable_1, asyncIterable_1_1; @@ -2231,33 +2943,49 @@ _b.trys.push([0, 5, 6, 11]); asyncIterable_1 = __asyncValues(asyncIterable); _b.label = 1; - case 1: return [4, asyncIterable_1.next()]; + case 1: + return [4, asyncIterable_1.next()]; case 2: - if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; + if ( + !((asyncIterable_1_1 = _b.sent()), + !asyncIterable_1_1.done) + ) + return [3, 4]; value = asyncIterable_1_1.value; subscriber.next(value); if (subscriber.closed) { return [2]; } _b.label = 3; - case 3: return [3, 1]; - case 4: return [3, 11]; + case 3: + return [3, 1]; + case 4: + return [3, 11]; case 5: e_2_1 = _b.sent(); e_2 = { error: e_2_1 }; return [3, 11]; case 6: _b.trys.push([6, , 9, 10]); - if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; + if ( + !( + asyncIterable_1_1 && + !asyncIterable_1_1.done && + (_a = asyncIterable_1.return) + ) + ) + return [3, 8]; return [4, _a.call(asyncIterable_1)]; case 7: _b.sent(); _b.label = 8; - case 8: return [3, 10]; + case 8: + return [3, 10]; case 9: if (e_2) throw e_2.error; return [7]; - case 10: return [7]; + case 10: + return [7]; case 11: subscriber.complete(); return [2]; @@ -2266,15 +2994,24 @@ }); } - function executeSchedule(parentSubscription, scheduler, work, delay, repeat) { - if (delay === void 0) { delay = 0; } - if (repeat === void 0) { repeat = false; } + function executeSchedule( + parentSubscription, + scheduler, + work, + delay, + repeat + ) { + if (delay === void 0) { + delay = 0; + } + if (repeat === void 0) { + repeat = false; + } var scheduleSubscription = scheduler.schedule(function () { work(); if (repeat) { parentSubscription.add(this.schedule(null, delay)); - } - else { + } else { this.unsubscribe(); } }, delay); @@ -2285,25 +3022,73 @@ } function observeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } + if (delay === void 0) { + delay = 0; + } return operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + return executeSchedule( + subscriber, + scheduler, + function () { + return subscriber.next(value); + }, + delay + ); + }, + function () { + return executeSchedule( + subscriber, + scheduler, + function () { + return subscriber.complete(); + }, + delay + ); + }, + function (err) { + return executeSchedule( + subscriber, + scheduler, + function () { + return subscriber.error(err); + }, + delay + ); + } + ) + ); }); } function subscribeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } + if (delay === void 0) { + delay = 0; + } return operate(function (source, subscriber) { - subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay)); + subscriber.add( + scheduler.schedule(function () { + return source.subscribe(subscriber); + }, delay) + ); }); } function scheduleObservable(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); + return innerFrom(input).pipe( + subscribeOn(scheduler), + observeOn(scheduler) + ); } function schedulePromise(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); + return innerFrom(input).pipe( + subscribeOn(scheduler), + observeOn(scheduler) + ); } function scheduleArray(input, scheduler) { @@ -2312,8 +3097,7 @@ return scheduler.schedule(function () { if (i === input.length) { subscriber.complete(); - } - else { + } else { subscriber.next(input[i++]); if (!subscriber.closed) { this.schedule(); @@ -2328,52 +3112,74 @@ var iterator$$1; executeSchedule(subscriber, scheduler, function () { iterator$$1 = input[iterator](); - executeSchedule(subscriber, scheduler, function () { - var _a; - var value; - var done; - try { - (_a = iterator$$1.next(), value = _a.value, done = _a.done); - } - catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } - else { - subscriber.next(value); - } - }, 0, true); - }); - return function () { return isFunction(iterator$$1 === null || iterator$$1 === void 0 ? void 0 : iterator$$1.return) && iterator$$1.return(); }; - }); - } - - function scheduleAsyncIterable(input, scheduler) { - if (!input) { - throw new Error('Iterable cannot be null'); - } + executeSchedule( + subscriber, + scheduler, + function () { + var _a; + var value; + var done; + try { + (_a = iterator$$1.next()), + (value = _a.value), + (done = _a.done); + } catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } else { + subscriber.next(value); + } + }, + 0, + true + ); + }); + return function () { + return ( + isFunction( + iterator$$1 === null || iterator$$1 === void 0 + ? void 0 + : iterator$$1.return + ) && iterator$$1.return() + ); + }; + }); + } + + function scheduleAsyncIterable(input, scheduler) { + if (!input) { + throw new Error('Iterable cannot be null'); + } return new Observable(function (subscriber) { executeSchedule(subscriber, scheduler, function () { var iterator = input[Symbol.asyncIterator](); - executeSchedule(subscriber, scheduler, function () { - iterator.next().then(function (result) { - if (result.done) { - subscriber.complete(); - } - else { - subscriber.next(result.value); - } - }); - }, 0, true); + executeSchedule( + subscriber, + scheduler, + function () { + iterator.next().then(function (result) { + if (result.done) { + subscriber.complete(); + } else { + subscriber.next(result.value); + } + }); + }, + 0, + true + ); }); }); } function scheduleReadableStreamLike(input, scheduler) { - return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); + return scheduleAsyncIterable( + readableStreamLikeToAsyncGenerator(input), + scheduler + ); } function scheduled(input, scheduler) { @@ -2414,15 +3220,27 @@ } function throwError(errorOrErrorFactory, scheduler) { - var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; }; - var init = function (subscriber) { return subscriber.error(errorFactory()); }; - return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init); + var errorFactory = isFunction(errorOrErrorFactory) + ? errorOrErrorFactory + : function () { + return errorOrErrorFactory; + }; + var init = function (subscriber) { + return subscriber.error(errorFactory()); + }; + return new Observable( + scheduler + ? function (subscriber) { + return scheduler.schedule(init, 0, subscriber); + } + : init + ); } (function (NotificationKind) { - NotificationKind["NEXT"] = "N"; - NotificationKind["ERROR"] = "E"; - NotificationKind["COMPLETE"] = "C"; + NotificationKind['NEXT'] = 'N'; + NotificationKind['ERROR'] = 'E'; + NotificationKind['COMPLETE'] = 'C'; })(exports.NotificationKind || (exports.NotificationKind = {})); var Notification = (function () { function Notification(kind, value, error) { @@ -2434,33 +3252,58 @@ Notification.prototype.observe = function (observer) { return observeNotification(this, observer); }; - Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); - }; - Notification.prototype.accept = function (nextOrObserver, error, complete) { + Notification.prototype.do = function ( + nextHandler, + errorHandler, + completeHandler + ) { + var _a = this, + kind = _a.kind, + value = _a.value, + error = _a.error; + return kind === 'N' + ? nextHandler === null || nextHandler === void 0 + ? void 0 + : nextHandler(value) + : kind === 'E' + ? errorHandler === null || errorHandler === void 0 + ? void 0 + : errorHandler(error) + : completeHandler === null || completeHandler === void 0 + ? void 0 + : completeHandler(); + }; + Notification.prototype.accept = function ( + nextOrObserver, + error, + complete + ) { var _a; - return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) + return isFunction( + (_a = nextOrObserver) === null || _a === void 0 + ? void 0 + : _a.next + ) ? this.observe(nextOrObserver) : this.do(nextOrObserver, error, complete); }; Notification.prototype.toObservable = function () { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - var result = kind === 'N' - ? - of(value) - : - kind === 'E' - ? - throwError(function () { return error; }) - : - kind === 'C' - ? - EMPTY - : - 0; + var _a = this, + kind = _a.kind, + value = _a.value, + error = _a.error; + var result = + kind === 'N' + ? of(value) + : kind === 'E' + ? throwError(function () { + return error; + }) + : kind === 'C' + ? EMPTY + : 0; if (!result) { - throw new TypeError("Unexpected notification kind " + kind); + throw new TypeError('Unexpected notification kind ' + kind); } return result; }; @@ -2475,25 +3318,44 @@ }; Notification.completeNotification = new Notification('C'); return Notification; - }()); + })(); function observeNotification(notification, observer) { var _a, _b, _c; - var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; + var _d = notification, + kind = _d.kind, + value = _d.value, + error = _d.error; if (typeof kind !== 'string') { throw new TypeError('Invalid notification, missing "kind"'); } - kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); + kind === 'N' + ? (_a = observer.next) === null || _a === void 0 + ? void 0 + : _a.call(observer, value) + : kind === 'E' + ? (_b = observer.error) === null || _b === void 0 + ? void 0 + : _b.call(observer, error) + : (_c = observer.complete) === null || _c === void 0 + ? void 0 + : _c.call(observer); } function isObservable(obj) { - return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe))); + return ( + !!obj && + (obj instanceof Observable || + (isFunction(obj.lift) && isFunction(obj.subscribe))) + ); } - var EmptyError = createErrorClass(function (_super) { return function EmptyErrorImpl() { - _super(this); - this.name = 'EmptyError'; - this.message = 'no elements in sequence'; - }; }); + var EmptyError = createErrorClass(function (_super) { + return function EmptyErrorImpl() { + _super(this); + this.name = 'EmptyError'; + this.message = 'no elements in sequence'; + }; + }); function lastValueFrom(source, config) { var hasConfig = typeof config === 'object'; @@ -2509,14 +3371,12 @@ complete: function () { if (_hasValue) { resolve(_value); - } - else if (hasConfig) { + } else if (hasConfig) { resolve(config.defaultValue); - } - else { + } else { reject(new EmptyError()); } - }, + } }); }); } @@ -2533,11 +3393,10 @@ complete: function () { if (hasConfig) { resolve(config.defaultValue); - } - else { + } else { reject(new EmptyError()); } - }, + } }); source.subscribe(subscriber); }); @@ -2573,7 +3432,9 @@ var TimeoutError = createErrorClass(function (_super) { return function TimeoutErrorImpl(info) { - if (info === void 0) { info = null; } + if (info === void 0) { + info = null; + } _super(this); this.message = 'Timeout has occurred'; this.name = 'TimeoutError'; @@ -2581,11 +3442,24 @@ }; }); function timeout(config, schedulerArg) { - var _a = (isValidDate(config) - ? { first: config } - : typeof config === 'number' + var _a = isValidDate(config) + ? { first: config } + : typeof config === 'number' ? { each: config } - : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; + : config, + first = _a.first, + each = _a.each, + _b = _a.with, + _with = _b === void 0 ? timeoutErrorFactory : _b, + _c = _a.scheduler, + scheduler = + _c === void 0 + ? schedulerArg !== null && schedulerArg !== void 0 + ? schedulerArg + : asyncScheduler + : _c, + _d = _a.meta, + meta = _d === void 0 ? null : _d; if (first == null && each == null) { throw new TypeError('No timeout provided.'); } @@ -2595,32 +3469,63 @@ var lastValue = null; var seen = 0; var startTimer = function (delay) { - timerSubscription = executeSchedule(subscriber, scheduler, function () { - try { - originalSourceSubscription.unsubscribe(); - innerFrom(_with({ - meta: meta, - lastValue: lastValue, - seen: seen, - })).subscribe(subscriber); - } - catch (err) { - subscriber.error(err); - } - }, delay); + timerSubscription = executeSchedule( + subscriber, + scheduler, + function () { + try { + originalSourceSubscription.unsubscribe(); + innerFrom( + _with({ + meta: meta, + lastValue: lastValue, + seen: seen + }) + ).subscribe(subscriber); + } catch (err) { + subscriber.error(err); + } + }, + delay + ); }; - originalSourceSubscription = source.subscribe(new OperatorSubscriber(subscriber, function (value) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next((lastValue = value)); - each > 0 && startTimer(each); - }, undefined, undefined, function () { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); + originalSourceSubscription = source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + timerSubscription === null || + timerSubscription === void 0 + ? void 0 + : timerSubscription.unsubscribe(); + seen++; + subscriber.next((lastValue = value)); + each > 0 && startTimer(each); + }, + undefined, + undefined, + function () { + if ( + !(timerSubscription === null || + timerSubscription === void 0 + ? void 0 + : timerSubscription.closed) + ) { + timerSubscription === null || + timerSubscription === void 0 + ? void 0 + : timerSubscription.unsubscribe(); + } + lastValue = null; + } + ) + ); + startTimer( + first != null + ? typeof first === 'number' + ? first + : +first - scheduler.now() + : each + ); }); } function timeoutErrorFactory(info) { @@ -2630,32 +3535,46 @@ function map(project, thisArg) { return operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - subscriber.next(project.call(thisArg, value, index++)); - })); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + subscriber.next(project.call(thisArg, value, index++)); + }) + ); }); } var isArray = Array.isArray; function callOrApply(fn, args) { - return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args); + return isArray(args) + ? fn.apply(void 0, __spreadArray([], __read(args))) + : fn(args); } function mapOneOrManyArgs(fn) { - return map(function (args) { return callOrApply(fn, args); }); + return map(function (args) { + return callOrApply(fn, args); + }); } - function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { + function bindCallbackInternals( + isNodeStyle, + callbackFunc, + resultSelector, + scheduler + ) { if (resultSelector) { if (isScheduler(resultSelector)) { scheduler = resultSelector; - } - else { + } else { return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } - return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) + return bindCallbackInternals( + isNodeStyle, + callbackFunc, + scheduler + ) .apply(this, args) .pipe(mapOneOrManyArgs(resultSelector)); }; @@ -2686,26 +3605,31 @@ uninitialized = false; var isAsync_1 = false; var isComplete_1 = false; - callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [ - function () { - var results = []; - for (var _i = 0; _i < arguments.length; _i++) { - results[_i] = arguments[_i]; - } - if (isNodeStyle) { - var err = results.shift(); - if (err != null) { - subject.error(err); - return; + callbackFunc.apply( + _this, + __spreadArray(__spreadArray([], __read(args)), [ + function () { + var results = []; + for (var _i = 0; _i < arguments.length; _i++) { + results[_i] = arguments[_i]; + } + if (isNodeStyle) { + var err = results.shift(); + if (err != null) { + subject.error(err); + return; + } + } + subject.next( + 1 < results.length ? results : results[0] + ); + isComplete_1 = true; + if (isAsync_1) { + subject.complete(); } } - subject.next(1 < results.length ? results : results[0]); - isComplete_1 = true; - if (isAsync_1) { - subject.complete(); - } - }, - ])); + ]) + ); if (isComplete_1) { subject.complete(); } @@ -2717,15 +3641,27 @@ } function bindCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); + return bindCallbackInternals( + false, + callbackFunc, + resultSelector, + scheduler + ); } function bindNodeCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); + return bindCallbackInternals( + true, + callbackFunc, + resultSelector, + scheduler + ); } var isArray$1 = Array.isArray; - var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys; + var getPrototypeOf = Object.getPrototypeOf, + objectProto = Object.prototype, + getKeys = Object.keys; function argsArgArrayOrObject(args) { if (args.length === 1) { var first_1 = args[0]; @@ -2735,19 +3671,27 @@ if (isPOJO(first_1)) { var keys = getKeys(first_1); return { - args: keys.map(function (key) { return first_1[key]; }), - keys: keys, + args: keys.map(function (key) { + return first_1[key]; + }), + keys: keys }; } } return { args: args, keys: null }; } function isPOJO(obj) { - return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; + return ( + obj && + typeof obj === 'object' && + getPrototypeOf(obj) === objectProto + ); } function createObject(keys, values) { - return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {}); + return keys.reduce(function (result, key, i) { + return (result[key] = values[i]), result; + }, {}); } function combineLatest() { @@ -2757,61 +3701,99 @@ } var scheduler = popScheduler(args); var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; + var _a = argsArgArrayOrObject(args), + observables = _a.args, + keys = _a.keys; if (observables.length === 0) { return from([], scheduler); } - var result = new Observable(combineLatestInit(observables, scheduler, keys - ? - function (values) { return createObject(keys, values); } - : - identity)); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; + var result = new Observable( + combineLatestInit( + observables, + scheduler, + keys + ? function (values) { + return createObject(keys, values); + } + : identity + ) + ); + return resultSelector + ? result.pipe(mapOneOrManyArgs(resultSelector)) + : result; } function combineLatestInit(observables, scheduler, valueTransform) { - if (valueTransform === void 0) { valueTransform = identity; } + if (valueTransform === void 0) { + valueTransform = identity; + } return function (subscriber) { - maybeSchedule(scheduler, function () { - var length = observables.length; - var values = new Array(length); - var active = length; - var remainingFirstValues = length; - var _loop_1 = function (i) { - maybeSchedule(scheduler, function () { - var source = from(observables[i], scheduler); - var hasFirstValue = false; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - values[i] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, function () { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - }; - for (var i = 0; i < length; i++) { - _loop_1(i); - } - }, subscriber); + maybeSchedule( + scheduler, + function () { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function (i) { + maybeSchedule( + scheduler, + function () { + var source = from(observables[i], scheduler); + var hasFirstValue = false; + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + values[i] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next( + valueTransform( + values.slice() + ) + ); + } + }, + function () { + if (!--active) { + subscriber.complete(); + } + } + ) + ); + }, + subscriber + ); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, + subscriber + ); }; } function maybeSchedule(scheduler, execute, subscription) { if (scheduler) { executeSchedule(subscription, scheduler, execute); - } - else { + } else { execute(); } } - function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalTeardown) { + function mergeInternals( + source, + subscriber, + project, + concurrent, + onBeforeNext, + expand, + innerSubScheduler, + additionalTeardown + ) { var buffer = []; var active = 0; var index = 0; @@ -2821,67 +3803,97 @@ subscriber.complete(); } }; - var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; + var outerNext = function (value) { + return active < concurrent ? doInnerSub(value) : buffer.push(value); + }; var doInnerSub = function (value) { expand && subscriber.next(value); active++; var innerComplete = false; - innerFrom(project(value, index++)).subscribe(new OperatorSubscriber(subscriber, function (innerValue) { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } - else { - subscriber.next(innerValue); - } - }, function () { - innerComplete = true; - }, undefined, function () { - if (innerComplete) { - try { - active--; - var _loop_1 = function () { - var bufferedValue = buffer.shift(); - if (innerSubScheduler) { - executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); - } - else { - doInnerSub(bufferedValue); + innerFrom(project(value, index++)).subscribe( + createOperatorSubscriber( + subscriber, + function (innerValue) { + onBeforeNext === null || onBeforeNext === void 0 + ? void 0 + : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } else { + subscriber.next(innerValue); + } + }, + function () { + innerComplete = true; + }, + undefined, + function () { + if (innerComplete) { + try { + active--; + var _loop_1 = function () { + var bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule( + subscriber, + innerSubScheduler, + function () { + return doInnerSub( + bufferedValue + ); + } + ); + } else { + doInnerSub(bufferedValue); + } + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } catch (err) { + subscriber.error(err); } - }; - while (buffer.length && active < concurrent) { - _loop_1(); } - checkComplete(); - } - catch (err) { - subscriber.error(err); } - } - })); + ) + ); }; - source.subscribe(new OperatorSubscriber(subscriber, outerNext, function () { - isComplete = true; - checkComplete(); - })); + source.subscribe( + createOperatorSubscriber(subscriber, outerNext, function () { + isComplete = true; + checkComplete(); + }) + ); return function () { - additionalTeardown === null || additionalTeardown === void 0 ? void 0 : additionalTeardown(); + additionalTeardown === null || additionalTeardown === void 0 + ? void 0 + : additionalTeardown(); }; } function mergeMap(project, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - if (isFunction(resultSelector)) { - return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent); + if (concurrent === void 0) { + concurrent = Infinity; } - else if (typeof resultSelector === 'number') { + if (isFunction(resultSelector)) { + return mergeMap(function (a, i) { + return map(function (b, ii) { + return resultSelector(a, b, i, ii); + })(innerFrom(project(a, i))); + }, concurrent); + } else if (typeof resultSelector === 'number') { concurrent = resultSelector; } - return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); }); + return operate(function (source, subscriber) { + return mergeInternals(source, subscriber, project, concurrent); + }); } function mergeAll(concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } + if (concurrent === void 0) { + concurrent = Infinity; + } return mergeMap(identity, concurrent); } @@ -2904,22 +3916,32 @@ } var DEFAULT_CONFIG = { - connector: function () { return new Subject(); }, - resetOnDisconnect: true, + connector: function () { + return new Subject(); + }, + resetOnDisconnect: true }; function connectable(source, config) { - if (config === void 0) { config = DEFAULT_CONFIG; } + if (config === void 0) { + config = DEFAULT_CONFIG; + } var connection = null; - var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; + var connector = config.connector, + _a = config.resetOnDisconnect, + resetOnDisconnect = _a === void 0 ? true : _a; var subject = connector(); var result = new Observable(function (subscriber) { return subject.subscribe(subscriber); }); result.connect = function () { if (!connection || connection.closed) { - connection = defer(function () { return source; }).subscribe(subject); + connection = defer(function () { + return source; + }).subscribe(subject); if (resetOnDisconnect) { - connection.add(function () { return (subject = connector()); }); + connection.add(function () { + return (subject = connector()); + }); } } return connection; @@ -2933,7 +3955,9 @@ args[_i] = arguments[_i]; } var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; + var _a = argsArgArrayOrObject(args), + sources = _a.args, + keys = _a.keys; var result = new Observable(function (subscriber) { var length = sources.length; if (!length) { @@ -2945,26 +3969,42 @@ var remainingEmissions = length; var _loop_1 = function (sourceIndex) { var hasValue = false; - innerFrom(sources[sourceIndex]).subscribe(new OperatorSubscriber(subscriber, function (value) { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, function () { return remainingCompletions--; }, undefined, function () { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject(keys, values) : values); + innerFrom(sources[sourceIndex]).subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, + function () { + return remainingCompletions--; + }, + undefined, + function () { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next( + keys + ? createObject(keys, values) + : values + ); + } + subscriber.complete(); + } } - subscriber.complete(); - } - })); + ) + ); }; for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { _loop_1(sourceIndex); } }); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; + return resultSelector + ? result.pipe(mapOneOrManyArgs(resultSelector)) + : result; } var nodeEventEmitterMethods = ['addListener', 'removeListener']; @@ -2976,19 +4016,39 @@ options = undefined; } if (resultSelector) { - return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); + return fromEvent(target, eventName, options).pipe( + mapOneOrManyArgs(resultSelector) + ); } - var _a = __read(isEventTarget(target) - ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; }) - : - isNodeStyleEventEmitter(target) - ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) + var _a = __read( + isEventTarget(target) + ? eventTargetMethods.map(function (methodName) { + return function (handler) { + return target[methodName]( + eventName, + handler, + options + ); + }; + }) + : isNodeStyleEventEmitter(target) + ? nodeEventEmitterMethods.map( + toCommonHandlerRegistry(target, eventName) + ) : isJQueryStyleEventEmitter(target) - ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) - : [], 2), add = _a[0], remove = _a[1]; + ? jqueryMethods.map( + toCommonHandlerRegistry(target, eventName) + ) + : [], + 2 + ), + add = _a[0], + remove = _a[1]; if (!add) { if (isArrayLike(target)) { - return mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom(target)); + return mergeMap(function (subTarget) { + return fromEvent(subTarget, eventName, options); + })(innerFrom(target)); } } if (!add) { @@ -3003,25 +4063,38 @@ return subscriber.next(1 < args.length ? args : args[0]); }; add(handler); - return function () { return remove(handler); }; + return function () { + return remove(handler); + }; }); } function toCommonHandlerRegistry(target, eventName) { - return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; }; + return function (methodName) { + return function (handler) { + return target[methodName](eventName, handler); + }; + }; } function isNodeStyleEventEmitter(target) { - return isFunction(target.addListener) && isFunction(target.removeListener); + return ( + isFunction(target.addListener) && isFunction(target.removeListener) + ); } function isJQueryStyleEventEmitter(target) { return isFunction(target.on) && isFunction(target.off); } function isEventTarget(target) { - return isFunction(target.addEventListener) && isFunction(target.removeEventListener); + return ( + isFunction(target.addEventListener) && + isFunction(target.removeEventListener) + ); } function fromEventPattern(addHandler, removeHandler, resultSelector) { if (resultSelector) { - return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); + return fromEventPattern(addHandler, removeHandler).pipe( + mapOneOrManyArgs(resultSelector) + ); } return new Observable(function (subscriber) { var handler = function () { @@ -3032,24 +4105,41 @@ return subscriber.next(e.length === 1 ? e[0] : e); }; var retValue = addHandler(handler); - return isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined; + return isFunction(removeHandler) + ? function () { + return removeHandler(handler, retValue); + } + : undefined; }); } - function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { + function generate( + initialStateOrOptions, + condition, + iterate, + resultSelectorOrScheduler, + scheduler + ) { var _a, _b; var resultSelector; var initialState; if (arguments.length === 1) { - (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler); - } - else { + (_a = initialStateOrOptions), + (initialState = _a.initialState), + (condition = _a.condition), + (iterate = _a.iterate), + (_b = _a.resultSelector), + (resultSelector = _b === void 0 ? identity : _b), + (scheduler = _a.scheduler); + } else { initialState = initialStateOrOptions; - if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { + if ( + !resultSelectorOrScheduler || + isScheduler(resultSelectorOrScheduler) + ) { resultSelector = identity; scheduler = resultSelectorOrScheduler; - } - else { + } else { resultSelector = resultSelectorOrScheduler; } } @@ -3069,35 +4159,45 @@ case 3: state = iterate(state); return [3, 1]; - case 4: return [2]; + case 4: + return [2]; } }); } - return defer((scheduler - ? - function () { return scheduleIterable(gen(), scheduler); } - : - gen)); + return defer( + scheduler + ? function () { + return scheduleIterable(gen(), scheduler); + } + : gen + ); } function iif(condition, trueResult, falseResult) { - return defer(function () { return (condition() ? trueResult : falseResult); }); + return defer(function () { + return condition() ? trueResult : falseResult; + }); } function timer(dueTime, intervalOrScheduler, scheduler) { - if (dueTime === void 0) { dueTime = 0; } - if (scheduler === void 0) { scheduler = async; } + if (dueTime === void 0) { + dueTime = 0; + } + if (scheduler === void 0) { + scheduler = async; + } var intervalDuration = -1; if (intervalOrScheduler != null) { if (isScheduler(intervalOrScheduler)) { scheduler = intervalOrScheduler; - } - else { + } else { intervalDuration = intervalOrScheduler; } } return new Observable(function (subscriber) { - var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; + var due = isValidDate(dueTime) + ? +dueTime - scheduler.now() + : dueTime; if (due < 0) { due = 0; } @@ -3107,8 +4207,7 @@ subscriber.next(n++); if (0 <= intervalDuration) { this.schedule(undefined, intervalDuration); - } - else { + } else { subscriber.complete(); } } @@ -3117,8 +4216,12 @@ } function interval(period, scheduler) { - if (period === void 0) { period = 0; } - if (scheduler === void 0) { scheduler = asyncScheduler; } + if (period === void 0) { + period = 0; + } + if (scheduler === void 0) { + scheduler = asyncScheduler; + } if (period < 0) { period = 0; } @@ -3134,13 +4237,10 @@ var concurrent = popNumber(args, Infinity); var sources = args; return !sources.length - ? - EMPTY + ? EMPTY : sources.length === 1 - ? - innerFrom(sources[0]) - : - mergeAll(concurrent)(from(sources, scheduler)); + ? innerFrom(sources[0]) + : mergeAll(concurrent)(from(sources, scheduler)); } var NEVER = new Observable(noop); @@ -3167,16 +4267,19 @@ var nextSource = void 0; try { nextSource = innerFrom(remaining.shift()); - } - catch (err) { + } catch (err) { subscribeNext(); return; } - var innerSub = new OperatorSubscriber(subscriber, undefined, noop, noop); - subscriber.add(nextSource.subscribe(innerSub)); + var innerSub = createOperatorSubscriber( + subscriber, + undefined, + noop, + noop + ); + nextSource.subscribe(innerSub); innerSub.add(subscribeNext); - } - else { + } else { subscriber.complete(); } } @@ -3198,18 +4301,30 @@ } function not(pred, thisArg) { - return function (value, index) { return !pred.call(thisArg, value, index); }; + return function (value, index) { + return !pred.call(thisArg, value, index); + }; } function filter(predicate, thisArg) { return operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + return ( + predicate.call(thisArg, value, index++) && + subscriber.next(value) + ); + }) + ); }); } function partition(source, predicate, thisArg) { - return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))]; + return [ + filter(predicate, thisArg)(innerFrom(source)), + filter(not(predicate, thisArg))(innerFrom(source)) + ]; } function race() { @@ -3218,23 +4333,33 @@ sources[_i] = arguments[_i]; } sources = argsOrArgArray(sources); - return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); + return sources.length === 1 + ? innerFrom(sources[0]) + : new Observable(raceInit(sources)); } function raceInit(sources) { return function (subscriber) { var subscriptions = []; var _loop_1 = function (i) { - subscriptions.push(innerFrom(sources[i]).subscribe(new OperatorSubscriber(subscriber, function (value) { - if (subscriptions) { - for (var s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); + subscriptions.push( + innerFrom(sources[i]).subscribe( + createOperatorSubscriber(subscriber, function (value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }) + ) + ); }; - for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + for ( + var i = 0; + subscriptions && !subscriber.closed && i < sources.length; + i++ + ) { _loop_1(i); } }; @@ -3249,28 +4374,27 @@ return EMPTY; } var end = count + start; - return new Observable(scheduler - ? - function (subscriber) { - var n = start; - return scheduler.schedule(function () { - if (n < end) { - subscriber.next(n++); - this.schedule(); - } - else { - subscriber.complete(); - } - }); - } - : - function (subscriber) { - var n = start; - while (n < end && !subscriber.closed) { - subscriber.next(n++); - } - subscriber.complete(); - }); + return new Observable( + scheduler + ? function (subscriber) { + var n = start; + return scheduler.schedule(function () { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } else { + subscriber.complete(); + } + }); + } + : function (subscriber) { + var n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + } + ); } function using(resourceFactory, observableFactory) { @@ -3296,33 +4420,72 @@ var sources = argsOrArgArray(args); return sources.length ? new Observable(function (subscriber) { - var buffers = sources.map(function () { return []; }); - var completed = sources.map(function () { return false; }); - subscriber.add(function () { - buffers = completed = null; - }); - var _loop_1 = function (sourceIndex) { - innerFrom(sources[sourceIndex]).subscribe(new OperatorSubscriber(subscriber, function (value) { - buffers[sourceIndex].push(value); - if (buffers.every(function (buffer) { return buffer.length; })) { - var result = buffers.map(function (buffer) { return buffer.shift(); }); - subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); - if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { - subscriber.complete(); - } - } - }, function () { - completed[sourceIndex] = true; - !buffers[sourceIndex].length && subscriber.complete(); - })); - }; - for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - _loop_1(sourceIndex); - } - return function () { - buffers = completed = null; - }; - }) + var buffers = sources.map(function () { + return []; + }); + var completed = sources.map(function () { + return false; + }); + subscriber.add(function () { + buffers = completed = null; + }); + var _loop_1 = function (sourceIndex) { + innerFrom(sources[sourceIndex]).subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + buffers[sourceIndex].push(value); + if ( + buffers.every(function (buffer) { + return buffer.length; + }) + ) { + var result = buffers.map(function ( + buffer + ) { + return buffer.shift(); + }); + subscriber.next( + resultSelector + ? resultSelector.apply( + void 0, + __spreadArray( + [], + __read(result) + ) + ) + : result + ); + if ( + buffers.some(function (buffer, i) { + return ( + !buffer.length && completed[i] + ); + }) + ) { + subscriber.complete(); + } + } + }, + function () { + completed[sourceIndex] = true; + !buffers[sourceIndex].length && + subscriber.complete(); + } + ) + ); + }; + for ( + var sourceIndex = 0; + !subscriber.closed && sourceIndex < sources.length; + sourceIndex++ + ) { + _loop_1(sourceIndex); + } + return function () { + buffers = completed = null; + }; + }) : EMPTY; } @@ -3333,7 +4496,9 @@ var durationSubscriber = null; var isComplete = false; var endDuration = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); durationSubscriber = null; if (hasValue) { hasValue = false; @@ -3347,36 +4512,69 @@ durationSubscriber = null; isComplete && subscriber.complete(); }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom(durationSelector(value)).subscribe((durationSubscriber = new OperatorSubscriber(subscriber, endDuration, cleanupDuration))); - } - }, function () { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom(durationSelector(value)).subscribe( + (durationSubscriber = createOperatorSubscriber( + subscriber, + endDuration, + cleanupDuration + )) + ); + } + }, + function () { + isComplete = true; + (!hasValue || + !durationSubscriber || + durationSubscriber.closed) && + subscriber.complete(); + } + ) + ); }); } function auditTime(duration, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return audit(function () { return timer(duration, scheduler); }); + if (scheduler === void 0) { + scheduler = asyncScheduler; + } + return audit(function () { + return timer(duration, scheduler); + }); } function buffer(closingNotifier) { return operate(function (source, subscriber) { var currentBuffer = []; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - closingNotifier.subscribe(new OperatorSubscriber(subscriber, function () { - var b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, noop)); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + return currentBuffer.push(value); + }, + function () { + subscriber.next(currentBuffer); + subscriber.complete(); + } + ) + ); + closingNotifier.subscribe( + createOperatorSubscriber( + subscriber, + function () { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, + noop + ) + ); return function () { currentBuffer = null; }; @@ -3384,69 +4582,118 @@ } function bufferCount(bufferSize, startBufferEvery) { - if (startBufferEvery === void 0) { startBufferEvery = null; } - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + if (startBufferEvery === void 0) { + startBufferEvery = null; + } + startBufferEvery = + startBufferEvery !== null && startBufferEvery !== void 0 + ? startBufferEvery + : bufferSize; return operate(function (source, subscriber) { var buffers = []; var count = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var e_1, _a, e_2, _b; - var toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + var e_1, _a, e_2, _b; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - if (toEmit) { - try { - for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { - var buffer = toEmit_1_1.value; - arrRemove(buffers, buffer); - subscriber.next(buffer); + try { + for ( + var buffers_1 = __values(buffers), + buffers_1_1 = buffers_1.next(); + !buffers_1_1.done; + buffers_1_1 = buffers_1.next() + ) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = + toEmit !== null && toEmit !== void 0 + ? toEmit + : []; + toEmit.push(buffer); + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + buffers_1_1 && + !buffers_1_1.done && + (_a = buffers_1.return) + ) + _a.call(buffers_1); + } finally { + if (e_1) throw e_1.error; + } } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { + if (toEmit) { + try { + for ( + var toEmit_1 = __values(toEmit), + toEmit_1_1 = toEmit_1.next(); + !toEmit_1_1.done; + toEmit_1_1 = toEmit_1.next() + ) { + var buffer = toEmit_1_1.value; + arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if ( + toEmit_1_1 && + !toEmit_1_1.done && + (_b = toEmit_1.return) + ) + _b.call(toEmit_1); + } finally { + if (e_2) throw e_2.error; + } + } + } + }, + function () { + var e_3, _a; try { - if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); + for ( + var buffers_2 = __values(buffers), + buffers_2_1 = buffers_2.next(); + !buffers_2_1.done; + buffers_2_1 = buffers_2.next() + ) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } catch (e_3_1) { + e_3 = { error: e_3_1 }; + } finally { + try { + if ( + buffers_2_1 && + !buffers_2_1.done && + (_a = buffers_2.return) + ) + _a.call(buffers_2); + } finally { + if (e_3) throw e_3.error; + } } - finally { if (e_2) throw e_2.error; } - } - } - }, function () { - var e_3, _a; - try { - for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { - var buffer = buffers_2_1.value; - subscriber.next(buffer); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); + subscriber.complete(); + }, + undefined, + function () { + buffers = null; } - finally { if (e_3) throw e_3.error; } - } - subscriber.complete(); - }, undefined, function () { - buffers = null; - })); + ) + ); }); } @@ -3456,14 +4703,19 @@ for (var _i = 1; _i < arguments.length; _i++) { otherArgs[_i - 1] = arguments[_i]; } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var scheduler = + (_a = popScheduler(otherArgs)) !== null && _a !== void 0 + ? _a + : asyncScheduler; + var bufferCreationInterval = + (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; var maxBufferSize = otherArgs[1] || Infinity; return operate(function (source, subscriber) { var bufferRecords = []; var restartOnEmit = false; var emit = function (record) { - var buffer = record.buffer, subs = record.subs; + var buffer = record.buffer, + subs = record.subs; subs.unsubscribe(); arrRemove(bufferRecords, record); subscriber.next(buffer); @@ -3476,45 +4728,86 @@ var buffer = []; var record_1 = { buffer: buffer, - subs: subs, + subs: subs }; bufferRecords.push(record_1); - executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); + executeSchedule( + subs, + scheduler, + function () { + return emit(record_1); + }, + bufferTimeSpan + ); } }; - if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } - else { + if ( + bufferCreationInterval !== null && + bufferCreationInterval >= 0 + ) { + executeSchedule( + subscriber, + scheduler, + startBuffer, + bufferCreationInterval, + true + ); + } else { restartOnEmit = true; } startBuffer(); - var bufferTimeSubscriber = new OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var recordsCopy = bufferRecords.slice(); - try { - for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { - var record = recordsCopy_1_1.value; - var buffer = record.buffer; - buffer.push(value); - maxBufferSize <= buffer.length && emit(record); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + var bufferTimeSubscriber = createOperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + var recordsCopy = bufferRecords.slice(); try { - if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); + for ( + var recordsCopy_1 = __values(recordsCopy), + recordsCopy_1_1 = recordsCopy_1.next(); + !recordsCopy_1_1.done; + recordsCopy_1_1 = recordsCopy_1.next() + ) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + recordsCopy_1_1 && + !recordsCopy_1_1.done && + (_a = recordsCopy_1.return) + ) + _a.call(recordsCopy_1); + } finally { + if (e_1) throw e_1.error; + } } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); + }, + function () { + while ( + bufferRecords === null || bufferRecords === void 0 + ? void 0 + : bufferRecords.length + ) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || + bufferTimeSubscriber === void 0 + ? void 0 + : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, + undefined, + function () { + return (bufferRecords = null); } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, undefined, function () { return (bufferRecords = null); }); + ); source.subscribe(bufferTimeSubscriber); }); } @@ -3522,38 +4815,69 @@ function bufferToggle(openings, closingSelector) { return operate(function (source, subscriber) { var buffers = []; - innerFrom(openings).subscribe(new OperatorSubscriber(subscriber, function (openValue) { - var buffer = []; - buffers.push(buffer); - var closingSubscription = new Subscription(); - var emitBuffer = function () { - arrRemove(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(new OperatorSubscriber(subscriber, emitBuffer, noop))); - }, noop)); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + innerFrom(openings).subscribe( + createOperatorSubscriber( + subscriber, + function (openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription(); + var emitBuffer = function () { + arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add( + innerFrom(closingSelector(openValue)).subscribe( + createOperatorSubscriber( + subscriber, + emitBuffer, + noop + ) + ) + ); + }, + noop + ) + ); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + try { + for ( + var buffers_1 = __values(buffers), + buffers_1_1 = buffers_1.next(); + !buffers_1_1.done; + buffers_1_1 = buffers_1.next() + ) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + buffers_1_1 && + !buffers_1_1.done && + (_a = buffers_1.return) + ) + _a.call(buffers_1); + } finally { + if (e_1) throw e_1.error; + } + } + }, + function () { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); + ) + ); }); } @@ -3562,17 +4886,39 @@ var buffer = null; var closingSubscriber = null; var openBuffer = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); var b = buffer; buffer = []; b && subscriber.next(b); - innerFrom(closingSelector()).subscribe((closingSubscriber = new OperatorSubscriber(subscriber, openBuffer, noop))); + innerFrom(closingSelector()).subscribe( + (closingSubscriber = createOperatorSubscriber( + subscriber, + openBuffer, + noop + )) + ); }; openBuffer(); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, undefined, function () { return (buffer = closingSubscriber = null); })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + return buffer === null || buffer === void 0 + ? void 0 + : buffer.push(value); + }, + function () { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, + undefined, + function () { + return (buffer = closingSubscriber = null); + } + ) + ); }); } @@ -3581,17 +4927,25 @@ var innerSub = null; var syncUnsub = false; var handledResult; - innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, undefined, function (err) { - handledResult = innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - else { - syncUnsub = true; - } - })); + innerSub = source.subscribe( + createOperatorSubscriber( + subscriber, + undefined, + undefined, + function (err) { + handledResult = innerFrom( + selector(err, catchError(selector)(source)) + ); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } else { + syncUnsub = true; + } + } + ) + ); if (syncUnsub) { innerSub.unsubscribe(); innerSub = null; @@ -3600,32 +4954,46 @@ }); } - function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { + function scanInternals( + accumulator, + seed, + hasSeed, + emitOnNext, + emitBeforeComplete + ) { return function (source, subscriber) { var hasState = hasSeed; var state = seed; var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var i = index++; - state = hasState - ? - accumulator(state, value, i) - : - ((hasState = true), value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && - (function () { - hasState && subscriber.next(state); - subscriber.complete(); - }))); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + var i = index++; + state = hasState + ? accumulator(state, value, i) + : ((hasState = true), value); + emitOnNext && subscriber.next(state); + }, + emitBeforeComplete && + function () { + hasState && subscriber.next(state); + subscriber.complete(); + } + ) + ); }; } function reduce(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); + return operate( + scanInternals(accumulator, seed, arguments.length >= 2, false, true) + ); } - var arrReducer = function (arr, value) { return (arr.push(value), arr); }; + var arrReducer = function (arr, value) { + return arr.push(value), arr; + }; function toArray() { return operate(function (source, subscriber) { reduce(arrReducer, [])(source).subscribe(subscriber); @@ -3633,7 +5001,13 @@ } function joinAllInternals(joinFn, project) { - return pipe(toArray(), mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs(project) : identity); + return pipe( + toArray(), + mergeMap(function (sources) { + return joinFn(sources); + }), + project ? mapOneOrManyArgs(project) : identity + ); } function combineLatestAll(project) { @@ -3649,10 +5023,18 @@ } var resultSelector = popResultSelector(args); return resultSelector - ? pipe(combineLatest$1.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector)) + ? pipe( + combineLatest$1.apply( + void 0, + __spreadArray([], __read(args)) + ), + mapOneOrManyArgs(resultSelector) + ) : operate(function (source, subscriber) { - combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber); - }); + combineLatestInit( + __spreadArray([source], __read(argsOrArgArray(args))) + )(subscriber); + }); } function combineLatestWith() { @@ -3660,15 +5042,26 @@ for (var _i = 0; _i < arguments.length; _i++) { otherSources[_i] = arguments[_i]; } - return combineLatest$1.apply(void 0, __spreadArray([], __read(otherSources))); + return combineLatest$1.apply( + void 0, + __spreadArray([], __read(otherSources)) + ); } function concatMap(project, resultSelector) { - return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); + return isFunction(resultSelector) + ? mergeMap(project, resultSelector, 1) + : mergeMap(project, 1); } function concatMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; }); + return isFunction(resultSelector) + ? concatMap(function () { + return innerObservable; + }, resultSelector) + : concatMap(function () { + return innerObservable; + }); } function concat$1() { @@ -3678,7 +5071,9 @@ } var scheduler = popScheduler(args); return operate(function (source, subscriber) { - concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + concatAll()( + from(__spreadArray([source], __read(args)), scheduler) + ).subscribe(subscriber); }); } @@ -3691,14 +5086,20 @@ } function fromSubscribable(subscribable) { - return new Observable(function (subscriber) { return subscribable.subscribe(subscriber); }); + return new Observable(function (subscriber) { + return subscribable.subscribe(subscriber); + }); } var DEFAULT_CONFIG$1 = { - connector: function () { return new Subject(); }, + connector: function () { + return new Subject(); + } }; function connect(selector, config) { - if (config === void 0) { config = DEFAULT_CONFIG$1; } + if (config === void 0) { + config = DEFAULT_CONFIG$1; + } var connector = config.connector; return operate(function (source, subscriber) { var subject = connector(); @@ -3708,7 +5109,9 @@ } function count(predicate) { - return reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0); + return reduce(function (total, value, i) { + return !predicate || predicate(value, i) ? total + 1 : total; + }, 0); } function debounce(durationSelector) { @@ -3717,7 +5120,9 @@ var lastValue = null; var durationSubscriber = null; var emit = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); durationSubscriber = null; if (hasValue) { hasValue = false; @@ -3726,23 +5131,42 @@ subscriber.next(value); } }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = new OperatorSubscriber(subscriber, emit, noop); - innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = durationSubscriber = null; - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + durationSubscriber === null || + durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = createOperatorSubscriber( + subscriber, + emit, + noop + ); + innerFrom(durationSelector(value)).subscribe( + durationSubscriber + ); + }, + function () { + emit(); + subscriber.complete(); + }, + undefined, + function () { + lastValue = durationSubscriber = null; + } + ) + ); }); } function debounceTime(dueTime, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } + if (scheduler === void 0) { + scheduler = asyncScheduler; + } return operate(function (source, subscriber) { var activeTask = null; var lastValue = null; @@ -3766,113 +5190,170 @@ } emit(); } - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = activeTask = null; - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule( + emitWhenIdle, + dueTime + ); + subscriber.add(activeTask); + } + }, + function () { + emit(); + subscriber.complete(); + }, + undefined, + function () { + lastValue = activeTask = null; + } + ) + ); }); } function defaultIfEmpty(defaultValue) { return operate(function (source, subscriber) { var hasValue = false; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + subscriber.next(value); + }, + function () { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + } + ) + ); }); } function take(count) { return count <= 0 - ? - function () { return EMPTY; } + ? function () { + return EMPTY; + } : operate(function (source, subscriber) { - var seen = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); + var seen = 0; + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + }) + ); + }); } function ignoreElements() { return operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber(subscriber, noop)); + source.subscribe(createOperatorSubscriber(subscriber, noop)); }); } function mapTo(value) { - return map(function () { return value; }); + return map(function () { + return value; + }); } function delayWhen(delayDurationSelector, subscriptionDelay) { if (subscriptionDelay) { return function (source) { - return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + return concat( + subscriptionDelay.pipe(take(1), ignoreElements()), + source.pipe(delayWhen(delayDurationSelector)) + ); }; } - return mergeMap(function (value, index) { return delayDurationSelector(value, index).pipe(take(1), mapTo(value)); }); + return mergeMap(function (value, index) { + return delayDurationSelector(value, index).pipe( + take(1), + mapTo(value) + ); + }); } function delay(due, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } + if (scheduler === void 0) { + scheduler = asyncScheduler; + } var duration = timer(due, scheduler); - return delayWhen(function () { return duration; }); + return delayWhen(function () { + return duration; + }); } function dematerialize() { return operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber(subscriber, function (notification) { return observeNotification(notification, subscriber); })); + source.subscribe( + createOperatorSubscriber(subscriber, function (notification) { + return observeNotification(notification, subscriber); + }) + ); }); } function distinct(keySelector, flushes) { return operate(function (source, subscriber) { var distinctKeys = new Set(); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes === null || flushes === void 0 ? void 0 : flushes.subscribe(new OperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop)); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + }) + ); + flushes === null || flushes === void 0 + ? void 0 + : flushes.subscribe( + createOperatorSubscriber( + subscriber, + function () { + return distinctKeys.clear(); + }, + noop + ) + ); }); } function distinctUntilChanged(comparator, keySelector) { - if (keySelector === void 0) { keySelector = identity; } - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + if (keySelector === void 0) { + keySelector = identity; + } + comparator = + comparator !== null && comparator !== void 0 + ? comparator + : defaultCompare; return operate(function (source, subscriber) { var previousKey; var first = true; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var currentKey = keySelector(value); - if (first || !comparator(previousKey, currentKey)) { - first = false; - previousKey = currentKey; - subscriber.next(value); - } - })); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + }) + ); }); } function defaultCompare(a, b) { @@ -3880,17 +5361,31 @@ } function distinctUntilKeyChanged(key, compare) { - return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; }); + return distinctUntilChanged(function (x, y) { + return compare ? compare(x[key], y[key]) : x[key] === y[key]; + }); } function throwIfEmpty(errorFactory) { - if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } + if (errorFactory === void 0) { + errorFactory = defaultErrorFactory; + } return operate(function (source, subscriber) { var hasValue = false; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + subscriber.next(value); + }, + function () { + return hasValue + ? subscriber.complete() + : subscriber.error(errorFactory()); + } + ) + ); }); } function defaultErrorFactory() { @@ -3903,7 +5398,17 @@ } var hasDefaultValue = arguments.length >= 2; return function (source) { - return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); })); + return source.pipe( + filter(function (v, i) { + return i === index; + }), + take(1), + hasDefaultValue + ? defaultIfEmpty(defaultValue) + : throwIfEmpty(function () { + return new ArgumentOutOfRangeError(); + }) + ); }; } @@ -3912,21 +5417,32 @@ for (var _i = 0; _i < arguments.length; _i++) { values[_i] = arguments[_i]; } - return function (source) { return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); }; + return function (source) { + return concat( + source, + of.apply(void 0, __spreadArray([], __read(values))) + ); + }; } function every(predicate, thisArg) { return operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, function () { - subscriber.next(true); - subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, + function () { + subscriber.next(true); + subscriber.complete(); + } + ) + ); }); } @@ -3934,17 +5450,29 @@ return operate(function (source, subscriber) { var isComplete = false; var innerSub = null; - source.subscribe(new OperatorSubscriber(subscriber, function (inner) { - if (!innerSub) { - innerSub = innerFrom(inner).subscribe(new OperatorSubscriber(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - })); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (inner) { + if (!innerSub) { + innerSub = innerFrom(inner).subscribe( + createOperatorSubscriber( + subscriber, + undefined, + function () { + innerSub = null; + isComplete && subscriber.complete(); + } + ) + ); + } + }, + function () { + isComplete = true; + !innerSub && subscriber.complete(); + } + ) + ); }); } @@ -3953,33 +5481,63 @@ function exhaustMap(project, resultSelector) { if (resultSelector) { return function (source) { - return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); + return source.pipe( + exhaustMap(function (a, i) { + return innerFrom(project(a, i)).pipe( + map(function (b, ii) { + return resultSelector(a, b, i, ii); + }) + ); + }) + ); }; } return operate(function (source, subscriber) { var index = 0; var innerSub = null; var isComplete = false; - source.subscribe(new OperatorSubscriber(subscriber, function (outerValue) { - if (!innerSub) { - innerSub = new OperatorSubscriber(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (outerValue) { + if (!innerSub) { + innerSub = createOperatorSubscriber( + subscriber, + undefined, + function () { + innerSub = null; + isComplete && subscriber.complete(); + } + ); + innerFrom(project(outerValue, index++)).subscribe( + innerSub + ); + } + }, + function () { + isComplete = true; + !innerSub && subscriber.complete(); + } + ) + ); }); } function expand(project, concurrent, scheduler) { - if (concurrent === void 0) { concurrent = Infinity; } + if (concurrent === void 0) { + concurrent = Infinity; + } concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; return operate(function (source, subscriber) { - return mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler); + return mergeInternals( + source, + subscriber, + project, + concurrent, + undefined, + true, + scheduler + ); }); } @@ -3987,8 +5545,7 @@ return operate(function (source, subscriber) { try { source.subscribe(subscriber); - } - finally { + } finally { subscriber.add(callback); } }); @@ -4001,16 +5558,22 @@ var findIndex = emit === 'index'; return function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, function () { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, + function () { + subscriber.next(findIndex ? -1 : undefined); + subscriber.complete(); + } + ) + ); }; } @@ -4021,7 +5584,19 @@ function first(predicate, defaultValue) { var hasDefaultValue = arguments.length >= 2; return function (source) { - return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); + return source.pipe( + predicate + ? filter(function (v, i) { + return predicate(v, i, source); + }) + : identity, + take(1), + hasDefaultValue + ? defaultIfEmpty(defaultValue) + : throwIfEmpty(function () { + return new EmptyError(); + }) + ); }; } @@ -4030,47 +5605,93 @@ var element; if (!elementOrOptions || typeof elementOrOptions === 'function') { element = elementOrOptions; - } - else { - (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); + } else { + (duration = elementOrOptions.duration), + (element = elementOrOptions.element), + (connector = elementOrOptions.connector); } var groups = new Map(); var notify = function (cb) { groups.forEach(cb); cb(subscriber); }; - var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; - var groupBySourceSubscriber = new GroupBySubscriber(subscriber, function (value) { - try { - var key_1 = keySelector(value); - var group_1 = groups.get(key_1); - if (!group_1) { - groups.set(key_1, (group_1 = connector ? connector() : new Subject())); - var grouped = createGroupedObservable(key_1, group_1); - subscriber.next(grouped); - if (duration) { - var durationSubscriber_1 = new OperatorSubscriber(group_1, function () { - group_1.complete(); - durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); - }, undefined, undefined, function () { return groups.delete(key_1); }); - groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + var handleError = function (err) { + return notify(function (consumer) { + return consumer.error(err); + }); + }; + var activeGroups = 0; + var teardownAttempted = false; + var groupBySourceSubscriber = new OperatorSubscriber( + subscriber, + function (value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set( + key_1, + (group_1 = connector + ? connector() + : new Subject()) + ); + var grouped = createGroupedObservable( + key_1, + group_1 + ); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = + createOperatorSubscriber( + group_1, + function () { + group_1.complete(); + durationSubscriber_1 === null || + durationSubscriber_1 === void 0 + ? void 0 + : durationSubscriber_1.unsubscribe(); + }, + undefined, + undefined, + function () { + return groups.delete(key_1); + } + ); + groupBySourceSubscriber.add( + innerFrom(duration(grouped)).subscribe( + durationSubscriber_1 + ) + ); + } } + group_1.next(element ? element(value) : value); + } catch (err) { + handleError(err); } - group_1.next(element ? element(value) : value); - } - catch (err) { - handleError(err); + }, + function () { + return notify(function (consumer) { + return consumer.complete(); + }); + }, + handleError, + function () { + return groups.clear(); + }, + function () { + teardownAttempted = true; + return activeGroups === 0; } - }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }); + ); source.subscribe(groupBySourceSubscriber); function createGroupedObservable(key, groupSubject) { var result = new Observable(function (groupSubscriber) { - groupBySourceSubscriber.activeGroups++; + activeGroups++; var innerSub = groupSubject.subscribe(groupSubscriber); return function () { innerSub.unsubscribe(); - --groupBySourceSubscriber.activeGroups === 0 && - groupBySourceSubscriber.teardownAttempted && + --activeGroups === 0 && + teardownAttempted && groupBySourceSubscriber.unsubscribe(); }; }); @@ -4079,108 +5700,173 @@ } }); } - var GroupBySubscriber = (function (_super) { - __extends(GroupBySubscriber, _super); - function GroupBySubscriber() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.activeGroups = 0; - _this.teardownAttempted = false; - return _this; - } - GroupBySubscriber.prototype.unsubscribe = function () { - this.teardownAttempted = true; - this.activeGroups === 0 && _super.prototype.unsubscribe.call(this); - }; - return GroupBySubscriber; - }(OperatorSubscriber)); function isEmpty() { return operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber(subscriber, function () { - subscriber.next(false); - subscriber.complete(); - }, function () { - subscriber.next(true); - subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function () { + subscriber.next(false); + subscriber.complete(); + }, + function () { + subscriber.next(true); + subscriber.complete(); + } + ) + ); }); } function takeLast(count) { return count <= 0 - ? function () { return EMPTY; } + ? function () { + return EMPTY; + } : operate(function (source, subscriber) { - var buffer = []; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - buffer.push(value); - count < buffer.length && buffer.shift(); - }, function () { - var e_1, _a; - try { - for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { - var value = buffer_1_1.value; - subscriber.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }, undefined, function () { - buffer = null; - })); - }); + var buffer = []; + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, + function () { + var e_1, _a; + try { + for ( + var buffer_1 = __values(buffer), + buffer_1_1 = buffer_1.next(); + !buffer_1_1.done; + buffer_1_1 = buffer_1.next() + ) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + buffer_1_1 && + !buffer_1_1.done && + (_a = buffer_1.return) + ) + _a.call(buffer_1); + } finally { + if (e_1) throw e_1.error; + } + } + subscriber.complete(); + }, + undefined, + function () { + buffer = null; + } + ) + ); + }); } function last$1(predicate, defaultValue) { var hasDefaultValue = arguments.length >= 2; return function (source) { - return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); + return source.pipe( + predicate + ? filter(function (v, i) { + return predicate(v, i, source); + }) + : identity, + takeLast(1), + hasDefaultValue + ? defaultIfEmpty(defaultValue) + : throwIfEmpty(function () { + return new EmptyError(); + }) + ); }; } function materialize() { return operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - subscriber.next(Notification.createNext(value)); - }, function () { - subscriber.next(Notification.createComplete()); - subscriber.complete(); - }, function (err) { - subscriber.next(Notification.createError(err)); - subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + subscriber.next(Notification.createNext(value)); + }, + function () { + subscriber.next(Notification.createComplete()); + subscriber.complete(); + }, + function (err) { + subscriber.next(Notification.createError(err)); + subscriber.complete(); + } + ) + ); }); } function max(comparer) { - return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); }); + return reduce( + isFunction(comparer) + ? function (x, y) { + return comparer(x, y) > 0 ? x : y; + } + : function (x, y) { + return x > y ? x : y; + } + ); } var flatMap = mergeMap; function mergeMapTo(innerObservable, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } + if (concurrent === void 0) { + concurrent = Infinity; + } if (isFunction(resultSelector)) { - return mergeMap(function () { return innerObservable; }, resultSelector, concurrent); + return mergeMap( + function () { + return innerObservable; + }, + resultSelector, + concurrent + ); } if (typeof resultSelector === 'number') { concurrent = resultSelector; } - return mergeMap(function () { return innerObservable; }, concurrent); + return mergeMap(function () { + return innerObservable; + }, concurrent); } function mergeScan(accumulator, seed, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } + if (concurrent === void 0) { + concurrent = Infinity; + } return operate(function (source, subscriber) { var state = seed; - return mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) { - state = value; - }, false, undefined, function () { return (state = null); }); + return mergeInternals( + source, + subscriber, + function (value, index) { + return accumulator(state, value, index); + }, + concurrent, + function (value) { + state = value; + }, + false, + undefined, + function () { + return (state = null); + } + ); }); } @@ -4193,7 +5879,9 @@ var concurrent = popNumber(args, Infinity); args = argsOrArgArray(args); return operate(function (source, subscriber) { - mergeAll(concurrent)(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + mergeAll(concurrent)( + from(__spreadArray([source], __read(args)), scheduler) + ).subscribe(subscriber); }); } @@ -4206,29 +5894,45 @@ } function min(comparer) { - return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); }); + return reduce( + isFunction(comparer) + ? function (x, y) { + return comparer(x, y) < 0 ? x : y; + } + : function (x, y) { + return x < y ? x : y; + } + ); } function multicast(subjectOrSubjectFactory, selector) { - var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; }; + var subjectFactory = isFunction(subjectOrSubjectFactory) + ? subjectOrSubjectFactory + : function () { + return subjectOrSubjectFactory; + }; if (isFunction(selector)) { return connect(selector, { - connector: subjectFactory, + connector: subjectFactory }); } - return function (source) { return new ConnectableObservable(source, subjectFactory); }; + return function (source) { + return new ConnectableObservable(source, subjectFactory); + }; } function pairwise() { return operate(function (source, subscriber) { var prev; var hasPrev = false; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + }) + ); }); } @@ -4244,11 +5948,13 @@ return map(function (x) { var currentProp = x; for (var i = 0; i < length; i++) { - var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; + var p = + currentProp === null || currentProp === void 0 + ? void 0 + : currentProp[properties[i]]; if (typeof p !== 'undefined') { currentProp = p; - } - else { + } else { return undefined; } } @@ -4257,29 +5963,51 @@ } function publish(selector) { - return selector ? function (source) { return connect(selector)(source); } : function (source) { return multicast(new Subject())(source); }; + return selector + ? function (source) { + return connect(selector)(source); + } + : function (source) { + return multicast(new Subject())(source); + }; } function publishBehavior(initialValue) { return function (source) { var subject = new BehaviorSubject(initialValue); - return new ConnectableObservable(source, function () { return subject; }); + return new ConnectableObservable(source, function () { + return subject; + }); }; } function publishLast() { return function (source) { var subject = new AsyncSubject(); - return new ConnectableObservable(source, function () { return subject; }); + return new ConnectableObservable(source, function () { + return subject; + }); }; } - function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + function publishReplay( + bufferSize, + windowTime, + selectorOrScheduler, + timestampProvider + ) { if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { timestampProvider = selectorOrScheduler; } - var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; - return function (source) { return multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); }; + var selector = isFunction(selectorOrScheduler) + ? selectorOrScheduler + : undefined; + return function (source) { + return multicast( + new ReplaySubject(bufferSize, windowTime, timestampProvider), + selector + )(source); + }; } function raceWith() { @@ -4290,8 +6018,10 @@ return !otherSources.length ? identity : operate(function (source, subscriber) { - raceInit(__spreadArray([source], __read(otherSources)))(subscriber); - }); + raceInit(__spreadArray([source], __read(otherSources)))( + subscriber + ); + }); } function repeat(countOrConfig) { @@ -4300,53 +6030,67 @@ var delay; if (countOrConfig != null) { if (typeof countOrConfig === 'object') { - (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); - } - else { + (_a = countOrConfig.count), + (count = _a === void 0 ? Infinity : _a), + (delay = countOrConfig.delay); + } else { count = countOrConfig; } } return count <= 0 - ? function () { return EMPTY; } + ? function () { + return EMPTY; + } : operate(function (source, subscriber) { - var soFar = 0; - var sourceSub; - var resubscribe = function () { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); - var notifierSubscriber_1 = new OperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - subscribeToSource(); - } - }; - var subscribeToSource = function () { - var syncUnsub = false; - sourceSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, function () { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } - else { - syncUnsub = true; - } - } - else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); + var soFar = 0; + var sourceSub; + var resubscribe = function () { + sourceSub === null || sourceSub === void 0 + ? void 0 + : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + var notifier = + typeof delay === 'number' + ? timer(delay) + : innerFrom(delay(soFar)); + var notifierSubscriber_1 = createOperatorSubscriber( + subscriber, + function () { + notifierSubscriber_1.unsubscribe(); + subscribeToSource(); + } + ); + notifier.subscribe(notifierSubscriber_1); + } else { + subscribeToSource(); + } + }; + var subscribeToSource = function () { + var syncUnsub = false; + sourceSub = source.subscribe( + createOperatorSubscriber( + subscriber, + undefined, + function () { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } else { + syncUnsub = true; + } + } else { + subscriber.complete(); + } + } + ) + ); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); } function repeatWhen(notifier) { @@ -4356,30 +6100,47 @@ var completions$; var isNotifierComplete = false; var isMainComplete = false; - var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; + var checkComplete = function () { + return ( + isMainComplete && + isNotifierComplete && + (subscriber.complete(), true) + ); + }; var getCompletionSubject = function () { if (!completions$) { completions$ = new Subject(); - notifier(completions$).subscribe(new OperatorSubscriber(subscriber, function () { - if (innerSub) { - subscribeForRepeatWhen(); - } - else { - syncResub = true; - } - }, function () { - isNotifierComplete = true; - checkComplete(); - })); + notifier(completions$).subscribe( + createOperatorSubscriber( + subscriber, + function () { + if (innerSub) { + subscribeForRepeatWhen(); + } else { + syncResub = true; + } + }, + function () { + isNotifierComplete = true; + checkComplete(); + } + ) + ); } return completions$; }; var subscribeForRepeatWhen = function () { isMainComplete = false; - innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, function () { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); + innerSub = source.subscribe( + createOperatorSubscriber( + subscriber, + undefined, + function () { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + } + ) + ); if (syncResub) { innerSub.unsubscribe(); innerSub = null; @@ -4392,67 +6153,88 @@ } function retry(configOrCount) { - if (configOrCount === void 0) { configOrCount = Infinity; } + if (configOrCount === void 0) { + configOrCount = Infinity; + } var config; if (configOrCount && typeof configOrCount === 'object') { config = configOrCount; - } - else { + } else { config = { - count: configOrCount, + count: configOrCount }; } - var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; + var _a = config.count, + count = _a === void 0 ? Infinity : _a, + delay = config.delay, + _b = config.resetOnSuccess, + resetOnSuccess = _b === void 0 ? false : _b; return count <= 0 ? identity : operate(function (source, subscriber) { - var soFar = 0; - var innerSub; - var subscribeForRetry = function () { - var syncUnsub = false; - innerSub = source.subscribe(new OperatorSubscriber(subscriber, function (value) { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, undefined, function (err) { - if (soFar++ < count) { - var resub_1 = function () { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - else { - syncUnsub = true; - } - }; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); - var notifierSubscriber_1 = new OperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - resub_1(); - }, function () { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - resub_1(); - } - } - else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); + var soFar = 0; + var innerSub; + var subscribeForRetry = function () { + var syncUnsub = false; + innerSub = source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, + undefined, + function (err) { + if (soFar++ < count) { + var resub_1 = function () { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = + typeof delay === 'number' + ? timer(delay) + : innerFrom( + delay(err, soFar) + ); + var notifierSubscriber_1 = + createOperatorSubscriber( + subscriber, + function () { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, + function () { + subscriber.complete(); + } + ); + notifier.subscribe( + notifierSubscriber_1 + ); + } else { + resub_1(); + } + } else { + subscriber.error(err); + } + } + ) + ); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); } function retryWhen(notifier) { @@ -4461,17 +6243,31 @@ var syncResub = false; var errors$; var subscribeForRetryWhen = function () { - innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, undefined, function (err) { - if (!errors$) { - errors$ = new Subject(); - notifier(errors$).subscribe(new OperatorSubscriber(subscriber, function () { - return innerSub ? subscribeForRetryWhen() : (syncResub = true); - })); - } - if (errors$) { - errors$.next(err); - } - })); + innerSub = source.subscribe( + createOperatorSubscriber( + subscriber, + undefined, + undefined, + function (err) { + if (!errors$) { + errors$ = new Subject(); + notifier(errors$).subscribe( + createOperatorSubscriber( + subscriber, + function () { + return innerSub + ? subscribeForRetryWhen() + : (syncResub = true); + } + ) + ); + } + if (errors$) { + errors$.next(err); + } + } + ) + ); if (syncResub) { innerSub.unsubscribe(); innerSub = null; @@ -4487,33 +6283,48 @@ return operate(function (source, subscriber) { var hasValue = false; var lastValue = null; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - })); - var emit = function () { - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - notifier.subscribe(new OperatorSubscriber(subscriber, emit, noop)); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + }) + ); + notifier.subscribe( + createOperatorSubscriber( + subscriber, + function () { + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }, + noop + ) + ); }); } function sampleTime(period, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } + if (scheduler === void 0) { + scheduler = asyncScheduler; + } return sample(interval(period, scheduler)); } function scan(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, true)); + return operate( + scanInternals(accumulator, seed, arguments.length >= 2, true) + ); } function sequenceEqual(compareTo, comparator) { - if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } + if (comparator === void 0) { + comparator = function (a, b) { + return a === b; + }; + } return operate(function (source, subscriber) { var aState = createState(); var bState = createState(); @@ -4522,20 +6333,28 @@ subscriber.complete(); }; var createSubscriber = function (selfState, otherState) { - var sequenceEqualSubscriber = new OperatorSubscriber(subscriber, function (a) { - var buffer = otherState.buffer, complete = otherState.complete; - if (buffer.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); - } - else { - !comparator(a, buffer.shift()) && emit(false); + var sequenceEqualSubscriber = createOperatorSubscriber( + subscriber, + function (a) { + var buffer = otherState.buffer, + complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } else { + !comparator(a, buffer.shift()) && emit(false); + } + }, + function () { + selfState.complete = true; + var complete = otherState.complete, + buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || + sequenceEqualSubscriber === void 0 + ? void 0 + : sequenceEqualSubscriber.unsubscribe(); } - }, function () { - selfState.complete = true; - var complete = otherState.complete, buffer = otherState.buffer; - complete && emit(buffer.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); + ); return sequenceEqualSubscriber; }; source.subscribe(createSubscriber(aState, bState)); @@ -4545,13 +6364,27 @@ function createState() { return { buffer: [], - complete: false, + complete: false }; } function share(options) { - if (options === void 0) { options = {}; } - var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; + if (options === void 0) { + options = {}; + } + var _a = options.connector, + connector = + _a === void 0 + ? function () { + return new Subject(); + } + : _a, + _b = options.resetOnError, + resetOnError = _b === void 0 ? true : _b, + _c = options.resetOnComplete, + resetOnComplete = _c === void 0 ? true : _c, + _d = options.resetOnRefCountZero, + resetOnRefCountZero = _d === void 0 ? true : _d; return function (wrapperSource) { var connection = null; var resetConnection = null; @@ -4560,7 +6393,9 @@ var hasCompleted = false; var hasErrored = false; var cancelReset = function () { - resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection === null || resetConnection === void 0 + ? void 0 + : resetConnection.unsubscribe(); resetConnection = null; }; var reset = function () { @@ -4578,29 +6413,44 @@ if (!hasErrored && !hasCompleted) { cancelReset(); } - var dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); + var dest = (subject = + subject !== null && subject !== void 0 + ? subject + : connector()); subscriber.add(function () { refCount--; if (refCount === 0 && !hasErrored && !hasCompleted) { - resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + resetConnection = handleReset( + resetAndUnsubscribe, + resetOnRefCountZero + ); } }); dest.subscribe(subscriber); if (!connection) { connection = new SafeSubscriber({ - next: function (value) { return dest.next(value); }, + next: function (value) { + return dest.next(value); + }, error: function (err) { hasErrored = true; cancelReset(); - resetConnection = handleReset(reset, resetOnError, err); + resetConnection = handleReset( + reset, + resetOnError, + err + ); dest.error(err); }, complete: function () { hasCompleted = true; cancelReset(); - resetConnection = handleReset(reset, resetOnComplete); + resetConnection = handleReset( + reset, + resetOnComplete + ); dest.complete(); - }, + } }); from(source).subscribe(connection); } @@ -4619,8 +6469,12 @@ if (on === false) { return null; } - return on.apply(void 0, __spreadArray([], __read(args))).pipe(take(1)) - .subscribe(function () { return reset(); }); + return on + .apply(void 0, __spreadArray([], __read(args))) + .pipe(take(1)) + .subscribe(function () { + return reset(); + }); } function shareReplay(configOrBufferSize, windowTime, scheduler) { @@ -4628,19 +6482,29 @@ var bufferSize; var refCount = false; if (configOrBufferSize && typeof configOrBufferSize === 'object') { - bufferSize = (_a = configOrBufferSize.bufferSize) !== null && _a !== void 0 ? _a : Infinity; - windowTime = (_b = configOrBufferSize.windowTime) !== null && _b !== void 0 ? _b : Infinity; + bufferSize = + (_a = configOrBufferSize.bufferSize) !== null && _a !== void 0 + ? _a + : Infinity; + windowTime = + (_b = configOrBufferSize.windowTime) !== null && _b !== void 0 + ? _b + : Infinity; refCount = !!configOrBufferSize.refCount; scheduler = configOrBufferSize.scheduler; - } - else { - bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity; + } else { + bufferSize = + configOrBufferSize !== null && configOrBufferSize !== void 0 + ? configOrBufferSize + : Infinity; } return share({ - connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); }, + connector: function () { + return new ReplaySubject(bufferSize, windowTime, scheduler); + }, resetOnError: true, resetOnComplete: false, - resetOnRefCountZero: refCount, + resetOnRefCountZero: refCount }); } @@ -4650,63 +6514,89 @@ var singleValue; var seenValue = false; var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, function () { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } - else { - subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); - } - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && + subscriber.error( + new SequenceError( + 'Too many matching values' + ) + ); + hasValue = true; + singleValue = value; + } + }, + function () { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } else { + subscriber.error( + seenValue + ? new NotFoundError('No matching values') + : new EmptyError() + ); + } + } + ) + ); }); } function skip(count) { - return filter(function (_, index) { return count <= index; }); + return filter(function (_, index) { + return count <= index; + }); } function skipLast(skipCount) { return skipCount <= 0 - ? - identity + ? identity : operate(function (source, subscriber) { - var ring = new Array(skipCount); - var seen = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } - else { - var index = valueIndex % skipCount; - var oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return function () { - ring = null; - }; - }); + var ring = new Array(skipCount); + var seen = 0; + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + }) + ); + return function () { + ring = null; + }; + }); } function skipUntil(notifier) { return operate(function (source, subscriber) { var taking = false; - var skipSubscriber = new OperatorSubscriber(subscriber, function () { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, noop); + var skipSubscriber = createOperatorSubscriber( + subscriber, + function () { + skipSubscriber === null || skipSubscriber === void 0 + ? void 0 + : skipSubscriber.unsubscribe(); + taking = true; + }, + noop + ); innerFrom(notifier).subscribe(skipSubscriber); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + return taking && subscriber.next(value); + }) + ); }); } @@ -4714,7 +6604,14 @@ return operate(function (source, subscriber) { var taking = false; var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + return ( + (taking || (taking = !predicate(value, index++))) && + subscriber.next(value) + ); + }) + ); }); } @@ -4725,7 +6622,10 @@ } var scheduler = popScheduler(values); return operate(function (source, subscriber) { - (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); + (scheduler + ? concat(values, source, scheduler) + : concat(values, source) + ).subscribe(subscriber); }); } @@ -4734,19 +6634,46 @@ var innerSubscriber = null; var index = 0; var isComplete = false; - var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = new OperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { - innerSubscriber = null; - checkComplete(); - }))); - }, function () { - isComplete = true; - checkComplete(); - })); + var checkComplete = function () { + return isComplete && !innerSubscriber && subscriber.complete(); + }; + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + innerSubscriber === null || innerSubscriber === void 0 + ? void 0 + : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + innerFrom(project(value, outerIndex)).subscribe( + (innerSubscriber = createOperatorSubscriber( + subscriber, + function (innerValue) { + return subscriber.next( + resultSelector + ? resultSelector( + value, + innerValue, + outerIndex, + innerIndex++ + ) + : innerValue + ); + }, + function () { + innerSubscriber = null; + checkComplete(); + } + )) + ); + }, + function () { + isComplete = true; + checkComplete(); + } + ) + ); }); } @@ -4755,13 +6682,26 @@ } function switchMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; }); + return isFunction(resultSelector) + ? switchMap(function () { + return innerObservable; + }, resultSelector) + : switchMap(function () { + return innerObservable; + }); } function switchScan(accumulator, seed) { return operate(function (source, subscriber) { var state = seed; - switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber); + switchMap( + function (value, index) { + return accumulator(state, value, index); + }, + function (_, innerValue) { + return (state = innerValue), innerValue; + } + )(source).subscribe(subscriber); return function () { state = null; }; @@ -4770,73 +6710,112 @@ function takeUntil(notifier) { return operate(function (source, subscriber) { - innerFrom(notifier).subscribe(new OperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop)); + innerFrom(notifier).subscribe( + createOperatorSubscriber( + subscriber, + function () { + return subscriber.complete(); + }, + noop + ) + ); !subscriber.closed && source.subscribe(subscriber); }); } function takeWhile(predicate, inclusive) { - if (inclusive === void 0) { inclusive = false; } + if (inclusive === void 0) { + inclusive = false; + } return operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + }) + ); }); } function tap(observerOrNext, error, complete) { - var tapObserver = isFunction(observerOrNext) || error || complete - ? - { next: observerOrNext, error: error, complete: complete } - : observerOrNext; + var tapObserver = + isFunction(observerOrNext) || error || complete + ? { next: observerOrNext, error: error, complete: complete } + : observerOrNext; return tapObserver ? operate(function (source, subscriber) { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - var isUnsub = true; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var _a; - (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); - subscriber.next(value); - }, function () { - var _a; - isUnsub = false; - (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - subscriber.complete(); - }, function (err) { - var _a; - isUnsub = false; - (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); - subscriber.error(err); - }, function () { - var _a, _b; - if (isUnsub) { - (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) - : - identity; + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver); + var isUnsub = true; + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + var _a; + (_a = tapObserver.next) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver, value); + subscriber.next(value); + }, + function () { + var _a; + isUnsub = false; + (_a = tapObserver.complete) === null || + _a === void 0 + ? void 0 + : _a.call(tapObserver); + subscriber.complete(); + }, + function (err) { + var _a; + isUnsub = false; + (_a = tapObserver.error) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver, err); + subscriber.error(err); + }, + function () { + var _a, _b; + if (isUnsub) { + (_a = tapObserver.unsubscribe) === null || + _a === void 0 + ? void 0 + : _a.call(tapObserver); + } + (_b = tapObserver.finalize) === null || + _b === void 0 + ? void 0 + : _b.call(tapObserver); + } + ) + ); + }) + : identity; } var defaultThrottleConfig = { leading: true, - trailing: false, + trailing: false }; function throttle(durationSelector, config) { - if (config === void 0) { config = defaultThrottleConfig; } + if (config === void 0) { + config = defaultThrottleConfig; + } return operate(function (source, subscriber) { - var leading = config.leading, trailing = config.trailing; + var leading = config.leading, + trailing = config.trailing; var hasValue = false; var sendValue = null; var throttled = null; var isComplete = false; var endThrottling = function () { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled === null || throttled === void 0 + ? void 0 + : throttled.unsubscribe(); throttled = null; if (trailing) { send(); @@ -4848,7 +6827,15 @@ isComplete && subscriber.complete(); }; var startThrottle = function (value) { - return (throttled = innerFrom(durationSelector(value)).subscribe(new OperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + return (throttled = innerFrom( + durationSelector(value) + ).subscribe( + createOperatorSubscriber( + subscriber, + endThrottling, + cleanupThrottling + ) + )); }; var send = function () { if (hasValue) { @@ -4859,41 +6846,57 @@ !isComplete && startThrottle(value); } }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, function () { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && + (leading ? send() : startThrottle(value)); + }, + function () { + isComplete = true; + !( + trailing && + hasValue && + throttled && + !throttled.closed + ) && subscriber.complete(); + } + ) + ); }); } function throttleTime(duration, scheduler, config) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - if (config === void 0) { config = defaultThrottleConfig; } + if (scheduler === void 0) { + scheduler = asyncScheduler; + } + if (config === void 0) { + config = defaultThrottleConfig; + } var duration$ = timer(duration, scheduler); - return throttle(function () { return duration$; }, config); + return throttle(function () { + return duration$; + }, config); } function timeInterval(scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return function (source) { - return defer(function () { - return source.pipe(scan(function (_a, value) { - var current = _a.current; - return ({ value: value, current: scheduler.now(), last: current }); - }, { - current: scheduler.now(), - value: undefined, - last: undefined, - }), map(function (_a) { - var current = _a.current, last = _a.last, value = _a.value; - return new TimeInterval(value, current - last); - })); - }); - }; + if (scheduler === void 0) { + scheduler = asyncScheduler; + } + return operate(function (source, subscriber) { + var last = scheduler.now(); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + var now = scheduler.now(); + var interval = now - last; + last = now; + subscriber.next(new TimeInterval(value, interval)); + }) + ); + }); } var TimeInterval = (function () { function TimeInterval(value, interval) { @@ -4901,23 +6904,24 @@ this.interval = interval; } return TimeInterval; - }()); + })(); function timeoutWith(due, withObservable, scheduler) { var first; var each; var _with; - scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async; + scheduler = + scheduler !== null && scheduler !== void 0 ? scheduler : async; if (isValidDate(due)) { first = due; - } - else if (typeof due === 'number') { + } else if (typeof due === 'number') { each = due; } if (withObservable) { - _with = function () { return withObservable; }; - } - else { + _with = function () { + return withObservable; + }; + } else { throw new TypeError('No observable provided to switch to'); } if (first == null && each == null) { @@ -4927,13 +6931,17 @@ first: first, each: each, scheduler: scheduler, - with: _with, + with: _with }); } function timestamp(timestampProvider) { - if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider; } - return map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); }); + if (timestampProvider === void 0) { + timestampProvider = dateTimestampProvider; + } + return map(function (value) { + return { value: value, timestamp: timestampProvider.now() }; + }); } function window(windowBoundaries) { @@ -4944,65 +6952,107 @@ windowSubject.error(err); subscriber.error(err); }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - windowBoundaries.subscribe(new OperatorSubscriber(subscriber, function () { - windowSubject.complete(); - subscriber.next((windowSubject = new Subject())); - }, noop, errorHandler)); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + return windowSubject === null || + windowSubject === void 0 + ? void 0 + : windowSubject.next(value); + }, + function () { + windowSubject.complete(); + subscriber.complete(); + }, + errorHandler + ) + ); + windowBoundaries.subscribe( + createOperatorSubscriber( + subscriber, + function () { + windowSubject.complete(); + subscriber.next((windowSubject = new Subject())); + }, + noop, + errorHandler + ) + ); return function () { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject === null || windowSubject === void 0 + ? void 0 + : windowSubject.unsubscribe(); windowSubject = null; }; }); } function windowCount(windowSize, startWindowEvery) { - if (startWindowEvery === void 0) { startWindowEvery = 0; } + if (startWindowEvery === void 0) { + startWindowEvery = 0; + } var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; return operate(function (source, subscriber) { var windows = [new Subject()]; var count = 0; subscriber.next(windows[0].asObservable()); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { - var window_1 = windows_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + try { + for ( + var windows_1 = __values(windows), + windows_1_1 = windows_1.next(); + !windows_1_1.done; + windows_1_1 = windows_1.next() + ) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + windows_1_1 && + !windows_1_1.done && + (_a = windows_1.return) + ) + _a.call(windows_1); + } finally { + if (e_1) throw e_1.error; + } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, + function () { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, + function (err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, + function () { + windows = null; } - finally { if (e_1) throw e_1.error; } - } - var c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count % startEvery === 0) { - var window_2 = new Subject(); - windows.push(window_2); - subscriber.next(window_2.asObservable()); - } - }, function () { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, function (err) { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, function () { - windows = null; - })); + ) + ); }); } @@ -5012,14 +7062,19 @@ for (var _i = 1; _i < arguments.length; _i++) { otherArgs[_i - 1] = arguments[_i]; } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var scheduler = + (_a = popScheduler(otherArgs)) !== null && _a !== void 0 + ? _a + : asyncScheduler; + var windowCreationInterval = + (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; var maxWindowSize = otherArgs[1] || Infinity; return operate(function (source, subscriber) { var windowRecords = []; var restartOnClose = false; var closeWindow = function (record) { - var window = record.window, subs = record.subs; + var window = record.window, + subs = record.subs; window.complete(); subs.unsubscribe(); arrRemove(windowRecords, record); @@ -5033,21 +7088,38 @@ var record_1 = { window: window_1, subs: subs, - seen: 0, + seen: 0 }; windowRecords.push(record_1); subscriber.next(window_1.asObservable()); - executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); + executeSchedule( + subs, + scheduler, + function () { + return closeWindow(record_1); + }, + windowTimeSpan + ); } }; - if (windowCreationInterval !== null && windowCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } - else { + if ( + windowCreationInterval !== null && + windowCreationInterval >= 0 + ) { + executeSchedule( + subscriber, + scheduler, + startWindow, + windowCreationInterval, + true + ); + } else { restartOnClose = true; } startWindow(); - var loop = function (cb) { return windowRecords.slice().forEach(cb); }; + var loop = function (cb) { + return windowRecords.slice().forEach(cb); + }; var terminate = function (cb) { loop(function (_a) { var window = _a.window; @@ -5056,12 +7128,28 @@ cb(subscriber); subscriber.unsubscribe(); }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - loop(function (record) { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + loop(function (record) { + record.window.next(value); + maxWindowSize <= ++record.seen && + closeWindow(record); + }); + }, + function () { + return terminate(function (consumer) { + return consumer.complete(); + }); + }, + function (err) { + return terminate(function (consumer) { + return consumer.error(err); + }); + } + ) + ); return function () { windowRecords = null; }; @@ -5077,52 +7165,87 @@ } subscriber.error(err); }; - innerFrom(openings).subscribe(new OperatorSubscriber(subscriber, function (openValue) { - var window = new Subject(); - windows.push(window); - var closingSubscription = new Subscription(); - var closeWindow = function () { - arrRemove(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - var closingNotifier; - try { - closingNotifier = innerFrom(closingSelector(openValue)); - } - catch (err) { - handleError(err); - return; - } - subscriber.next(window.asObservable()); - closingSubscription.add(closingNotifier.subscribe(new OperatorSubscriber(subscriber, closeWindow, noop, handleError))); - }, noop)); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var windowsCopy = windows.slice(); - try { - for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { - var window_1 = windowsCopy_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); + innerFrom(openings).subscribe( + createOperatorSubscriber( + subscriber, + function (openValue) { + var window = new Subject(); + windows.push(window); + var closingSubscription = new Subscription(); + var closeWindow = function () { + arrRemove(windows, window); + window.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = innerFrom( + closingSelector(openValue) + ); + } catch (err) { + handleError(err); + return; + } + subscriber.next(window.asObservable()); + closingSubscription.add( + closingNotifier.subscribe( + createOperatorSubscriber( + subscriber, + closeWindow, + noop, + handleError + ) + ) + ); + }, + noop + ) + ); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + var windowsCopy = windows.slice(); + try { + for ( + var windowsCopy_1 = __values(windowsCopy), + windowsCopy_1_1 = windowsCopy_1.next(); + !windowsCopy_1_1.done; + windowsCopy_1_1 = windowsCopy_1.next() + ) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + windowsCopy_1_1 && + !windowsCopy_1_1.done && + (_a = windowsCopy_1.return) + ) + _a.call(windowsCopy_1); + } finally { + if (e_1) throw e_1.error; + } + } + }, + function () { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, + handleError, + function () { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (0 < windows.length) { - windows.shift().complete(); - } - subscriber.complete(); - }, handleError, function () { - while (0 < windows.length) { - windows.shift().unsubscribe(); - } - })); + ) + ); }); } @@ -5135,28 +7258,51 @@ subscriber.error(err); }; var openWindow = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window === null || window === void 0 ? void 0 : window.complete(); + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); + window === null || window === void 0 + ? void 0 + : window.complete(); window = new Subject(); subscriber.next(window.asObservable()); var closingNotifier; try { closingNotifier = innerFrom(closingSelector()); - } - catch (err) { + } catch (err) { handleError(err); return; } - closingNotifier.subscribe((closingSubscriber = new OperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + closingNotifier.subscribe( + (closingSubscriber = createOperatorSubscriber( + subscriber, + openWindow, + openWindow, + handleError + )) + ); }; openWindow(); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () { - window.complete(); - subscriber.complete(); - }, handleError, function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window = null; - })); + source.subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + return window.next(value); + }, + function () { + window.complete(); + subscriber.complete(); + }, + handleError, + function () { + closingSubscriber === null || + closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); + window = null; + } + ) + ); }); } @@ -5169,26 +7315,47 @@ return operate(function (source, subscriber) { var len = inputs.length; var otherValues = new Array(len); - var hasValue = inputs.map(function () { return false; }); + var hasValue = inputs.map(function () { + return false; + }); var ready = false; var _loop_1 = function (i) { - innerFrom(inputs[i]).subscribe(new OperatorSubscriber(subscriber, function (value) { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - hasValue[i] = true; - (ready = hasValue.every(identity)) && (hasValue = null); - } - }, noop)); + innerFrom(inputs[i]).subscribe( + createOperatorSubscriber( + subscriber, + function (value) { + otherValues[i] = value; + if (!ready && !hasValue[i]) { + hasValue[i] = true; + (ready = hasValue.every(identity)) && + (hasValue = null); + } + }, + noop + ) + ); }; for (var i = 0; i < len; i++) { _loop_1(i); } - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - if (ready) { - var values = __spreadArray([value], __read(otherValues)); - subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); - } - })); + source.subscribe( + createOperatorSubscriber(subscriber, function (value) { + if (ready) { + var values = __spreadArray( + [value], + __read(otherValues) + ); + subscriber.next( + project + ? project.apply( + void 0, + __spreadArray([], __read(values)) + ) + : values + ); + } + }) + ); }); } @@ -5202,7 +7369,10 @@ sources[_i] = arguments[_i]; } return operate(function (source, subscriber) { - zip.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); + zip.apply( + void 0, + __spreadArray([source], __read(sources)) + ).subscribe(subscriber); }); } @@ -5216,7 +7386,10 @@ function partition$1(predicate, thisArg) { return function (source) { - return [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)]; + return [ + filter(predicate, thisArg)(source), + filter(not(predicate, thisArg))(source) + ]; }; } @@ -5225,12 +7398,13 @@ for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } - return raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray(args)))); + return raceWith.apply( + void 0, + __spreadArray([], __read(argsOrArgArray(args))) + ); } - - - var _operators = /*#__PURE__*/Object.freeze({ + var _operators = /*#__PURE__*/ Object.freeze({ audit: audit, auditTime: auditTime, buffer: buffer, @@ -5348,12 +7522,14 @@ var SubscriptionLog = (function () { function SubscriptionLog(subscribedFrame, unsubscribedFrame) { - if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; } + if (unsubscribedFrame === void 0) { + unsubscribedFrame = Infinity; + } this.subscribedFrame = subscribedFrame; this.unsubscribedFrame = unsubscribedFrame; } return SubscriptionLog; - }()); + })(); var SubscriptionLoggable = (function () { function SubscriptionLoggable() { @@ -5366,10 +7542,13 @@ SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) { var subscriptionLogs = this.subscriptions; var oldSubscriptionLog = subscriptionLogs[index]; - subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now()); + subscriptionLogs[index] = new SubscriptionLog( + oldSubscriptionLog.subscribedFrame, + this.scheduler.now() + ); }; return SubscriptionLoggable; - }()); + })(); function applyMixins(derivedCtor, baseCtors) { for (var i = 0, len = baseCtors.length; i < len; i++) { @@ -5385,16 +7564,19 @@ var ColdObservable = (function (_super) { __extends(ColdObservable, _super); function ColdObservable(messages, scheduler) { - var _this = _super.call(this, function (subscriber) { - var observable = this; - var index = observable.logSubscribedFrame(); - var subscription = new Subscription(); - subscription.add(new Subscription(function () { - observable.logUnsubscribedFrame(index); - })); - observable.scheduleMessages(subscriber); - return subscription; - }) || this; + var _this = + _super.call(this, function (subscriber) { + var observable = this; + var index = observable.logSubscribedFrame(); + var subscription = new Subscription(); + subscription.add( + new Subscription(function () { + observable.logUnsubscribedFrame(index); + }) + ); + observable.scheduleMessages(subscriber); + return subscription; + }) || this; _this.messages = messages; _this.subscriptions = []; _this.scheduler = scheduler; @@ -5404,14 +7586,22 @@ var messagesLength = this.messages.length; for (var i = 0; i < messagesLength; i++) { var message = this.messages[i]; - subscriber.add(this.scheduler.schedule(function (state) { - var _a = state, notification = _a.message.notification, destination = _a.subscriber; - observeNotification(notification, destination); - }, message.frame, { message: message, subscriber: subscriber })); + subscriber.add( + this.scheduler.schedule( + function (state) { + var _a = state, + notification = _a.message.notification, + destination = _a.subscriber; + observeNotification(notification, destination); + }, + message.frame, + { message: message, subscriber: subscriber } + ) + ); } }; return ColdObservable; - }(Observable)); + })(Observable); applyMixins(ColdObservable, [SubscriptionLoggable]); var HotObservable = (function (_super) { @@ -5427,10 +7617,14 @@ var subject = this; var index = subject.logSubscribedFrame(); var subscription = new Subscription(); - subscription.add(new Subscription(function () { - subject.logUnsubscribedFrame(index); - })); - subscription.add(_super.prototype._subscribe.call(this, subscriber)); + subscription.add( + new Subscription(function () { + subject.logUnsubscribedFrame(index); + }) + ); + subscription.add( + _super.prototype._subscribe.call(this, subscriber) + ); return subscription; }; HotObservable.prototype.setup = function () { @@ -5438,7 +7632,9 @@ var messagesLength = subject.messages.length; var _loop_1 = function (i) { (function () { - var _a = subject.messages[i], notification = _a.notification, frame = _a.frame; + var _a = subject.messages[i], + notification = _a.notification, + frame = _a.frame; subject.scheduler.schedule(function () { observeNotification(notification, subject); }, frame); @@ -5449,14 +7645,15 @@ } }; return HotObservable; - }(Subject)); + })(Subject); applyMixins(HotObservable, [SubscriptionLoggable]); var defaultMaxFrame = 750; var TestScheduler = (function (_super) { __extends(TestScheduler, _super); function TestScheduler(assertDeepEqual) { - var _this = _super.call(this, VirtualAction, defaultMaxFrame) || this; + var _this = + _super.call(this, VirtualAction, defaultMaxFrame) || this; _this.assertDeepEqual = assertDeepEqual; _this.hotObservables = []; _this.coldObservables = []; @@ -5465,102 +7662,217 @@ return _this; } TestScheduler.prototype.createTime = function (marbles) { - var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); + var indexOf = this.runMode + ? marbles.trim().indexOf('|') + : marbles.indexOf('|'); if (indexOf === -1) { - throw new Error('marble diagram for time should have a completion marker "|"'); + throw new Error( + 'marble diagram for time should have a completion marker "|"' + ); } return indexOf * TestScheduler.frameTimeFactor; }; - TestScheduler.prototype.createColdObservable = function (marbles, values, error) { + TestScheduler.prototype.createColdObservable = function ( + marbles, + values, + error + ) { if (marbles.indexOf('^') !== -1) { - throw new Error('cold observable cannot have subscription offset "^"'); + throw new Error( + 'cold observable cannot have subscription offset "^"' + ); } if (marbles.indexOf('!') !== -1) { - throw new Error('cold observable cannot have unsubscription marker "!"'); - } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + throw new Error( + 'cold observable cannot have unsubscription marker "!"' + ); + } + var messages = TestScheduler.parseMarbles( + marbles, + values, + error, + undefined, + this.runMode + ); var cold = new ColdObservable(messages, this); this.coldObservables.push(cold); return cold; }; - TestScheduler.prototype.createHotObservable = function (marbles, values, error) { + TestScheduler.prototype.createHotObservable = function ( + marbles, + values, + error + ) { if (marbles.indexOf('!') !== -1) { - throw new Error('hot observable cannot have unsubscription marker "!"'); - } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + throw new Error( + 'hot observable cannot have unsubscription marker "!"' + ); + } + var messages = TestScheduler.parseMarbles( + marbles, + values, + error, + undefined, + this.runMode + ); var subject = new HotObservable(messages, this); this.hotObservables.push(subject); return subject; }; - TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) { + TestScheduler.prototype.materializeInnerObservable = function ( + observable, + outerFrame + ) { var _this = this; var messages = []; - observable.subscribe(function (value) { - messages.push({ frame: _this.frame - outerFrame, notification: nextNotification(value) }); - }, function (error) { - messages.push({ frame: _this.frame - outerFrame, notification: errorNotification(error) }); - }, function () { - messages.push({ frame: _this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); + observable.subscribe({ + next: function (value) { + messages.push({ + frame: _this.frame - outerFrame, + notification: nextNotification(value) + }); + }, + error: function (error) { + messages.push({ + frame: _this.frame - outerFrame, + notification: errorNotification(error) + }); + }, + complete: function () { + messages.push({ + frame: _this.frame - outerFrame, + notification: COMPLETE_NOTIFICATION + }); + } }); return messages; }; - TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) { + TestScheduler.prototype.expectObservable = function ( + observable, + subscriptionMarbles + ) { var _this = this; - if (subscriptionMarbles === void 0) { subscriptionMarbles = null; } + if (subscriptionMarbles === void 0) { + subscriptionMarbles = null; + } var actual = []; var flushTest = { actual: actual, ready: false }; - var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); - var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; + var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions( + subscriptionMarbles, + this.runMode + ); + var subscriptionFrame = + subscriptionParsed.subscribedFrame === Infinity + ? 0 + : subscriptionParsed.subscribedFrame; var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; var subscription; this.schedule(function () { - subscription = observable.subscribe(function (x) { - var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - actual.push({ frame: _this.frame, notification: nextNotification(value) }); - }, function (error) { - actual.push({ frame: _this.frame, notification: errorNotification(error) }); - }, function () { - actual.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); + subscription = observable.subscribe({ + next: function (x) { + var value = + x instanceof Observable + ? _this.materializeInnerObservable( + x, + _this.frame + ) + : x; + actual.push({ + frame: _this.frame, + notification: nextNotification(value) + }); + }, + error: function (error) { + actual.push({ + frame: _this.frame, + notification: errorNotification(error) + }); + }, + complete: function () { + actual.push({ + frame: _this.frame, + notification: COMPLETE_NOTIFICATION + }); + } }); }, subscriptionFrame); if (unsubscriptionFrame !== Infinity) { - this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame); + this.schedule(function () { + return subscription.unsubscribe(); + }, unsubscriptionFrame); } this.flushTests.push(flushTest); var runMode = this.runMode; return { toBe: function (marbles, values, errorValue) { flushTest.ready = true; - flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); + flushTest.expected = TestScheduler.parseMarbles( + marbles, + values, + errorValue, + true, + runMode + ); }, toEqual: function (other) { flushTest.ready = true; flushTest.expected = []; _this.schedule(function () { - subscription = other.subscribe(function (x) { - var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - flushTest.expected.push({ frame: _this.frame, notification: nextNotification(value) }); - }, function (error) { - flushTest.expected.push({ frame: _this.frame, notification: errorNotification(error) }); - }, function () { - flushTest.expected.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); + subscription = other.subscribe({ + next: function (x) { + var value = + x instanceof Observable + ? _this.materializeInnerObservable( + x, + _this.frame + ) + : x; + flushTest.expected.push({ + frame: _this.frame, + notification: nextNotification(value) + }); + }, + error: function (error) { + flushTest.expected.push({ + frame: _this.frame, + notification: errorNotification(error) + }); + }, + complete: function () { + flushTest.expected.push({ + frame: _this.frame, + notification: COMPLETE_NOTIFICATION + }); + } }); }, subscriptionFrame); - }, + } }; }; - TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) { + TestScheduler.prototype.expectSubscriptions = function ( + actualSubscriptionLogs + ) { var flushTest = { actual: actualSubscriptionLogs, ready: false }; this.flushTests.push(flushTest); var runMode = this.runMode; return { toBe: function (marblesOrMarblesArray) { - var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; + var marblesArray = + typeof marblesOrMarblesArray === 'string' + ? [marblesOrMarblesArray] + : marblesOrMarblesArray; flushTest.ready = true; flushTest.expected = marblesArray - .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); }) - .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; }); - }, + .map(function (marbles) { + return TestScheduler.parseMarblesAsSubscriptions( + marbles, + runMode + ); + }) + .filter(function (marbles) { + return marbles.subscribedFrame !== Infinity; + }); + } }; }; TestScheduler.prototype.flush = function () { @@ -5578,9 +7890,14 @@ return true; }); }; - TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) { + TestScheduler.parseMarblesAsSubscriptions = function ( + marbles, + runMode + ) { var _this = this; - if (runMode === void 0) { runMode = false; } + if (runMode === void 0) { + runMode = false; + } if (typeof marbles !== 'string') { return new SubscriptionLog(Infinity); } @@ -5615,22 +7932,32 @@ break; case '^': if (subscriptionFrame !== Infinity) { - throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); + throw new Error( + "found a second subscription point '^' in a " + + 'subscription marble diagram. There can only be one.' + ); } - subscriptionFrame = groupStart > -1 ? groupStart : frame; + subscriptionFrame = + groupStart > -1 ? groupStart : frame; advanceFrameBy(1); break; case '!': if (unsubscriptionFrame !== Infinity) { - throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); + throw new Error( + "found a second unsubscription point '!' in a " + + 'subscription marble diagram. There can only be one.' + ); } - unsubscriptionFrame = groupStart > -1 ? groupStart : frame; + unsubscriptionFrame = + groupStart > -1 ? groupStart : frame; break; default: if (runMode && c.match(/^[0-9]$/)) { if (i === 0 || characters[i - 1] === ' ') { var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + var match = buffer.match( + /^([0-9]+(?:\.[0-9]+)?)(ms|s|m) / + ); if (match) { i += match[0].length - 1; var duration = parseFloat(match[1]); @@ -5649,48 +7976,79 @@ default: break; } - advanceFrameBy(durationInMs / this_1.frameTimeFactor); + advanceFrameBy( + durationInMs / this_1.frameTimeFactor + ); break; } } } - throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); + throw new Error( + "there can only be '^' and '!' markers in a " + + "subscription marble diagram. Found instead '" + + c + + "'." + ); } frame = nextFrame; out_i_1 = i; }; - var this_1 = this, out_i_1; + var this_1 = this, + out_i_1; for (var i = 0; i < len; i++) { _loop_1(i); i = out_i_1; } if (unsubscriptionFrame < 0) { return new SubscriptionLog(subscriptionFrame); + } else { + return new SubscriptionLog( + subscriptionFrame, + unsubscriptionFrame + ); + } + }; + TestScheduler.parseMarbles = function ( + marbles, + values, + errorValue, + materializeInnerObservables, + runMode + ) { + var _this = this; + if (materializeInnerObservables === void 0) { + materializeInnerObservables = false; } - else { - return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); + if (runMode === void 0) { + runMode = false; } - }; - TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) { - var _this = this; - if (materializeInnerObservables === void 0) { materializeInnerObservables = false; } - if (runMode === void 0) { runMode = false; } if (marbles.indexOf('!') !== -1) { - throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); + throw new Error( + 'conventional marble diagrams cannot have the ' + + 'unsubscription marker "!"' + ); } var characters = __spreadArray([], __read(marbles)); var len = characters.length; var testMessages = []; - var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); + var subIndex = runMode + ? marbles.replace(/^[ ]+/, '').indexOf('^') + : marbles.indexOf('^'); var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; - var getValue = typeof values !== 'object' - ? function (x) { return x; } - : function (x) { - if (materializeInnerObservables && values[x] instanceof ColdObservable) { - return values[x].messages; - } - return values[x]; - }; + var getValue = + typeof values !== 'object' + ? function (x) { + return x; + } + : function (x) { + if ( + materializeInnerObservables && + values[x] instanceof ColdObservable + ) { + return values[x].messages; + } + return values[x]; + }; var groupStart = -1; var _loop_2 = function (i) { var nextFrame = frame; @@ -5731,7 +8089,9 @@ if (runMode && c.match(/^[0-9]$/)) { if (i === 0 || characters[i - 1] === ' ') { var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + var match = buffer.match( + /^([0-9]+(?:\.[0-9]+)?)(ms|s|m) / + ); if (match) { i += match[0].length - 1; var duration = parseFloat(match[1]); @@ -5750,7 +8110,9 @@ default: break; } - advanceFrameBy(durationInMs / this_2.frameTimeFactor); + advanceFrameBy( + durationInMs / this_2.frameTimeFactor + ); break; } } @@ -5760,12 +8122,16 @@ break; } if (notification) { - testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification }); + testMessages.push({ + frame: groupStart > -1 ? groupStart : frame, + notification: notification + }); } frame = nextFrame; out_i_2 = i; }; - var this_2 = this, out_i_2; + var this_2 = this, + out_i_2; for (var i = 0; i < len; i++) { _loop_2(i); i = out_i_2; @@ -5782,7 +8148,9 @@ var delegate = { requestAnimationFrame: function (callback) { if (!map) { - throw new Error('animate() was not called within run()'); + throw new Error( + 'animate() was not called within run()' + ); } var handle = ++lastHandle; map.set(handle, callback); @@ -5790,23 +8158,38 @@ }, cancelAnimationFrame: function (handle) { if (!map) { - throw new Error('animate() was not called within run()'); + throw new Error( + 'animate() was not called within run()' + ); } map.delete(handle); - }, + } }; var animate = function (marbles) { var e_1, _a; if (map) { - throw new Error('animate() must not be called more than once within run()'); + throw new Error( + 'animate() must not be called more than once within run()' + ); } if (/[|#]/.test(marbles)) { throw new Error('animate() must not complete or error'); } map = new Map(); - var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); + var messages = TestScheduler.parseMarbles( + marbles, + undefined, + undefined, + undefined, + true + ); try { - for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) { + for ( + var messages_1 = __values(messages), + messages_1_1 = messages_1.next(); + !messages_1_1.done; + messages_1_1 = messages_1.next() + ) { var message = messages_1_1.value; _this.schedule(function () { var e_2, _a; @@ -5814,27 +8197,46 @@ var callbacks = Array.from(map.values()); map.clear(); try { - for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) { + for ( + var callbacks_1 = + ((e_2 = void 0), + __values(callbacks)), + callbacks_1_1 = callbacks_1.next(); + !callbacks_1_1.done; + callbacks_1_1 = callbacks_1.next() + ) { var callback = callbacks_1_1.value; callback(now); } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { try { - if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1); + if ( + callbacks_1_1 && + !callbacks_1_1.done && + (_a = callbacks_1.return) + ) + _a.call(callbacks_1); + } finally { + if (e_2) throw e_2.error; } - finally { if (e_2) throw e_2.error; } } }, message.frame); } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { try { - if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1); + if ( + messages_1_1 && + !messages_1_1.done && + (_a = messages_1.return) + ) + _a.call(messages_1); + } finally { + if (e_1) throw e_1.error; } - finally { if (e_1) throw e_1.error; } } }; return { animate: animate, delegate: delegate }; @@ -5846,7 +8248,9 @@ var run = function () { var now = _this.now(); var scheduledRecords = Array.from(scheduleLookup.values()); - var scheduledRecordsDue = scheduledRecords.filter(function (_a) { + var scheduledRecordsDue = scheduledRecords.filter(function ( + _a + ) { var due = _a.due; return due <= now; }); @@ -5855,7 +8259,9 @@ return type === 'immediate'; }); if (dueImmediates.length > 0) { - var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler; + var _a = dueImmediates[0], + handle = _a.handle, + handler = _a.handler; scheduleLookup.delete(handle); handler(); return; @@ -5866,9 +8272,13 @@ }); if (dueIntervals.length > 0) { var firstDueInterval = dueIntervals[0]; - var duration = firstDueInterval.duration, handler = firstDueInterval.handler; + var duration = firstDueInterval.duration, + handler = firstDueInterval.handler; firstDueInterval.due = now + duration; - firstDueInterval.subscription = _this.schedule(run, duration); + firstDueInterval.subscription = _this.schedule( + run, + duration + ); handler(); return; } @@ -5877,7 +8287,9 @@ return type === 'timeout'; }); if (dueTimeouts.length > 0) { - var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler; + var _b = dueTimeouts[0], + handle = _b.handle, + handler = _b.handler; scheduleLookup.delete(handle); handler(); return; @@ -5893,7 +8305,7 @@ handle: handle, handler: handler, subscription: _this.schedule(run, 0), - type: 'immediate', + type: 'immediate' }); return handle; }, @@ -5903,11 +8315,13 @@ value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; var interval = { setInterval: function (handler, duration) { - if (duration === void 0) { duration = 0; } + if (duration === void 0) { + duration = 0; + } var handle = ++lastHandle; scheduleLookup.set(handle, { due: _this.now() + duration, @@ -5915,7 +8329,7 @@ handle: handle, handler: handler, subscription: _this.schedule(run, duration), - type: 'interval', + type: 'interval' }); return handle; }, @@ -5925,11 +8339,13 @@ value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; var timeout = { setTimeout: function (handler, duration) { - if (duration === void 0) { duration = 0; } + if (duration === void 0) { + duration = 0; + } var handle = ++lastHandle; scheduleLookup.set(handle, { due: _this.now() + duration, @@ -5937,7 +8353,7 @@ handle: handle, handler: handler, subscription: _this.schedule(run, duration), - type: 'timeout', + type: 'timeout' }); return handle; }, @@ -5947,9 +8363,13 @@ value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } + }; + return { + immediate: immediate, + interval: interval, + timeout: timeout }; - return { immediate: immediate, interval: interval, timeout: timeout }; }; TestScheduler.prototype.run = function (callback) { var prevFrameTimeFactor = TestScheduler.frameTimeFactor; @@ -5972,14 +8392,13 @@ time: this.createTime.bind(this), expectObservable: this.expectObservable.bind(this), expectSubscriptions: this.expectSubscriptions.bind(this), - animate: animator.animate, + animate: animator.animate }; try { var ret = callback(helpers); this.flush(); return ret; - } - finally { + } finally { TestScheduler.frameTimeFactor = prevFrameTimeFactor; this.maxFrames = prevMaxFrames; this.runMode = false; @@ -5993,11 +8412,9 @@ }; TestScheduler.frameTimeFactor = 10; return TestScheduler; - }(VirtualTimeScheduler)); - - + })(VirtualTimeScheduler); - var _testing = /*#__PURE__*/Object.freeze({ + var _testing = /*#__PURE__*/ Object.freeze({ TestScheduler: TestScheduler }); @@ -6006,8 +8423,7 @@ case 'json': { if ('response' in xhr) { return xhr.response; - } - else { + } else { var ieXHR = xhr; return JSON.parse(ieXHR.responseText); } @@ -6018,8 +8434,7 @@ default: { if ('response' in xhr) { return xhr.response; - } - else { + } else { var ieXHR = xhr; return ieXHR.responseText; } @@ -6029,30 +8444,36 @@ var AjaxResponse = (function () { function AjaxResponse(originalEvent, xhr, request, type) { - if (type === void 0) { type = 'download_load'; } + if (type === void 0) { + type = 'download_load'; + } this.originalEvent = originalEvent; this.xhr = xhr; this.request = request; this.type = type; - var status = xhr.status, responseType = xhr.responseType; + var status = xhr.status, + responseType = xhr.responseType; this.status = status !== null && status !== void 0 ? status : 0; - this.responseType = responseType !== null && responseType !== void 0 ? responseType : ''; + this.responseType = + responseType !== null && responseType !== void 0 + ? responseType + : ''; var allHeaders = xhr.getAllResponseHeaders(); this.responseHeaders = allHeaders - ? - allHeaders.split('\n').reduce(function (headers, line) { - var index = line.indexOf(': '); - headers[line.slice(0, index)] = line.slice(index + 2); - return headers; - }, {}) + ? allHeaders.split('\n').reduce(function (headers, line) { + var index = line.indexOf(': '); + headers[line.slice(0, index)] = line.slice(index + 2); + return headers; + }, {}) : {}; this.response = getXHRResponse(xhr); - var loaded = originalEvent.loaded, total = originalEvent.total; + var loaded = originalEvent.loaded, + total = originalEvent.total; this.loaded = loaded; this.total = total; } return AjaxResponse; - }()); + })(); var AjaxError = createErrorClass(function (_super) { return function AjaxErrorImpl(message, xhr, request) { @@ -6065,8 +8486,7 @@ var response; try { response = getXHRResponse(xhr); - } - catch (err) { + } catch (err) { response = xhr.responseText; } this.response = response; @@ -6095,23 +8515,33 @@ return ajax({ method: 'PUT', url: url, body: body, headers: headers }); } function ajaxPatch(url, body, headers) { - return ajax({ method: 'PATCH', url: url, body: body, headers: headers }); + return ajax({ + method: 'PATCH', + url: url, + body: body, + headers: headers + }); } - var mapResponse = map(function (x) { return x.response; }); + var mapResponse = map(function (x) { + return x.response; + }); function ajaxGetJSON(url, headers) { - return mapResponse(ajax({ - method: 'GET', - url: url, - headers: headers, - })); + return mapResponse( + ajax({ + method: 'GET', + url: url, + headers: headers + }) + ); } var ajax = (function () { var create = function (urlOrConfig) { - var config = typeof urlOrConfig === 'string' - ? { - url: urlOrConfig, - } - : urlOrConfig; + var config = + typeof urlOrConfig === 'string' + ? { + url: urlOrConfig + } + : urlOrConfig; return fromAjax(config); }; create.get = ajaxGet; @@ -6130,8 +8560,20 @@ function fromAjax(init) { return new Observable(function (destination) { var _a, _b; - var config = __assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init); - var queryParams = config.queryParams, configuredBody = config.body, configuredHeaders = config.headers; + var config = __assign( + { + async: true, + crossDomain: false, + withCredentials: false, + method: 'GET', + timeout: 0, + responseType: 'json' + }, + init + ); + var queryParams = config.queryParams, + configuredBody = config.body, + configuredHeaders = config.headers; var url = config.url; if (!url) { throw new TypeError('url is required'); @@ -6144,10 +8586,14 @@ throw new TypeError('invalid url'); } searchParams_1 = new URLSearchParams(parts[1]); - new URLSearchParams(queryParams).forEach(function (value, key) { return searchParams_1.set(key, value); }); + new URLSearchParams(queryParams).forEach(function ( + value, + key + ) { + return searchParams_1.set(key, value); + }); url = parts[0] + '?' + searchParams_1; - } - else { + } else { searchParams_1 = new URLSearchParams(queryParams); url = url + '?' + searchParams_1; } @@ -6164,33 +8610,79 @@ if (!crossDomain && !('x-requested-with' in headers)) { headers['x-requested-with'] = 'XMLHttpRequest'; } - var withCredentials = config.withCredentials, xsrfCookieName = config.xsrfCookieName, xsrfHeaderName = config.xsrfHeaderName; - if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { - var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(" + xsrfCookieName + ")=([^;]*)"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : ''; + var withCredentials = config.withCredentials, + xsrfCookieName = config.xsrfCookieName, + xsrfHeaderName = config.xsrfHeaderName; + if ( + (withCredentials || !crossDomain) && + xsrfCookieName && + xsrfHeaderName + ) { + var xsrfCookie = + (_b = + (_a = + document === null || document === void 0 + ? void 0 + : document.cookie.match( + new RegExp( + '(^|;\\s*)(' + + xsrfCookieName + + ')=([^;]*)' + ) + )) === null || _a === void 0 + ? void 0 + : _a.pop()) !== null && _b !== void 0 + ? _b + : ''; if (xsrfCookie) { headers[xsrfHeaderName] = xsrfCookie; } } - var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); - var _request = __assign(__assign({}, config), { url: url, + var body = extractContentTypeAndMaybeSerializeBody( + configuredBody, + headers + ); + var _request = __assign(__assign({}, config), { + url: url, headers: headers, - body: body }); + body: body + }); var xhr; xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); { - var progressSubscriber_1 = init.progressSubscriber, _c = init.includeDownloadProgress, includeDownloadProgress = _c === void 0 ? false : _c, _d = init.includeUploadProgress, includeUploadProgress = _d === void 0 ? false : _d; + var progressSubscriber_1 = init.progressSubscriber, + _c = init.includeDownloadProgress, + includeDownloadProgress = _c === void 0 ? false : _c, + _d = init.includeUploadProgress, + includeUploadProgress = _d === void 0 ? false : _d; var addErrorEvent = function (type, errorFactory) { xhr.addEventListener(type, function () { var _a; var error = errorFactory(); - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, error); + (_a = + progressSubscriber_1 === null || + progressSubscriber_1 === void 0 + ? void 0 + : progressSubscriber_1.error) === null || + _a === void 0 + ? void 0 + : _a.call(progressSubscriber_1, error); destination.error(error); }); }; - addErrorEvent('timeout', function () { return new AjaxTimeoutError(xhr, _request); }); - addErrorEvent('abort', function () { return new AjaxError('aborted', xhr, _request); }); + addErrorEvent('timeout', function () { + return new AjaxTimeoutError(xhr, _request); + }); + addErrorEvent('abort', function () { + return new AjaxError('aborted', xhr, _request); + }); var createResponse_1 = function (direction, event) { - return new AjaxResponse(event, xhr, _request, direction + "_" + event.type); + return new AjaxResponse( + event, + xhr, + _request, + direction + '_' + event.type + ); }; var addProgressEvent_1 = function (target, type, direction) { target.addEventListener(type, function (event) { @@ -6198,13 +8690,29 @@ }); }; if (includeUploadProgress) { - [LOADSTART, PROGRESS, LOAD].forEach(function (type) { return addProgressEvent_1(xhr.upload, type, UPLOAD); }); + [LOADSTART, PROGRESS, LOAD].forEach(function (type) { + return addProgressEvent_1(xhr.upload, type, UPLOAD); + }); } if (progressSubscriber_1) { - [LOADSTART, PROGRESS].forEach(function (type) { return xhr.upload.addEventListener(type, function (e) { var _a; return (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); }); }); + [LOADSTART, PROGRESS].forEach(function (type) { + return xhr.upload.addEventListener(type, function (e) { + var _a; + return (_a = + progressSubscriber_1 === null || + progressSubscriber_1 === void 0 + ? void 0 + : progressSubscriber_1.next) === null || + _a === void 0 + ? void 0 + : _a.call(progressSubscriber_1, e); + }); + }); } if (includeDownloadProgress) { - [LOADSTART, PROGRESS].forEach(function (type) { return addProgressEvent_1(xhr, type, DOWNLOAD); }); + [LOADSTART, PROGRESS].forEach(function (type) { + return addProgressEvent_1(xhr, type, DOWNLOAD); + }); } var emitError_1 = function (status) { var msg = 'ajax error' + (status ? ' ' + status : ''); @@ -6212,36 +8720,56 @@ }; xhr.addEventListener('error', function (e) { var _a; - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); + (_a = + progressSubscriber_1 === null || + progressSubscriber_1 === void 0 + ? void 0 + : progressSubscriber_1.error) === null || + _a === void 0 + ? void 0 + : _a.call(progressSubscriber_1, e); emitError_1(); }); xhr.addEventListener(LOAD, function (event) { var _a, _b; var status = xhr.status; if (status < 400) { - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1); + (_a = + progressSubscriber_1 === null || + progressSubscriber_1 === void 0 + ? void 0 + : progressSubscriber_1.complete) === null || + _a === void 0 + ? void 0 + : _a.call(progressSubscriber_1); var response = void 0; try { response = createResponse_1(DOWNLOAD, event); - } - catch (err) { + } catch (err) { destination.error(err); return; } destination.next(response); destination.complete(); - } - else { - (_b = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber_1, event); + } else { + (_b = + progressSubscriber_1 === null || + progressSubscriber_1 === void 0 + ? void 0 + : progressSubscriber_1.error) === null || + _b === void 0 + ? void 0 + : _b.call(progressSubscriber_1, event); emitError_1(status); } }); } - var user = _request.user, method = _request.method, async = _request.async; + var user = _request.user, + method = _request.method, + async = _request.async; if (user) { xhr.open(method, url, async, user, _request.password); - } - else { + } else { xhr.open(method, url, async); } if (async) { @@ -6258,8 +8786,7 @@ } if (body) { xhr.send(body); - } - else { + } else { xhr.send(); } return function () { @@ -6271,28 +8798,33 @@ } function extractContentTypeAndMaybeSerializeBody(body, headers) { var _a; - if (!body || + if ( + !body || typeof body === 'string' || isFormData(body) || isURLSearchParams(body) || isArrayBuffer(body) || isFile(body) || isBlob(body) || - isReadableStream(body)) { + isReadableStream(body) + ) { return body; } if (isArrayBufferView(body)) { return body.buffer; } if (typeof body === 'object') { - headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8'; + headers['content-type'] = + (_a = headers['content-type']) !== null && _a !== void 0 + ? _a + : 'application/json;charset=utf-8'; return JSON.stringify(body); } throw new TypeError('Unknown body type'); } var _toString = Object.prototype.toString; function toStringCheck(obj, name) { - return _toString.call(obj) === "[object " + name + "]"; + return _toString.call(obj) === '[object ' + name + ']'; } function isArrayBuffer(body) { return toStringCheck(body, 'ArrayBuffer'); @@ -6310,15 +8842,19 @@ return typeof FormData !== 'undefined' && body instanceof FormData; } function isURLSearchParams(body) { - return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; + return ( + typeof URLSearchParams !== 'undefined' && + body instanceof URLSearchParams + ); } function isReadableStream(body) { - return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; + return ( + typeof ReadableStream !== 'undefined' && + body instanceof ReadableStream + ); } - - - var _ajax = /*#__PURE__*/Object.freeze({ + var _ajax = /*#__PURE__*/ Object.freeze({ ajax: ajax, AjaxError: AjaxError, AjaxTimeoutError: AjaxTimeoutError, @@ -6327,10 +8863,15 @@ var DEFAULT_WEBSOCKET_CONFIG = { url: '', - deserializer: function (e) { return JSON.parse(e.data); }, - serializer: function (value) { return JSON.stringify(value); }, + deserializer: function (e) { + return JSON.parse(e.data); + }, + serializer: function (value) { + return JSON.stringify(value); + } }; - var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; + var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = + 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; var WebSocketSubject = (function (_super) { __extends(WebSocketSubject, _super); function WebSocketSubject(urlConfigOrSource, destination) { @@ -6339,14 +8880,15 @@ if (urlConfigOrSource instanceof Observable) { _this.destination = destination; _this.source = urlConfigOrSource; - } - else { - var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG)); + } else { + var config = (_this._config = __assign( + {}, + DEFAULT_WEBSOCKET_CONFIG + )); _this._output = new Subject(); if (typeof urlConfigOrSource === 'string') { config.url = urlConfigOrSource; - } - else { + } else { for (var key in urlConfigOrSource) { if (urlConfigOrSource.hasOwnProperty(key)) { config[key] = urlConfigOrSource[key]; @@ -6355,8 +8897,7 @@ } if (!config.WebSocketCtor && WebSocket) { config.WebSocketCtor = WebSocket; - } - else if (!config.WebSocketCtor) { + } else if (!config.WebSocketCtor) { throw new Error('no WebSocket constructor can be found'); } _this.destination = new ReplaySubject(); @@ -6376,30 +8917,39 @@ } this._output = new Subject(); }; - WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) { + WebSocketSubject.prototype.multiplex = function ( + subMsg, + unsubMsg, + messageFilter + ) { var self = this; return new Observable(function (observer) { try { self.next(subMsg()); - } - catch (err) { + } catch (err) { observer.error(err); } - var subscription = self.subscribe(function (x) { - try { - if (messageFilter(x)) { - observer.next(x); + var subscription = self.subscribe({ + next: function (x) { + try { + if (messageFilter(x)) { + observer.next(x); + } + } catch (err) { + observer.error(err); } + }, + error: function (err) { + return observer.error(err); + }, + complete: function () { + return observer.complete(); } - catch (err) { - observer.error(err); - } - }, function (err) { return observer.error(err); }, function () { return observer.complete(); }); + }); return function () { try { self.next(unsubMsg()); - } - catch (err) { + } catch (err) { observer.error(err); } subscription.unsubscribe(); @@ -6408,17 +8958,22 @@ }; WebSocketSubject.prototype._connectSocket = function () { var _this = this; - var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType; + var _a = this._config, + WebSocketCtor = _a.WebSocketCtor, + protocol = _a.protocol, + url = _a.url, + binaryType = _a.binaryType; var observer = this._output; var socket = null; try { - socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); + socket = protocol + ? new WebSocketCtor(url, protocol) + : new WebSocketCtor(url); this._socket = socket; if (binaryType) { this._socket.binaryType = binaryType; } - } - catch (e) { + } catch (e) { observer.error(e); return; } @@ -6440,36 +8995,42 @@ openObserver.next(evt); } var queue = _this.destination; - _this.destination = Subscriber.create(function (x) { - if (socket.readyState === 1) { - try { - var serializer = _this._config.serializer; - socket.send(serializer(x)); + _this.destination = Subscriber.create( + function (x) { + if (socket.readyState === 1) { + try { + var serializer = _this._config.serializer; + socket.send(serializer(x)); + } catch (e) { + _this.destination.error(e); + } } - catch (e) { - _this.destination.error(e); + }, + function (err) { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); } + if (err && err.code) { + socket.close(err.code, err.reason); + } else { + observer.error( + new TypeError( + WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT + ) + ); + } + _this._resetState(); + }, + function () { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); + } + socket.close(); + _this._resetState(); } - }, function (err) { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - if (err && err.code) { - socket.close(err.code, err.reason); - } - else { - observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); - } - _this._resetState(); - }, function () { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - socket.close(); - _this._resetState(); - }); + ); if (queue && queue instanceof ReplaySubject) { subscription.add(queue.subscribe(_this.destination)); } @@ -6488,8 +9049,7 @@ } if (e.wasClean) { observer.complete(); - } - else { + } else { observer.error(e); } }; @@ -6497,8 +9057,7 @@ try { var deserializer = _this._config.deserializer; observer.next(deserializer(e)); - } - catch (err) { + } catch (err) { observer.error(err); } }; @@ -6516,7 +9075,10 @@ subscriber.add(function () { var _socket = _this._socket; if (_this._output.observers.length === 0) { - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + if ( + _socket && + (_socket.readyState === 1 || _socket.readyState === 0) + ) { _socket.close(); } _this._resetState(); @@ -6526,29 +9088,33 @@ }; WebSocketSubject.prototype.unsubscribe = function () { var _socket = this._socket; - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + if ( + _socket && + (_socket.readyState === 1 || _socket.readyState === 0) + ) { _socket.close(); } this._resetState(); _super.prototype.unsubscribe.call(this); }; return WebSocketSubject; - }(AnonymousSubject)); + })(AnonymousSubject); function webSocket(urlConfigOrSource) { return new WebSocketSubject(urlConfigOrSource); } - - - var _webSocket = /*#__PURE__*/Object.freeze({ + var _webSocket = /*#__PURE__*/ Object.freeze({ webSocket: webSocket, WebSocketSubject: WebSocketSubject }); function fromFetch(input, initWithSelector) { - if (initWithSelector === void 0) { initWithSelector = {}; } - var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]); + if (initWithSelector === void 0) { + initWithSelector = {}; + } + var selector = initWithSelector.selector, + init = __rest(initWithSelector, ['selector']); return new Observable(function (subscriber) { var controller = new AbortController(); var signal = controller.signal; @@ -6557,36 +9123,48 @@ if (outerSignal) { if (outerSignal.aborted) { controller.abort(); - } - else { + } else { var outerSignalHandler_1 = function () { if (!signal.aborted) { controller.abort(); } }; outerSignal.addEventListener('abort', outerSignalHandler_1); - subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); }); + subscriber.add(function () { + return outerSignal.removeEventListener( + 'abort', + outerSignalHandler_1 + ); + }); } } - var perSubscriberInit = __assign(__assign({}, init), { signal: signal }); + var perSubscriberInit = __assign(__assign({}, init), { + signal: signal + }); var handleError = function (err) { abortable = false; subscriber.error(err); }; fetch(input, perSubscriberInit) .then(function (response) { - if (selector) { - innerFrom(selector(response)).subscribe(new OperatorSubscriber(subscriber, undefined, function () { + if (selector) { + innerFrom(selector(response)).subscribe( + createOperatorSubscriber( + subscriber, + undefined, + function () { + abortable = false; + subscriber.complete(); + }, + handleError + ) + ); + } else { abortable = false; + subscriber.next(response); subscriber.complete(); - }, handleError)); - } - else { - abortable = false; - subscriber.next(response); - subscriber.complete(); - } - }) + } + }) .catch(handleError); return function () { if (abortable) { @@ -6596,9 +9174,7 @@ }); } - - - var _fetch = /*#__PURE__*/Object.freeze({ + var _fetch = /*#__PURE__*/ Object.freeze({ fromFetch: fromFetch }); @@ -6786,8 +9362,6 @@ exports.zipWith = zipWith; Object.defineProperty(exports, '__esModule', { value: true }); - -}))); +}); //# sourceMappingURL=rxjs.umd.js.map - diff --git a/node_modules/rxjs/dist/bundles/rxjs.umd.min.js b/node_modules/rxjs/dist/bundles/rxjs.umd.min.js index 2e14f3769..bd4c3fcaf 100644 --- a/node_modules/rxjs/dist/bundles/rxjs.umd.min.js +++ b/node_modules/rxjs/dist/bundles/rxjs.umd.min.js @@ -21,175 +21,6511 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *****************************************************************************/ -(function(g,w){"object"===typeof exports&&"undefined"!==typeof module?w(exports):"function"===typeof define&&define.amd?define("rxjs",["exports"],w):w(g.rxjs={})})(this,function(g){function w(b,a){function c(){this.constructor=b}if("function"!==typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");Ra(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}function Xd(b,a){var c={},d;for(d in b)Object.prototype.hasOwnProperty.call(b, -d)&&0>a.indexOf(d)&&(c[d]=b[d]);if(null!=b&&"function"===typeof Object.getOwnPropertySymbols){var e=0;for(d=Object.getOwnPropertySymbols(b);ea.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(b,d[e])&&(c[d[e]]=b[d[e]])}return c}function Yd(b,a,c,d){function e(a){return a instanceof c?a:new c(function(b){b(a)})}return new (c||(c=Promise))(function(c,h){function f(a){try{v(d.next(a))}catch(y){h(y)}}function k(a){try{v(d["throw"](a))}catch(y){h(y)}}function v(a){a.done?c(a.value): -e(a.value).then(f,k)}v((d=d.apply(b,a||[])).next())})}function Sa(b,a){function c(a){return function(b){return d([a,b])}}function d(c){if(f)throw new TypeError("Generator is already executing.");for(;e;)try{if(f=1,h&&(l=c[0]&2?h["return"]:c[0]?h["throw"]||((l=h["return"])&&l.call(h),0):h.next)&&!(l=l.call(h,c[1])).done)return l;if(h=0,l)c=[c[0]&2,l.value];switch(c[0]){case 0:case 1:l=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++;h=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop(); -continue;default:if(!(l=e.trys,l=0l[0]&&c[1]=b.length&&(b=void 0);return{value:b&&b[d++],done:!b}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.");}function z(b,a){var c="function"===typeof Symbol&&b[Symbol.iterator];if(!c)return b;b= -c.call(b);var d,e=[],f;try{for(;(void 0===a||0=b._refCount||0<--b._refCount)c=null;else{var d=b._connection,f=c;c=null;!d||f&&d!==f||d.unsubscribe();a.unsubscribe()}});b.subscribe(d);d.closed||(c=b.connect())})}function Lb(b){var a=U.schedule;return new q(function(c){var d=new D,e=b||Da,f=e.now(),h=function(l){var k=e.now();c.next({timestamp:b?k:l,elapsed:k-f});c.closed|| -d.add(a(h))};d.add(a(h));return d})}function Mb(b){return b in Xa?(delete Xa[b],!0):!1}function be(b){return new q(function(a){return b.schedule(function(){return a.complete()})})}function Ea(b){return b&&p(b.schedule)}function na(b){return p(b[b.length-1])?b.pop():void 0}function Q(b){return Ea(b[b.length-1])?b.pop():void 0}function Nb(b){return Symbol.asyncIterator&&p(null===b||void 0===b?void 0:b[Symbol.asyncIterator])}function Ob(b){return new TypeError("You provided "+(null!==b&&"object"===typeof b? -"an invalid object":"'"+b+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Pb(b){return p(null===b||void 0===b?void 0:b[Ya])}function Qb(b){return Zd(this,arguments,function(){var a,c,d,e;return Sa(this,function(f){switch(f.label){case 0:a=b.getReader(),f.label=1;case 1:f.trys.push([1,,9,10]),f.label=2;case 2:return[4,da(a.read())];case 3:return c=f.sent(),d=c.value,(e=c.done)?[4,da(void 0)]:[3,5];case 4:return[2, -f.sent()];case 5:return[4,da(d)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return a.releaseLock(),[7];case 10:return[2]}})})}function u(b){if(b instanceof q)return b;if(null!=b){if(p(b[oa]))return ce(b);if(Za(b))return de(b);if(p(null===b||void 0===b?void 0:b.then))return ee(b);if(Nb(b))return Rb(b);if(Pb(b))return fe(b);if(p(null===b||void 0===b?void 0:b.getReader))return Rb(Qb(b))}throw Ob(b);}function ce(b){return new q(function(a){var c=b[oa]();if(p(c.subscribe))return c.subscribe(a); -throw new TypeError("Provided object does not correctly implement Symbol.observable");})}function de(b){return new q(function(a){for(var c=0;ce&&(e=0);var h=0;return c.schedule(function(){a.closed||(a.next(h++),0<=d?this.schedule(void 0,d):a.complete())},e)})}function dc(b,a){void 0===b&&(b=0);void 0===a&&(a=I);0>b&&(b=0);return Y(b,b,a)}function Z(b){return 1=== -b.length&&ve(b[0])?b[0]:b}function ec(){for(var b=[],a=0;a=b?function(){return M}:n(function(a,c){var d=0;a.subscribe(new m(c,function(a){++d<=b&&(c.next(a),b<=d&&c.complete())}))})}function lb(){return n(function(b,a){b.subscribe(new m(a,B))})}function mb(b){return N(function(){return b})} -function La(b,a){return a?function(c){return sa(a.pipe(aa(1),lb()),c.pipe(La(b)))}:H(function(a,d){return b(a,d).pipe(aa(1),mb(a))})}function wc(b,a){void 0===a&&(a=I);var c=Y(b,a);return La(function(){return c})}function xc(){return n(function(b,a){b.subscribe(new m(a,function(b){return Fa(b,a)}))})}function yc(b,a){return n(function(c,d){var e=new Set;c.subscribe(new m(d,function(a){var c=b?b(a):a;e.has(c)||(e.add(c),d.next(a))}));null===a||void 0===a?void 0:a.subscribe(new m(d,function(){return e.clear()}, -B))})}function nb(b,a){void 0===a&&(a=E);b=null!==b&&void 0!==b?b:Be;return n(function(c,d){var e,f=!0;c.subscribe(new m(d,function(c){var h=a(c);if(f||!b(e,h))f=!1,e=h,d.next(c)}))})}function Be(b,a){return b===a}function zc(b,a){return nb(function(c,d){return a?a(c[b],d[b]):c[b]===d[b]})}function va(b){void 0===b&&(b=Ce);return n(function(a,c){var d=!1;a.subscribe(new m(c,function(a){d=!0;c.next(a)},function(){return d?c.complete():c.error(b())}))})}function Ce(){return new ba}function Ac(b,a){if(0> -b)throw new ob;var c=2<=arguments.length;return function(d){return d.pipe(O(function(a,c){return c===b}),aa(1),c?ua(a):va(function(){return new ob}))}}function Bc(){for(var b=[],a=0;a(a||0)?Infinity:a;return n(function(d,e){return db(d,e,b,a,void 0,!0,c)})}function Ec(b){return n(function(a,c){try{a.subscribe(c)}finally{c.add(b)}})}function Fc(b,a){return n(Gc(b,a,"value"))}function Gc(b,a,c){var d="index"===c;return function(c,f){var e=0;c.subscribe(new m(f,function(h){var l=e++;b.call(a,h,l,c)&&(f.next(d?l:h),f.complete())},function(){f.next(d?-1:void 0);f.complete()}))}}function Hc(b,a){return n(Gc(b,a,"index"))}function Ic(b,a){var c=2<=arguments.length;return function(d){return d.pipe(b? -O(function(a,c){return b(a,c,d)}):E,aa(1),c?ua(a):va(function(){return new ba}))}}function Jc(b,a,c,d){return n(function(e,f){function h(a,b){var c=new q(function(a){y.activeGroups++;var c=b.subscribe(a);return function(){c.unsubscribe();0===--y.activeGroups&&y.teardownAttempted&&y.unsubscribe()}});c.key=a;return c}var l;a&&"function"!==typeof a?(c=a.duration,l=a.element,d=a.connector):l=a;var k=new Map,g=function(a){k.forEach(a);a(f)},r=function(a){return g(function(b){return b.error(a)})},y=new De(f, -function(a){try{var e=b(a),g=k.get(e);if(!g){k.set(e,g=d?d():new C);var v=h(e,g);f.next(v);if(c){var x=new m(g,function(){g.complete();null===x||void 0===x?void 0:x.unsubscribe()},void 0,void 0,function(){return k.delete(e)});y.add(u(c(v)).subscribe(x))}}g.next(l?l(a):a)}catch(J){r(J)}},function(){return g(function(a){return a.complete()})},r,function(){return k.clear()});e.subscribe(y)})}function Kc(){return n(function(b,a){b.subscribe(new m(a,function(){a.next(!1);a.complete()},function(){a.next(!0); -a.complete()}))})}function qb(b){return 0>=b?function(){return M}:n(function(a,c){var d=[];a.subscribe(new m(c,function(a){d.push(a);bb?a:b})}function Oc(b,a,c){void 0===c&&(c=Infinity);if(p(a))return H(function(){return b},a,c);"number"===typeof a&&(c=a);return H(function(){return b},c)}function Pc(b, -a,c){void 0===c&&(c=Infinity);return n(function(d,e){var f=a;return db(d,e,function(a,c){return b(f,a,c)},c,function(a){f=a},!1,void 0,function(){return f=null})})}function Qc(){for(var b=[],a=0;ab(a,c)?a:c}:function(a,b){return a=c?function(){return M}:n(function(a,b){var e=0,f,k=function(){null===f||void 0===f?void 0:f.unsubscribe();f=null;if(null!=d){var a="number"===typeof d?Y(d):u(d(e)),c=new m(b,function(){c.unsubscribe();g()});a.subscribe(c)}else g()},g=function(){var d=!1;f=a.subscribe(new m(b,void 0,function(){++e=c?E:n(function(a,b){var f=0,h,g=function(){var l=!1;h=a.subscribe(new m(b,function(a){e&&(f=0);b.next(a)},void 0,function(a){if(f++=b?E:n(function(a, -c){var d=Array(b),e=0;a.subscribe(new m(c,function(a){var f=e++;if(fe){null===(c=null===q||void 0===q?void 0:q.complete)||void 0===c?void 0:c.call(q);c=void 0;try{c=new xb(b,t,p,Md+"_"+b.type)}catch(we){a.error(we); -return}a.next(c);a.complete()}else null===(d=null===q||void 0===q?void 0:q.error)||void 0===d?void 0:d.call(q,b),J(e)});e=p.user;d=p.method;h=p.async;e?t.open(d,k,h,e,p.password):t.open(d,k,h);h&&(t.timeout=p.timeout,t.responseType=p.responseType);"withCredentials"in t&&(t.withCredentials=p.withCredentials);for(r in f)f.hasOwnProperty(r)&&t.setRequestHeader(r,f[r]);c?t.send(c):t.send();return function(){t&&4!==t.readyState&&t.abort()}})}function Ne(b,a){var c;if(!b||"string"===typeof b||"undefined"!== -typeof FormData&&b instanceof FormData||"undefined"!==typeof URLSearchParams&&b instanceof URLSearchParams||Ab(b,"ArrayBuffer")||Ab(b,"File")||Ab(b,"Blob")||"undefined"!==typeof ReadableStream&&b instanceof ReadableStream)return b;if("undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView(b))return b.buffer;if("object"===typeof b)return a["content-type"]=null!==(c=a["content-type"])&&void 0!==c?c:"application/json;charset\x3dutf-8",JSON.stringify(b);throw new TypeError("Unknown body type");}function Ab(b, -a){return Pe.call(b)==="[object "+a+"]"}var Ra=function(b,a){Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])};return Ra(b,a)},V=function(){V=Object.assign||function(b){for(var a,c=1,d=arguments.length;ca&&hb.index?1:-1:a.delay>b.delay?1:-1};return a}(za),M=new q(function(b){return b.complete()}),Za=function(b){return b&&"number"===typeof b.length&&"function"!==typeof b},Ya;Ya="function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";(function(b){b.NEXT="N";b.ERROR="E";b.COMPLETE="C"})(g.NotificationKind||(g.NotificationKind={}));var Na=function(){function b(a, -b,d){this.kind=a;this.value=b;this.error=d;this.hasValue="N"===a}b.prototype.observe=function(a){return Fa(this,a)};b.prototype.do=function(a,b,d){var c=this.kind,f=this.value,h=this.error;return"N"===c?null===a||void 0===a?void 0:a(f):"E"===c?null===b||void 0===b?void 0:b(h):null===d||void 0===d?void 0:d()};b.prototype.accept=function(a,b,d){return p(null===a||void 0===a?void 0:a.next)?this.observe(a):this.do(a,b,d)};b.prototype.toObservable=function(){var a=this.kind,b=this.value,d=this.error,b= -"N"===a?$a(b):"E"===a?Vb(function(){return d}):"C"===a?M:0;if(!b)throw new TypeError("Unexpected notification kind "+a);return b};b.createNext=function(a){return new b("N",a)};b.createError=function(a){return new b("E",void 0,a)};b.createComplete=function(){return b.completeNotification};b.completeNotification=new b("C");return b}(),ba=S(function(b){return function(){b(this);this.name="EmptyError";this.message="no elements in sequence"}}),ob=S(function(b){return function(){b(this);this.name="ArgumentOutOfRangeError"; -this.message="argument out of range"}}),id=S(function(b){return function(a){b(this);this.name="NotFoundError";this.message=a}}),hd=S(function(b){return function(a){b(this);this.name="SequenceError";this.message=a}}),Wb=S(function(b){return function(a){void 0===a&&(a=null);b(this);this.message="Timeout has occurred";this.name="TimeoutError";this.info=a}}),ke=Array.isArray,le=Array.isArray,me=Object.getPrototypeOf,ne=Object.prototype,oe=Object.keys,Ye={connector:function(){return new C},resetOnDisconnect:!0}, -se=["addListener","removeListener"],qe=["addEventListener","removeEventListener"],ue=["on","off"],Td=new q(B),ve=Array.isArray,ye=function(b,a){return b.push(a),b},Ae={connector:function(){return new C}},De=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.activeGroups=0;a.teardownAttempted=!1;return a}w(a,b);a.prototype.unsubscribe=function(){this.teardownAttempted=!0;0===this.activeGroups&&b.prototype.unsubscribe.call(this)};return a}(m),ud={leading:!0,trailing:!1},Ee=function(){return function(b, -a){this.value=b;this.interval=a}}(),Ze=Object.freeze({audit:hb,auditTime:hc,buffer:ic,bufferCount:jc,bufferTime:kc,bufferToggle:lc,bufferWhen:mc,catchError:ib,combineAll:Ia,combineLatestAll:Ia,combineLatest:kb,combineLatestWith:pc,concat:rc,concatAll:Ha,concatMap:Ja,concatMapTo:qc,concatWith:sc,connect:Ka,count:tc,debounce:uc,debounceTime:vc,defaultIfEmpty:ua,delay:wc,delayWhen:La,dematerialize:xc,distinct:yc,distinctUntilChanged:nb,distinctUntilKeyChanged:zc,elementAt:Ac,endWith:Bc,every:Cc,exhaust:Ma, -exhaustAll:Ma,exhaustMap:pb,expand:Dc,filter:O,finalize:Ec,find:Fc,findIndex:Hc,first:Ic,groupBy:Jc,ignoreElements:lb,isEmpty:Kc,last:Lc,map:N,mapTo:mb,materialize:Mc,max:Nc,merge:Qc,mergeAll:ra,flatMap:H,mergeMap:H,mergeMapTo:Oc,mergeScan:Pc,mergeWith:Rc,min:Sc,multicast:Oa,observeOn:pa,onErrorResumeNext:ec,pairwise:Tc,partition:function(b,a){return function(c){return[O(b,a)(c),O(fc(b,a))(c)]}},pluck:Uc,publish:Vc,publishBehavior:Wc,publishLast:Yc,publishReplay:Zc,race:function(){for(var b=[],a= -0;ak?new Ba(l):new Ba(l,k)};a.parseMarbles=function(a, -b,e,f,g){var c=this;void 0===f&&(f=!1);void 0===g&&(g=!1);if(-1!==a.indexOf("!"))throw Error('conventional marble diagrams cannot have the unsubscription marker "!"');var d=A([],z(a)),h=d.length,m=[];a=g?a.replace(/^[ ]+/,"").indexOf("^"):a.indexOf("^");var n=-1===a?0:a*-this.frameTimeFactor,p="object"!==typeof b?function(a){return a}:function(a){return f&&b[a]instanceof Fb?b[a].messages:b[a]},q=-1;a=function(a){var b=n,f=function(a){b+=a*c.frameTimeFactor},h=void 0,k=d[a];switch(k){case " ":g||f(1); -break;case "-":f(1);break;case "(":q=n;f(1);break;case ")":q=-1;f(1);break;case "|":h=ya;f(1);break;case "^":f(1);break;case "#":h=K("E",void 0,e||"error");f(1);break;default:if(g&&k.match(/^[0-9]$/)&&(0===a||" "===d[a-1])){var l=d.slice(a).join("").match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(l){a+=l[0].length-1;var k=parseFloat(l[1]),r=void 0;switch(l[2]){case "ms":r=k;break;case "s":r=1E3*k;break;case "m":r=6E4*k}f(r/t.frameTimeFactor);break}}h=K("N",p(k),void 0);f(1)}h&&m.push({frame:-1=a)return M; -var d=a+b;return new q(c?function(a){var e=b;return c.schedule(function(){e a.indexOf(d) && + (c[d] = b[d]); + if (null != b && 'function' === typeof Object.getOwnPropertySymbols) { + var e = 0; + for (d = Object.getOwnPropertySymbols(b); e < d.length; e++) + 0 > a.indexOf(d[e]) && + Object.prototype.propertyIsEnumerable.call(b, d[e]) && + (c[d[e]] = b[d[e]]); + } + return c; + } + function Yd(b, a, c, d) { + function e(a) { + return a instanceof c + ? a + : new c(function (b) { + b(a); + }); + } + return new (c || (c = Promise))(function (c, h) { + function f(a) { + try { + v(d.next(a)); + } catch (y) { + h(y); + } + } + function k(a) { + try { + v(d['throw'](a)); + } catch (y) { + h(y); + } + } + function v(a) { + a.done ? c(a.value) : e(a.value).then(f, k); + } + v((d = d.apply(b, a || [])).next()); + }); + } + function Sa(b, a) { + function c(a) { + return function (b) { + return d([a, b]); + }; + } + function d(c) { + if (f) throw new TypeError('Generator is already executing.'); + for (; e; ) + try { + if ( + ((f = 1), + h && + (l = + c[0] & 2 + ? h['return'] + : c[0] + ? h['throw'] || + ((l = h['return']) && l.call(h), 0) + : h.next) && + !(l = l.call(h, c[1])).done) + ) + return l; + if (((h = 0), l)) c = [c[0] & 2, l.value]; + switch (c[0]) { + case 0: + case 1: + l = c; + break; + case 4: + return e.label++, { value: c[1], done: !1 }; + case 5: + e.label++; + h = c[1]; + c = [0]; + continue; + case 7: + c = e.ops.pop(); + e.trys.pop(); + continue; + default: + if ( + !((l = e.trys), + (l = 0 < l.length && l[l.length - 1])) && + (6 === c[0] || 2 === c[0]) + ) { + e = 0; + continue; + } + if ( + 3 === c[0] && + (!l || (c[1] > l[0] && c[1] < l[3])) + ) + e.label = c[1]; + else if (6 === c[0] && e.label < l[1]) + (e.label = l[1]), (l = c); + else if (l && e.label < l[2]) + (e.label = l[2]), e.ops.push(c); + else { + l[2] && e.ops.pop(); + e.trys.pop(); + continue; + } + } + c = a.call(b, e); + } catch (r) { + (c = [6, r]), (h = 0); + } finally { + f = l = 0; + } + if (c[0] & 5) throw c[1]; + return { value: c[0] ? c[1] : void 0, done: !0 }; + } + var e = { + label: 0, + sent: function () { + if (l[0] & 1) throw l[1]; + return l[1]; + }, + trys: [], + ops: [] + }, + f, + h, + l, + k; + return ( + (k = { next: c(0), throw: c(1), return: c(2) }), + 'function' === typeof Symbol && + (k[Symbol.iterator] = function () { + return this; + }), + k + ); + } + function F(b) { + var a = 'function' === typeof Symbol && Symbol.iterator, + c = a && b[a], + d = 0; + if (c) return c.call(b); + if (b && 'number' === typeof b.length) + return { + next: function () { + b && d >= b.length && (b = void 0); + return { value: b && b[d++], done: !b }; + } + }; + throw new TypeError( + a ? 'Object is not iterable.' : 'Symbol.iterator is not defined.' + ); + } + function z(b, a) { + var c = 'function' === typeof Symbol && b[Symbol.iterator]; + if (!c) return b; + b = c.call(b); + var d, + e = [], + f; + try { + for (; (void 0 === a || 0 < a--) && !(d = b.next()).done; ) + e.push(d.value); + } catch (h) { + f = { error: h }; + } finally { + try { + d && !d.done && (c = b['return']) && c.call(b); + } finally { + if (f) throw f.error; + } + } + return e; + } + function A(b, a, c) { + if (c || 2 === arguments.length) + for (var d = 0, e = a.length, f; d < e; d++) + (!f && d in a) || + (f || (f = Array.prototype.slice.call(a, 0, d)), + (f[d] = a[d])); + return b.concat(f || Array.prototype.slice.call(a)); + } + function da(b) { + return this instanceof da ? ((this.v = b), this) : new da(b); + } + function Zd(b, a, c) { + function d(a) { + k[a] && + (v[a] = function (b) { + return new Promise(function (c, d) { + 1 < g.push([a, b, c, d]) || e(a, b); + }); + }); + } + function e(a, b) { + try { + var c = k[a](b); + c.value instanceof da + ? Promise.resolve(c.value.v).then(f, h) + : l(g[0][2], c); + } catch (t) { + l(g[0][3], t); + } + } + function f(a) { + e('next', a); + } + function h(a) { + e('throw', a); + } + function l(a, b) { + (a(b), g.shift(), g.length) && e(g[0][0], g[0][1]); + } + if (!Symbol.asyncIterator) + throw new TypeError('Symbol.asyncIterator is not defined.'); + var k = c.apply(b, a || []), + v, + g = []; + return ( + (v = {}), + d('next'), + d('throw'), + d('return'), + (v[Symbol.asyncIterator] = function () { + return this; + }), + v + ); + } + function $d(b) { + function a(a) { + e[a] = + b[a] && + function (d) { + return new Promise(function (e, f) { + d = b[a](d); + c(e, f, d.done, d.value); + }); + }; + } + function c(a, b, c, d) { + Promise.resolve(d).then(function (b) { + a({ value: b, done: c }); + }, b); + } + if (!Symbol.asyncIterator) + throw new TypeError('Symbol.asyncIterator is not defined.'); + var d = b[Symbol.asyncIterator], + e; + return d + ? d.call(b) + : ((b = 'function' === typeof F ? F(b) : b[Symbol.iterator]()), + (e = {}), + a('next'), + a('throw'), + a('return'), + (e[Symbol.asyncIterator] = function () { + return this; + }), + e); + } + function p(b) { + return 'function' === typeof b; + } + function S(b) { + b = b(function (a) { + Error.call(a); + a.stack = Error().stack; + }); + b.prototype = Object.create(Error.prototype); + return (b.prototype.constructor = b); + } + function P(b, a) { + b && ((a = b.indexOf(a)), 0 <= a && b.splice(a, 1)); + } + function Gb(b) { + return ( + b instanceof D || + (b && 'closed' in b && p(b.remove) && p(b.add) && p(b.unsubscribe)) + ); + } + function Hb(b) { + ea.setTimeout(function () { + var a = T.onUnhandledError; + if (a) a(b); + else throw b; + }); + } + function B() {} + function K(b, a, c) { + return { kind: b, value: a, error: c }; + } + function Ca(b) { + if (T.useDeprecatedSynchronousErrorHandling) { + var a = !W; + a && (W = { errorThrown: !1, error: null }); + b(); + if ( + a && + ((a = W), (b = a.errorThrown), (a = a.error), (W = null), b) + ) + throw a; + } else b(); + } + function Ta(b, a) { + return function () { + for (var a = [], d = 0; d < arguments.length; d++) + a[d] = arguments[d]; + try { + b.apply(void 0, A([], z(a))); + } catch (e) { + T.useDeprecatedSynchronousErrorHandling + ? T.useDeprecatedSynchronousErrorHandling && + W && + ((W.errorThrown = !0), (W.error = e)) + : Hb(e); + } + }; + } + function Ib(b) { + throw b; + } + function Ua(b, a) { + var c = T.onStoppedNotification; + c && + ea.setTimeout(function () { + return c(b, a); + }); + } + function E(b) { + return b; + } + function Va() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return Jb(b); + } + function Jb(b) { + return 0 === b.length + ? E + : 1 === b.length + ? b[0] + : function (a) { + return b.reduce(function (a, b) { + return b(a); + }, a); + }; + } + function Kb(b) { + var a; + return null !== (a = null !== b && void 0 !== b ? b : T.Promise) && + void 0 !== a + ? a + : Promise; + } + function ae(b) { + var a; + (a = b && b instanceof ma) || + (a = b && p(b.next) && p(b.error) && p(b.complete) && Gb(b)); + return a; + } + function n(b) { + return function (a) { + if (p(null === a || void 0 === a ? void 0 : a.lift)) + return a.lift(function (a) { + try { + return b(a, this); + } catch (d) { + this.error(d); + } + }); + throw new TypeError('Unable to lift unknown Observable type'); + }; + } + function Wa() { + return n(function (b, a) { + var c = null; + b._refCount++; + var d = new m(a, void 0, void 0, void 0, function () { + if (!b || 0 >= b._refCount || 0 < --b._refCount) c = null; + else { + var d = b._connection, + f = c; + c = null; + !d || (f && d !== f) || d.unsubscribe(); + a.unsubscribe(); + } + }); + b.subscribe(d); + d.closed || (c = b.connect()); + }); + } + function Lb(b) { + var a = U.schedule; + return new q(function (c) { + var d = new D(), + e = b || Da, + f = e.now(), + h = function (l) { + var k = e.now(); + c.next({ timestamp: b ? k : l, elapsed: k - f }); + c.closed || d.add(a(h)); + }; + d.add(a(h)); + return d; + }); + } + function Mb(b) { + return b in Xa ? (delete Xa[b], !0) : !1; + } + function be(b) { + return new q(function (a) { + return b.schedule(function () { + return a.complete(); + }); + }); + } + function Ea(b) { + return b && p(b.schedule); + } + function na(b) { + return p(b[b.length - 1]) ? b.pop() : void 0; + } + function Q(b) { + return Ea(b[b.length - 1]) ? b.pop() : void 0; + } + function Nb(b) { + return ( + Symbol.asyncIterator && + p(null === b || void 0 === b ? void 0 : b[Symbol.asyncIterator]) + ); + } + function Ob(b) { + return new TypeError( + 'You provided ' + + (null !== b && 'object' === typeof b + ? 'an invalid object' + : "'" + b + "'") + + ' where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.' + ); + } + function Pb(b) { + return p(null === b || void 0 === b ? void 0 : b[Ya]); + } + function Qb(b) { + return Zd(this, arguments, function () { + var a, c, d, e; + return Sa(this, function (f) { + switch (f.label) { + case 0: + (a = b.getReader()), (f.label = 1); + case 1: + f.trys.push([1, , 9, 10]), (f.label = 2); + case 2: + return [4, da(a.read())]; + case 3: + return ( + (c = f.sent()), + (d = c.value), + (e = c.done) ? [4, da(void 0)] : [3, 5] + ); + case 4: + return [2, f.sent()]; + case 5: + return [4, da(d)]; + case 6: + return [4, f.sent()]; + case 7: + return f.sent(), [3, 2]; + case 8: + return [3, 10]; + case 9: + return a.releaseLock(), [7]; + case 10: + return [2]; + } + }); + }); + } + function u(b) { + if (b instanceof q) return b; + if (null != b) { + if (p(b[oa])) return ce(b); + if (Za(b)) return de(b); + if (p(null === b || void 0 === b ? void 0 : b.then)) return ee(b); + if (Nb(b)) return Rb(b); + if (Pb(b)) return fe(b); + if (p(null === b || void 0 === b ? void 0 : b.getReader)) + return Rb(Qb(b)); + } + throw Ob(b); + } + function ce(b) { + return new q(function (a) { + var c = b[oa](); + if (p(c.subscribe)) return c.subscribe(a); + throw new TypeError( + 'Provided object does not correctly implement Symbol.observable' + ); + }); + } + function de(b) { + return new q(function (a) { + for (var c = 0; c < b.length && !a.closed; c++) a.next(b[c]); + a.complete(); + }); + } + function ee(b) { + return new q(function (a) { + b.then( + function (b) { + a.closed || (a.next(b), a.complete()); + }, + function (b) { + return a.error(b); + } + ).then(null, Hb); + }); + } + function fe(b) { + return new q(function (a) { + var c, d; + try { + for (var e = F(b), f = e.next(); !f.done; f = e.next()) + if ((a.next(f.value), a.closed)) return; + } catch (h) { + c = { error: h }; + } finally { + try { + f && !f.done && (d = e.return) && d.call(e); + } finally { + if (c) throw c.error; + } + } + a.complete(); + }); + } + function Rb(b) { + return new q(function (a) { + ge(b, a).catch(function (b) { + return a.error(b); + }); + }); + } + function ge(b, a) { + var c, d, e, f; + return Yd(this, void 0, void 0, function () { + var h, l; + return Sa(this, function (k) { + switch (k.label) { + case 0: + k.trys.push([0, 5, 6, 11]), (c = $d(b)), (k.label = 1); + case 1: + return [4, c.next()]; + case 2: + if (((d = k.sent()), d.done)) return [3, 4]; + h = d.value; + a.next(h); + if (a.closed) return [2]; + k.label = 3; + case 3: + return [3, 1]; + case 4: + return [3, 11]; + case 5: + return (l = k.sent()), (e = { error: l }), [3, 11]; + case 6: + return ( + k.trys.push([6, , 9, 10]), + d && !d.done && (f = c.return) + ? [4, f.call(c)] + : [3, 8] + ); + case 7: + k.sent(), (k.label = 8); + case 8: + return [3, 10]; + case 9: + if (e) throw e.error; + return [7]; + case 10: + return [7]; + case 11: + return a.complete(), [2]; + } + }); + }); + } + function G(b, a, c, d, e) { + void 0 === d && (d = 0); + void 0 === e && (e = !1); + a = a.schedule(function () { + c(); + e ? b.add(this.schedule(null, d)) : this.unsubscribe(); + }, d); + b.add(a); + if (!e) return a; + } + function pa(b, a) { + void 0 === a && (a = 0); + return n(function (c, d) { + c.subscribe( + new m( + d, + function (c) { + return G( + d, + b, + function () { + return d.next(c); + }, + a + ); + }, + function () { + return G( + d, + b, + function () { + return d.complete(); + }, + a + ); + }, + function (c) { + return G( + d, + b, + function () { + return d.error(c); + }, + a + ); + } + ) + ); + }); + } + function qa(b, a) { + void 0 === a && (a = 0); + return n(function (c, d) { + d.add( + b.schedule(function () { + return c.subscribe(d); + }, a) + ); + }); + } + function he(b, a) { + return new q(function (c) { + var d = 0; + return a.schedule(function () { + d === b.length + ? c.complete() + : (c.next(b[d++]), c.closed || this.schedule()); + }); + }); + } + function Sb(b, a) { + return new q(function (c) { + var d; + G(c, a, function () { + d = b[Ya](); + G( + c, + a, + function () { + var a, b, h; + try { + (a = d.next()), (b = a.value), (h = a.done); + } catch (l) { + c.error(l); + return; + } + h ? c.complete() : c.next(b); + }, + 0, + !0 + ); + }); + return function () { + return ( + p(null === d || void 0 === d ? void 0 : d.return) && + d.return() + ); + }; + }); + } + function Tb(b, a) { + if (!b) throw Error('Iterable cannot be null'); + return new q(function (c) { + G(c, a, function () { + var d = b[Symbol.asyncIterator](); + G( + c, + a, + function () { + d.next().then(function (a) { + a.done ? c.complete() : c.next(a.value); + }); + }, + 0, + !0 + ); + }); + }); + } + function Ub(b, a) { + if (null != b) { + if (p(b[oa])) return u(b).pipe(qa(a), pa(a)); + if (Za(b)) return he(b, a); + if (p(null === b || void 0 === b ? void 0 : b.then)) + return u(b).pipe(qa(a), pa(a)); + if (Nb(b)) return Tb(b, a); + if (Pb(b)) return Sb(b, a); + if (p(null === b || void 0 === b ? void 0 : b.getReader)) + return Tb(Qb(b), a); + } + throw Ob(b); + } + function L(b, a) { + return a ? Ub(b, a) : u(b); + } + function $a() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + a = Q(b); + return L(b, a); + } + function Vb(b, a) { + var c = p(b) + ? b + : function () { + return b; + }, + d = function (a) { + return a.error(c()); + }; + return new q( + a + ? function (b) { + return a.schedule(d, 0, b); + } + : d + ); + } + function Fa(b, a) { + var c, + d, + e, + f = b.kind, + h = b.value; + b = b.error; + if ('string' !== typeof f) + throw new TypeError('Invalid notification, missing "kind"'); + 'N' === f + ? null === (c = a.next) || void 0 === c + ? void 0 + : c.call(a, h) + : 'E' === f + ? null === (d = a.error) || void 0 === d + ? void 0 + : d.call(a, b) + : null === (e = a.complete) || void 0 === e + ? void 0 + : e.call(a); + } + function ab(b) { + return b instanceof Date && !isNaN(b); + } + function bb(b, a) { + b = ab(b) ? { first: b } : 'number' === typeof b ? { each: b } : b; + var c = b.first, + d = b.each, + e = b.with, + f = void 0 === e ? ie : e, + e = b.scheduler, + h = void 0 === e ? (null !== a && void 0 !== a ? a : I) : e; + a = b.meta; + var l = void 0 === a ? null : a; + if (null == c && null == d) throw new TypeError('No timeout provided.'); + return n(function (a, b) { + var e, + k, + g = null, + v = 0, + t = function (a) { + k = G( + b, + h, + function () { + try { + e.unsubscribe(), + u( + f({ meta: l, lastValue: g, seen: v }) + ).subscribe(b); + } catch (je) { + b.error(je); + } + }, + a + ); + }; + e = a.subscribe( + new m( + b, + function (a) { + null === k || void 0 === k ? void 0 : k.unsubscribe(); + v++; + b.next((g = a)); + 0 < d && t(d); + }, + void 0, + void 0, + function () { + (null === k || void 0 === k ? 0 : k.closed) || + (null === k || void 0 === k + ? void 0 + : k.unsubscribe()); + g = null; + } + ) + ); + t(null != c ? ('number' === typeof c ? c : +c - h.now()) : d); + }); + } + function ie(b) { + throw new Wb(b); + } + function N(b, a) { + return n(function (c, d) { + var e = 0; + c.subscribe( + new m(d, function (c) { + d.next(b.call(a, c, e++)); + }) + ); + }); + } + function X(b) { + return N(function (a) { + return ke(a) ? b.apply(void 0, A([], z(a))) : b(a); + }); + } + function Ga(b, a, c, d) { + if (c) + if (Ea(c)) d = c; + else + return function () { + for (var e = [], f = 0; f < arguments.length; f++) + e[f] = arguments[f]; + return Ga(b, a, d).apply(this, e).pipe(X(c)); + }; + return d + ? function () { + for (var c = [], f = 0; f < arguments.length; f++) + c[f] = arguments[f]; + return Ga(b, a).apply(this, c).pipe(qa(d), pa(d)); + } + : function () { + for (var c = this, d = [], h = 0; h < arguments.length; h++) + d[h] = arguments[h]; + var l = new cb(), + k = !0; + return new q(function (e) { + e = l.subscribe(e); + if (k) { + var f = (k = !1), + h = !1; + a.apply( + c, + A(A([], z(d)), [ + function () { + for ( + var a = [], c = 0; + c < arguments.length; + c++ + ) + a[c] = arguments[c]; + if (b && ((c = a.shift()), null != c)) { + l.error(c); + return; + } + l.next(1 < a.length ? a : a[0]); + h = !0; + f && l.complete(); + } + ]) + ); + h && l.complete(); + f = !0; + } + return e; + }); + }; + } + function Xb(b) { + if (1 === b.length) { + var a = b[0]; + if (le(a)) return { args: a, keys: null }; + if (a && 'object' === typeof a && me(a) === ne) + return ( + (b = oe(a)), + { + args: b.map(function (b) { + return a[b]; + }), + keys: b + } + ); + } + return { args: b, keys: null }; + } + function Yb(b, a) { + return b.reduce(function (b, d, e) { + return (b[d] = a[e]), b; + }, {}); + } + function Zb() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var c = Q(b), + a = na(b), + b = Xb(b), + d = b.args, + e = b.keys; + if (0 === d.length) return L([], c); + c = new q( + $b( + d, + c, + e + ? function (a) { + return Yb(e, a); + } + : E + ) + ); + return a ? c.pipe(X(a)) : c; + } + function $b(b, a, c) { + void 0 === c && (c = E); + return function (d) { + ac( + a, + function () { + for ( + var e = b.length, + f = Array(e), + h = e, + l = e, + k = function (e) { + ac( + a, + function () { + var k = !1; + L(b[e], a).subscribe( + new m( + d, + function (a) { + f[e] = a; + k || ((k = !0), l--); + l || d.next(c(f.slice())); + }, + function () { + --h || d.complete(); + } + ) + ); + }, + d + ); + }, + g = 0; + g < e; + g++ + ) + k(g); + }, + d + ); + }; + } + function ac(b, a, c) { + b ? G(c, b, a) : a(); + } + function db(b, a, c, d, e, f, h, l) { + var k = [], + g = 0, + r = 0, + y = !1, + x = function (a) { + return g < d ? R(a) : k.push(a); + }, + R = function (b) { + f && a.next(b); + g++; + var l = !1; + u(c(b, r++)).subscribe( + new m( + a, + function (b) { + null === e || void 0 === e ? void 0 : e(b); + f ? x(b) : a.next(b); + }, + function () { + l = !0; + }, + void 0, + function () { + if (l) + try { + g--; + for ( + var b = function () { + var b = k.shift(); + h + ? G(a, h, function () { + return R(b); + }) + : R(b); + }; + k.length && g < d; + + ) + b(); + !y || k.length || g || a.complete(); + } catch (J) { + a.error(J); + } + } + ) + ); + }; + b.subscribe( + new m(a, x, function () { + y = !0; + !y || k.length || g || a.complete(); + }) + ); + return function () { + null === l || void 0 === l ? void 0 : l(); + }; + } + function H(b, a, c) { + void 0 === c && (c = Infinity); + if (p(a)) + return H(function (c, e) { + return N(function (b, d) { + return a(c, b, e, d); + })(u(b(c, e))); + }, c); + 'number' === typeof a && (c = a); + return n(function (a, e) { + return db(a, e, b, c); + }); + } + function ra(b) { + void 0 === b && (b = Infinity); + return H(E, b); + } + function Ha() { + return ra(1); + } + function sa() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return Ha()(L(b, Q(b))); + } + function ta(b) { + return new q(function (a) { + u(b()).subscribe(a); + }); + } + function eb(b, a, c, d) { + p(c) && ((d = c), (c = void 0)); + if (d) return eb(b, a, c).pipe(X(d)); + d = z( + pe(b) + ? qe.map(function (d) { + return function (e) { + return b[d](a, e, c); + }; + }) + : re(b) + ? se.map(bc(b, a)) + : te(b) + ? ue.map(bc(b, a)) + : [], + 2 + ); + var e = d[0], + f = d[1]; + if (!e && Za(b)) + return H(function (b) { + return eb(b, a, c); + })(u(b)); + if (!e) throw new TypeError('Invalid event target'); + return new q(function (a) { + var b = function () { + for (var b = [], c = 0; c < arguments.length; c++) + b[c] = arguments[c]; + return a.next(1 < b.length ? b : b[0]); + }; + e(b); + return function () { + return f(b); + }; + }); + } + function bc(b, a) { + return function (c) { + return function (d) { + return b[c](a, d); + }; + }; + } + function re(b) { + return p(b.addListener) && p(b.removeListener); + } + function te(b) { + return p(b.on) && p(b.off); + } + function pe(b) { + return p(b.addEventListener) && p(b.removeEventListener); + } + function cc(b, a, c) { + return c + ? cc(b, a).pipe(X(c)) + : new q(function (c) { + var d = function () { + for (var a = [], b = 0; b < arguments.length; b++) + a[b] = arguments[b]; + return c.next(1 === a.length ? a[0] : a); + }, + f = b(d); + return p(a) + ? function () { + return a(d, f); + } + : void 0; + }); + } + function Y(b, a, c) { + void 0 === b && (b = 0); + void 0 === c && (c = fb); + var d = -1; + null != a && (Ea(a) ? (c = a) : (d = a)); + return new q(function (a) { + var e = ab(b) ? +b - c.now() : b; + 0 > e && (e = 0); + var h = 0; + return c.schedule(function () { + a.closed || + (a.next(h++), + 0 <= d ? this.schedule(void 0, d) : a.complete()); + }, e); + }); + } + function dc(b, a) { + void 0 === b && (b = 0); + void 0 === a && (a = I); + 0 > b && (b = 0); + return Y(b, b, a); + } + function Z(b) { + return 1 === b.length && ve(b[0]) ? b[0] : b; + } + function ec() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var c = Z(b); + return n(function (a, b) { + var d = A([a], z(c)), + e = function () { + if (!b.closed) + if (0 < d.length) { + var a = void 0; + try { + a = u(d.shift()); + } catch (v) { + e(); + return; + } + var c = new m(b, void 0, B, B); + b.add(a.subscribe(c)); + c.add(e); + } else b.complete(); + }; + e(); + }); + } + function fc(b, a) { + return function (c, d) { + return !b.call(a, c, d); + }; + } + function O(b, a) { + return n(function (c, d) { + var e = 0; + c.subscribe( + new m(d, function (c) { + return b.call(a, c, e++) && d.next(c); + }) + ); + }); + } + function gc(b) { + return function (a) { + for ( + var c = [], + d = function (d) { + c.push( + u(b[d]).subscribe( + new m(a, function (b) { + if (c) { + for (var e = 0; e < c.length; e++) + e !== d && c[e].unsubscribe(); + c = null; + } + a.next(b); + }) + ) + ); + }, + e = 0; + c && !a.closed && e < b.length; + e++ + ) + d(e); + }; + } + function gb() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var c = na(b), + d = Z(b); + return d.length + ? new q(function (a) { + var b = d.map(function () { + return []; + }), + e = d.map(function () { + return !1; + }); + a.add(function () { + b = e = null; + }); + for ( + var l = function (f) { + u(d[f]).subscribe( + new m( + a, + function (d) { + b[f].push(d); + b.every(function (a) { + return a.length; + }) && + ((d = b.map(function (a) { + return a.shift(); + })), + a.next( + c + ? c.apply( + void 0, + A([], z(d)) + ) + : d + ), + b.some(function (a, b) { + return !a.length && e[b]; + }) && a.complete()); + }, + function () { + e[f] = !0; + !b[f].length && a.complete(); + } + ) + ); + }, + k = 0; + !a.closed && k < d.length; + k++ + ) + l(k); + return function () { + b = e = null; + }; + }) + : M; + } + function hb(b) { + return n(function (a, c) { + var d = !1, + e = null, + f = null, + h = !1, + l = function () { + null === f || void 0 === f ? void 0 : f.unsubscribe(); + f = null; + if (d) { + d = !1; + var a = e; + e = null; + c.next(a); + } + h && c.complete(); + }, + k = function () { + f = null; + h && c.complete(); + }; + a.subscribe( + new m( + c, + function (a) { + d = !0; + e = a; + f || u(b(a)).subscribe((f = new m(c, l, k))); + }, + function () { + h = !0; + (d && f && !f.closed) || c.complete(); + } + ) + ); + }); + } + function hc(b, a) { + void 0 === a && (a = I); + return hb(function () { + return Y(b, a); + }); + } + function ic(b) { + return n(function (a, c) { + var d = []; + a.subscribe( + new m( + c, + function (a) { + return d.push(a); + }, + function () { + c.next(d); + c.complete(); + } + ) + ); + b.subscribe( + new m( + c, + function () { + var a = d; + d = []; + c.next(a); + }, + B + ) + ); + return function () { + d = null; + }; + }); + } + function jc(b, a) { + void 0 === a && (a = null); + a = null !== a && void 0 !== a ? a : b; + return n(function (c, d) { + var e = [], + f = 0; + c.subscribe( + new m( + d, + function (c) { + var h, + k, + g, + r, + y = null; + 0 === f++ % a && e.push([]); + try { + for ( + var x = F(e), m = x.next(); + !m.done; + m = x.next() + ) { + var t = m.value; + t.push(c); + b <= t.length && + ((y = null !== y && void 0 !== y ? y : []), + y.push(t)); + } + } catch (J) { + h = { error: J }; + } finally { + try { + m && !m.done && (k = x.return) && k.call(x); + } finally { + if (h) throw h.error; + } + } + if (y) + try { + for ( + var fa = F(y), n = fa.next(); + !n.done; + n = fa.next() + ) + (t = n.value), P(e, t), d.next(t); + } catch (J) { + g = { error: J }; + } finally { + try { + n && + !n.done && + (r = fa.return) && + r.call(fa); + } finally { + if (g) throw g.error; + } + } + }, + function () { + var a, b; + try { + for ( + var c = F(e), f = c.next(); + !f.done; + f = c.next() + ) + d.next(f.value); + } catch (r) { + a = { error: r }; + } finally { + try { + f && !f.done && (b = c.return) && b.call(c); + } finally { + if (a) throw a.error; + } + } + d.complete(); + }, + void 0, + function () { + e = null; + } + ) + ); + }); + } + function kc(b) { + for (var a, c, d = [], e = 1; e < arguments.length; e++) + d[e - 1] = arguments[e]; + var f = null !== (a = Q(d)) && void 0 !== a ? a : I, + h = null !== (c = d[0]) && void 0 !== c ? c : null, + l = d[1] || Infinity; + return n(function (a, c) { + var d = [], + e = !1, + k = function (a) { + var b = a.buffer; + a.subs.unsubscribe(); + P(d, a); + c.next(b); + e && g(); + }, + g = function () { + if (d) { + var a = new D(); + c.add(a); + var e = { buffer: [], subs: a }; + d.push(e); + G( + a, + f, + function () { + return k(e); + }, + b + ); + } + }; + null !== h && 0 <= h ? G(c, f, g, h, !0) : (e = !0); + g(); + var v = new m( + c, + function (a) { + var b, + c, + e = d.slice(); + try { + for ( + var f = F(e), h = f.next(); + !h.done; + h = f.next() + ) { + var g = h.value, + v = g.buffer; + v.push(a); + l <= v.length && k(g); + } + } catch (xe) { + b = { error: xe }; + } finally { + try { + h && !h.done && (c = f.return) && c.call(f); + } finally { + if (b) throw b.error; + } + } + }, + function () { + for (; null === d || void 0 === d ? 0 : d.length; ) + c.next(d.shift().buffer); + null === v || void 0 === v ? void 0 : v.unsubscribe(); + c.complete(); + c.unsubscribe(); + }, + void 0, + function () { + return (d = null); + } + ); + a.subscribe(v); + }); + } + function lc(b, a) { + return n(function (c, d) { + var e = []; + u(b).subscribe( + new m( + d, + function (b) { + var c = []; + e.push(c); + var f = new D(); + f.add( + u(a(b)).subscribe( + new m( + d, + function () { + P(e, c); + d.next(c); + f.unsubscribe(); + }, + B + ) + ) + ); + }, + B + ) + ); + c.subscribe( + new m( + d, + function (a) { + var b, c; + try { + for ( + var d = F(e), f = d.next(); + !f.done; + f = d.next() + ) + f.value.push(a); + } catch (r) { + b = { error: r }; + } finally { + try { + f && !f.done && (c = d.return) && c.call(d); + } finally { + if (b) throw b.error; + } + } + }, + function () { + for (; 0 < e.length; ) d.next(e.shift()); + d.complete(); + } + ) + ); + }); + } + function mc(b) { + return n(function (a, c) { + var d = null, + e = null, + f = function () { + null === e || void 0 === e ? void 0 : e.unsubscribe(); + var a = d; + d = []; + a && c.next(a); + u(b()).subscribe((e = new m(c, f, B))); + }; + f(); + a.subscribe( + new m( + c, + function (a) { + return null === d || void 0 === d ? void 0 : d.push(a); + }, + function () { + d && c.next(d); + c.complete(); + }, + void 0, + function () { + return (d = e = null); + } + ) + ); + }); + } + function ib(b) { + return n(function (a, c) { + var d = null, + e = !1, + f, + d = a.subscribe( + new m(c, void 0, void 0, function (h) { + f = u(b(h, ib(b)(a))); + d + ? (d.unsubscribe(), (d = null), f.subscribe(c)) + : (e = !0); + }) + ); + e && (d.unsubscribe(), (d = null), f.subscribe(c)); + }); + } + function nc(b, a, c, d, e) { + return function (f, h) { + var l = c, + k = a, + g = 0; + f.subscribe( + new m( + h, + function (a) { + var c = g++; + k = l ? b(k, a, c) : ((l = !0), a); + d && h.next(k); + }, + e && + function () { + l && h.next(k); + h.complete(); + } + ) + ); + }; + } + function ga(b, a) { + return n(nc(b, a, 2 <= arguments.length, !1, !0)); + } + function jb() { + return n(function (b, a) { + ga(ye, [])(b).subscribe(a); + }); + } + function oc(b, a) { + return Va( + jb(), + H(function (a) { + return b(a); + }), + a ? X(a) : E + ); + } + function Ia(b) { + return oc(Zb, b); + } + function kb() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return (a = na(b)) + ? Va(kb.apply(void 0, A([], z(b))), X(a)) + : n(function (a, d) { + $b(A([a], z(Z(b))))(d); + }); + } + function pc() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return kb.apply(void 0, A([], z(b))); + } + function Ja(b, a) { + return p(a) ? H(b, a, 1) : H(b, 1); + } + function qc(b, a) { + return p(a) + ? Ja(function () { + return b; + }, a) + : Ja(function () { + return b; + }); + } + function rc() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var c = Q(b); + return n(function (a, e) { + Ha()(L(A([a], z(b)), c)).subscribe(e); + }); + } + function sc() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return rc.apply(void 0, A([], z(b))); + } + function ze(b) { + return new q(function (a) { + return b.subscribe(a); + }); + } + function Ka(b, a) { + void 0 === a && (a = Ae); + var c = a.connector; + return n(function (a, e) { + var d = c(); + L(b(ze(d))).subscribe(e); + e.add(a.subscribe(d)); + }); + } + function tc(b) { + return ga(function (a, c, d) { + return !b || b(c, d) ? a + 1 : a; + }, 0); + } + function uc(b) { + return n(function (a, c) { + var d = !1, + e = null, + f = null, + h = function () { + null === f || void 0 === f ? void 0 : f.unsubscribe(); + f = null; + if (d) { + d = !1; + var a = e; + e = null; + c.next(a); + } + }; + a.subscribe( + new m( + c, + function (a) { + null === f || void 0 === f ? void 0 : f.unsubscribe(); + d = !0; + e = a; + f = new m(c, h, B); + u(b(a)).subscribe(f); + }, + function () { + h(); + c.complete(); + }, + void 0, + function () { + e = f = null; + } + ) + ); + }); + } + function vc(b, a) { + void 0 === a && (a = I); + return n(function (c, d) { + function e() { + var c = l + b, + e = a.now(); + e < c ? ((f = this.schedule(void 0, c - e)), d.add(f)) : k(); + } + var f = null, + h = null, + l = null, + k = function () { + if (f) { + f.unsubscribe(); + f = null; + var a = h; + h = null; + d.next(a); + } + }; + c.subscribe( + new m( + d, + function (c) { + h = c; + l = a.now(); + f || ((f = a.schedule(e, b)), d.add(f)); + }, + function () { + k(); + d.complete(); + }, + void 0, + function () { + h = f = null; + } + ) + ); + }); + } + function ua(b) { + return n(function (a, c) { + var d = !1; + a.subscribe( + new m( + c, + function (a) { + d = !0; + c.next(a); + }, + function () { + d || c.next(b); + c.complete(); + } + ) + ); + }); + } + function aa(b) { + return 0 >= b + ? function () { + return M; + } + : n(function (a, c) { + var d = 0; + a.subscribe( + new m(c, function (a) { + ++d <= b && (c.next(a), b <= d && c.complete()); + }) + ); + }); + } + function lb() { + return n(function (b, a) { + b.subscribe(new m(a, B)); + }); + } + function mb(b) { + return N(function () { + return b; + }); + } + function La(b, a) { + return a + ? function (c) { + return sa(a.pipe(aa(1), lb()), c.pipe(La(b))); + } + : H(function (a, d) { + return b(a, d).pipe(aa(1), mb(a)); + }); + } + function wc(b, a) { + void 0 === a && (a = I); + var c = Y(b, a); + return La(function () { + return c; + }); + } + function xc() { + return n(function (b, a) { + b.subscribe( + new m(a, function (b) { + return Fa(b, a); + }) + ); + }); + } + function yc(b, a) { + return n(function (c, d) { + var e = new Set(); + c.subscribe( + new m(d, function (a) { + var c = b ? b(a) : a; + e.has(c) || (e.add(c), d.next(a)); + }) + ); + null === a || void 0 === a + ? void 0 + : a.subscribe( + new m( + d, + function () { + return e.clear(); + }, + B + ) + ); + }); + } + function nb(b, a) { + void 0 === a && (a = E); + b = null !== b && void 0 !== b ? b : Be; + return n(function (c, d) { + var e, + f = !0; + c.subscribe( + new m(d, function (c) { + var h = a(c); + if (f || !b(e, h)) (f = !1), (e = h), d.next(c); + }) + ); + }); + } + function Be(b, a) { + return b === a; + } + function zc(b, a) { + return nb(function (c, d) { + return a ? a(c[b], d[b]) : c[b] === d[b]; + }); + } + function va(b) { + void 0 === b && (b = Ce); + return n(function (a, c) { + var d = !1; + a.subscribe( + new m( + c, + function (a) { + d = !0; + c.next(a); + }, + function () { + return d ? c.complete() : c.error(b()); + } + ) + ); + }); + } + function Ce() { + return new ba(); + } + function Ac(b, a) { + if (0 > b) throw new ob(); + var c = 2 <= arguments.length; + return function (d) { + return d.pipe( + O(function (a, c) { + return c === b; + }), + aa(1), + c + ? ua(a) + : va(function () { + return new ob(); + }) + ); + }; + } + function Bc() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return function (a) { + return sa(a, $a.apply(void 0, A([], z(b)))); + }; + } + function Cc(b, a) { + return n(function (c, d) { + var e = 0; + c.subscribe( + new m( + d, + function (f) { + b.call(a, f, e++, c) || (d.next(!1), d.complete()); + }, + function () { + d.next(!0); + d.complete(); + } + ) + ); + }); + } + function Ma() { + return n(function (b, a) { + var c = !1, + d = null; + b.subscribe( + new m( + a, + function (b) { + d || + (d = u(b).subscribe( + new m(a, void 0, function () { + d = null; + c && a.complete(); + }) + )); + }, + function () { + c = !0; + !d && a.complete(); + } + ) + ); + }); + } + function pb(b, a) { + return a + ? function (c) { + return c.pipe( + pb(function (c, e) { + return u(b(c, e)).pipe( + N(function (b, d) { + return a(c, b, e, d); + }) + ); + }) + ); + } + : n(function (a, d) { + var c = 0, + f = null, + h = !1; + a.subscribe( + new m( + d, + function (a) { + f || + ((f = new m(d, void 0, function () { + f = null; + h && d.complete(); + })), + u(b(a, c++)).subscribe(f)); + }, + function () { + h = !0; + !f && d.complete(); + } + ) + ); + }); + } + function Dc(b, a, c) { + void 0 === a && (a = Infinity); + a = 1 > (a || 0) ? Infinity : a; + return n(function (d, e) { + return db(d, e, b, a, void 0, !0, c); + }); + } + function Ec(b) { + return n(function (a, c) { + try { + a.subscribe(c); + } finally { + c.add(b); + } + }); + } + function Fc(b, a) { + return n(Gc(b, a, 'value')); + } + function Gc(b, a, c) { + var d = 'index' === c; + return function (c, f) { + var e = 0; + c.subscribe( + new m( + f, + function (h) { + var l = e++; + b.call(a, h, l, c) && (f.next(d ? l : h), f.complete()); + }, + function () { + f.next(d ? -1 : void 0); + f.complete(); + } + ) + ); + }; + } + function Hc(b, a) { + return n(Gc(b, a, 'index')); + } + function Ic(b, a) { + var c = 2 <= arguments.length; + return function (d) { + return d.pipe( + b + ? O(function (a, c) { + return b(a, c, d); + }) + : E, + aa(1), + c + ? ua(a) + : va(function () { + return new ba(); + }) + ); + }; + } + function Jc(b, a, c, d) { + return n(function (e, f) { + function h(a, b) { + var c = new q(function (a) { + y.activeGroups++; + var c = b.subscribe(a); + return function () { + c.unsubscribe(); + 0 === --y.activeGroups && + y.teardownAttempted && + y.unsubscribe(); + }; + }); + c.key = a; + return c; + } + var l; + a && 'function' !== typeof a + ? ((c = a.duration), (l = a.element), (d = a.connector)) + : (l = a); + var k = new Map(), + g = function (a) { + k.forEach(a); + a(f); + }, + r = function (a) { + return g(function (b) { + return b.error(a); + }); + }, + y = new De( + f, + function (a) { + try { + var e = b(a), + g = k.get(e); + if (!g) { + k.set(e, (g = d ? d() : new C())); + var v = h(e, g); + f.next(v); + if (c) { + var x = new m( + g, + function () { + g.complete(); + null === x || void 0 === x + ? void 0 + : x.unsubscribe(); + }, + void 0, + void 0, + function () { + return k.delete(e); + } + ); + y.add(u(c(v)).subscribe(x)); + } + } + g.next(l ? l(a) : a); + } catch (J) { + r(J); + } + }, + function () { + return g(function (a) { + return a.complete(); + }); + }, + r, + function () { + return k.clear(); + } + ); + e.subscribe(y); + }); + } + function Kc() { + return n(function (b, a) { + b.subscribe( + new m( + a, + function () { + a.next(!1); + a.complete(); + }, + function () { + a.next(!0); + a.complete(); + } + ) + ); + }); + } + function qb(b) { + return 0 >= b + ? function () { + return M; + } + : n(function (a, c) { + var d = []; + a.subscribe( + new m( + c, + function (a) { + d.push(a); + b < d.length && d.shift(); + }, + function () { + var a, b; + try { + for ( + var h = F(d), l = h.next(); + !l.done; + l = h.next() + ) + c.next(l.value); + } catch (k) { + a = { error: k }; + } finally { + try { + l && + !l.done && + (b = h.return) && + b.call(h); + } finally { + if (a) throw a.error; + } + } + c.complete(); + }, + void 0, + function () { + d = null; + } + ) + ); + }); + } + function Lc(b, a) { + var c = 2 <= arguments.length; + return function (d) { + return d.pipe( + b + ? O(function (a, c) { + return b(a, c, d); + }) + : E, + qb(1), + c + ? ua(a) + : va(function () { + return new ba(); + }) + ); + }; + } + function Mc() { + return n(function (b, a) { + b.subscribe( + new m( + a, + function (b) { + a.next(Na.createNext(b)); + }, + function () { + a.next(Na.createComplete()); + a.complete(); + }, + function (b) { + a.next(Na.createError(b)); + a.complete(); + } + ) + ); + }); + } + function Nc(b) { + return ga( + p(b) + ? function (a, c) { + return 0 < b(a, c) ? a : c; + } + : function (a, b) { + return a > b ? a : b; + } + ); + } + function Oc(b, a, c) { + void 0 === c && (c = Infinity); + if (p(a)) + return H( + function () { + return b; + }, + a, + c + ); + 'number' === typeof a && (c = a); + return H(function () { + return b; + }, c); + } + function Pc(b, a, c) { + void 0 === c && (c = Infinity); + return n(function (d, e) { + var f = a; + return db( + d, + e, + function (a, c) { + return b(f, a, c); + }, + c, + function (a) { + f = a; + }, + !1, + void 0, + function () { + return (f = null); + } + ); + }); + } + function Qc() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var c = Q(b), + d = 'number' === typeof b[b.length - 1] ? b.pop() : Infinity, + b = Z(b); + return n(function (a, f) { + ra(d)(L(A([a], z(b)), c)).subscribe(f); + }); + } + function Rc() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return Qc.apply(void 0, A([], z(b))); + } + function Sc(b) { + return ga( + p(b) + ? function (a, c) { + return 0 > b(a, c) ? a : c; + } + : function (a, b) { + return a < b ? a : b; + } + ); + } + function Oa(b, a) { + var c = p(b) + ? b + : function () { + return b; + }; + return p(a) + ? Ka(a, { connector: c }) + : function (a) { + return new Pa(a, c); + }; + } + function Tc() { + return n(function (b, a) { + var c, + d = !1; + b.subscribe( + new m(a, function (b) { + var e = c; + c = b; + d && a.next([e, b]); + d = !0; + }) + ); + }); + } + function Uc() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var c = b.length; + if (0 === c) throw Error('list of properties cannot be empty.'); + return N(function (a) { + var d = a; + for (a = 0; a < c; a++) + if ( + ((d = null === d || void 0 === d ? void 0 : d[b[a]]), + 'undefined' === typeof d) + ) + return; + return d; + }); + } + function Vc(b) { + return b + ? function (a) { + return Ka(b)(a); + } + : function (a) { + return Oa(new C())(a); + }; + } + function Wc(b) { + return function (a) { + var c = new Xc(b); + return new Pa(a, function () { + return c; + }); + }; + } + function Yc() { + return function (b) { + var a = new cb(); + return new Pa(b, function () { + return a; + }); + }; + } + function Zc(b, a, c, d) { + c && !p(c) && (d = c); + var e = p(c) ? c : void 0; + return function (c) { + return Oa(new ha(b, a, d), e)(c); + }; + } + function rb() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return b.length + ? n(function (a, d) { + gc(A([a], z(b)))(d); + }) + : E; + } + function $c(b) { + var a, + c = Infinity, + d; + null != b && + ('object' === typeof b + ? ((a = b.count), + (c = void 0 === a ? Infinity : a), + (d = b.delay)) + : (c = b)); + return 0 >= c + ? function () { + return M; + } + : n(function (a, b) { + var e = 0, + f, + k = function () { + null === f || void 0 === f ? void 0 : f.unsubscribe(); + f = null; + if (null != d) { + var a = 'number' === typeof d ? Y(d) : u(d(e)), + c = new m(b, function () { + c.unsubscribe(); + g(); + }); + a.subscribe(c); + } else g(); + }, + g = function () { + var d = !1; + f = a.subscribe( + new m(b, void 0, function () { + ++e < c ? (f ? k() : (d = !0)) : b.complete(); + }) + ); + d && k(); + }; + g(); + }); + } + function ad(b) { + return n(function (a, c) { + var d, + e = !1, + f, + h = !1, + l = !1, + k = function () { + f || + ((f = new C()), + b(f).subscribe( + new m( + c, + function () { + d ? g() : (e = !0); + }, + function () { + h = !0; + l && h && c.complete(); + } + ) + )); + return f; + }, + g = function () { + l = !1; + d = a.subscribe( + new m(c, void 0, function () { + (((l = !0), h) && (c.complete(), !0)) || k().next(); + }) + ); + e && (d.unsubscribe(), (d = null), (e = !1), g()); + }; + g(); + }); + } + function bd(b) { + void 0 === b && (b = Infinity); + b = b && 'object' === typeof b ? b : { count: b }; + var a = b.count, + c = void 0 === a ? Infinity : a, + d = b.delay; + b = b.resetOnSuccess; + var e = void 0 === b ? !1 : b; + return 0 >= c + ? E + : n(function (a, b) { + var f = 0, + h, + g = function () { + var l = !1; + h = a.subscribe( + new m( + b, + function (a) { + e && (f = 0); + b.next(a); + }, + void 0, + function (a) { + if (f++ < c) { + var e = function () { + h + ? (h.unsubscribe(), + (h = null), + g()) + : (l = !0); + }; + if (null != d) { + a = + 'number' === typeof d + ? Y(d) + : u(d(a, f)); + var k = new m( + b, + function () { + k.unsubscribe(); + e(); + }, + function () { + b.complete(); + } + ); + a.subscribe(k); + } else e(); + } else b.error(a); + } + ) + ); + l && (h.unsubscribe(), (h = null), g()); + }; + g(); + }); + } + function cd(b) { + return n(function (a, c) { + var d, + e = !1, + f, + h = function () { + d = a.subscribe( + new m(c, void 0, void 0, function (a) { + f || + ((f = new C()), + b(f).subscribe( + new m(c, function () { + return d ? h() : (e = !0); + }) + )); + f && f.next(a); + }) + ); + e && (d.unsubscribe(), (d = null), (e = !1), h()); + }; + h(); + }); + } + function sb(b) { + return n(function (a, c) { + var d = !1, + e = null; + a.subscribe( + new m(c, function (a) { + d = !0; + e = a; + }) + ); + b.subscribe( + new m( + c, + function () { + if (d) { + d = !1; + var a = e; + e = null; + c.next(a); + } + }, + B + ) + ); + }); + } + function dd(b, a) { + void 0 === a && (a = I); + return sb(dc(b, a)); + } + function tb(b, a) { + return n(nc(b, a, 2 <= arguments.length, !0)); + } + function ed(b, a) { + void 0 === a && + (a = function (a, b) { + return a === b; + }); + return n(function (c, d) { + var e = { buffer: [], complete: !1 }, + f = { buffer: [], complete: !1 }, + h = function (b, c) { + var e = new m( + d, + function (e) { + var f = c.buffer, + h = c.complete; + 0 === f.length + ? h + ? (d.next(!1), d.complete()) + : b.buffer.push(e) + : a(e, f.shift()) || (d.next(!1), d.complete()); + }, + function () { + b.complete = !0; + var a = c.buffer; + c.complete && + (d.next(0 === a.length), d.complete()); + null === e || void 0 === e + ? void 0 + : e.unsubscribe(); + } + ); + return e; + }; + c.subscribe(h(e, f)); + b.subscribe(h(f, e)); + }); + } + function ub(b) { + void 0 === b && (b = {}); + var a = b.connector, + c = + void 0 === a + ? function () { + return new C(); + } + : a, + a = b.resetOnError, + d = void 0 === a ? !0 : a, + a = b.resetOnComplete, + e = void 0 === a ? !0 : a; + b = b.resetOnRefCountZero; + var f = void 0 === b ? !0 : b; + return function (a) { + var b = null, + h = null, + g = null, + r = 0, + y = !1, + m = !1, + R = function () { + null === h || void 0 === h ? void 0 : h.unsubscribe(); + h = null; + }, + t = function () { + R(); + b = g = null; + y = m = !1; + }, + fa = function () { + var a = b; + t(); + null === a || void 0 === a ? void 0 : a.unsubscribe(); + }; + return n(function (a, l) { + r++; + m || y || R(); + var k = (g = null !== g && void 0 !== g ? g : c()); + l.add(function () { + r--; + 0 !== r || m || y || (h = vb(fa, f)); + }); + k.subscribe(l); + b || + ((b = new wa({ + next: function (a) { + return k.next(a); + }, + error: function (a) { + m = !0; + R(); + h = vb(t, d, a); + k.error(a); + }, + complete: function () { + y = !0; + R(); + h = vb(t, e); + k.complete(); + } + })), + L(a).subscribe(b)); + })(a); + }; + } + function vb(b, a) { + for (var c = [], d = 2; d < arguments.length; d++) + c[d - 2] = arguments[d]; + return !0 === a + ? (b(), null) + : !1 === a + ? null + : a + .apply(void 0, A([], z(c))) + .pipe(aa(1)) + .subscribe(function () { + return b(); + }); + } + function fd(b, a, c) { + var d, + e, + f, + h = !1; + b && 'object' === typeof b + ? ((f = null !== (d = b.bufferSize) && void 0 !== d ? d : Infinity), + (a = null !== (e = b.windowTime) && void 0 !== e ? e : Infinity), + (h = !!b.refCount), + (c = b.scheduler)) + : (f = null !== b && void 0 !== b ? b : Infinity); + return ub({ + connector: function () { + return new ha(f, a, c); + }, + resetOnError: !0, + resetOnComplete: !1, + resetOnRefCountZero: h + }); + } + function gd(b) { + return n(function (a, c) { + var d = !1, + e, + f = !1, + h = 0; + a.subscribe( + new m( + c, + function (l) { + f = !0; + if (!b || b(l, h++, a)) + d && c.error(new hd('Too many matching values')), + (d = !0), + (e = l); + }, + function () { + d + ? (c.next(e), c.complete()) + : c.error( + f ? new id('No matching values') : new ba() + ); + } + ) + ); + }); + } + function jd(b) { + return O(function (a, c) { + return b <= c; + }); + } + function kd(b) { + return 0 >= b + ? E + : n(function (a, c) { + var d = Array(b), + e = 0; + a.subscribe( + new m(c, function (a) { + var f = e++; + if (f < b) d[f] = a; + else { + var f = f % b, + l = d[f]; + d[f] = a; + c.next(l); + } + }) + ); + return function () { + d = null; + }; + }); + } + function ld(b) { + return n(function (a, c) { + var d = !1, + e = new m( + c, + function () { + null === e || void 0 === e ? void 0 : e.unsubscribe(); + d = !0; + }, + B + ); + u(b).subscribe(e); + a.subscribe( + new m(c, function (a) { + return d && c.next(a); + }) + ); + }); + } + function md(b) { + return n(function (a, c) { + var d = !1, + e = 0; + a.subscribe( + new m(c, function (a) { + return (d || (d = !b(a, e++))) && c.next(a); + }) + ); + }); + } + function nd() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var c = Q(b); + return n(function (a, e) { + (c ? sa(b, a, c) : sa(b, a)).subscribe(e); + }); + } + function ia(b, a) { + return n(function (c, d) { + var e = null, + f = 0, + h = !1; + c.subscribe( + new m( + d, + function (c) { + null === e || void 0 === e ? void 0 : e.unsubscribe(); + var l = 0, + g = f++; + u(b(c, g)).subscribe( + (e = new m( + d, + function (b) { + return d.next(a ? a(c, b, g, l++) : b); + }, + function () { + e = null; + h && !e && d.complete(); + } + )) + ); + }, + function () { + ((h = !0), !e) && d.complete(); + } + ) + ); + }); + } + function od() { + return ia(E); + } + function pd(b, a) { + return p(a) + ? ia(function () { + return b; + }, a) + : ia(function () { + return b; + }); + } + function qd(b, a) { + return n(function (c, d) { + var e = a; + ia( + function (a, c) { + return b(e, a, c); + }, + function (a, b) { + return (e = b), b; + } + )(c).subscribe(d); + return function () { + e = null; + }; + }); + } + function rd(b) { + return n(function (a, c) { + u(b).subscribe( + new m( + c, + function () { + return c.complete(); + }, + B + ) + ); + !c.closed && a.subscribe(c); + }); + } + function sd(b, a) { + void 0 === a && (a = !1); + return n(function (c, d) { + var e = 0; + c.subscribe( + new m(d, function (c) { + var f = b(c, e++); + (f || a) && d.next(c); + !f && d.complete(); + }) + ); + }); + } + function td(b, a, c) { + var d = p(b) || a || c ? { next: b, error: a, complete: c } : b; + return d + ? n(function (a, b) { + var c; + null === (c = d.subscribe) || void 0 === c + ? void 0 + : c.call(d); + var e = !0; + a.subscribe( + new m( + b, + function (a) { + var c; + null === (c = d.next) || void 0 === c + ? void 0 + : c.call(d, a); + b.next(a); + }, + function () { + var a; + e = !1; + null === (a = d.complete) || void 0 === a + ? void 0 + : a.call(d); + b.complete(); + }, + function (a) { + var c; + e = !1; + null === (c = d.error) || void 0 === c + ? void 0 + : c.call(d, a); + b.error(a); + }, + function () { + var a, b; + e && + (null === (a = d.unsubscribe) || void 0 === a + ? void 0 + : a.call(d)); + null === (b = d.finalize) || void 0 === b + ? void 0 + : b.call(d); + } + ) + ); + }) + : E; + } + function wb(b, a) { + void 0 === a && (a = ud); + return n(function (c, d) { + var e = a.leading, + f = a.trailing, + h = !1, + l = null, + g = null, + v = !1, + r = function () { + null === g || void 0 === g ? void 0 : g.unsubscribe(); + g = null; + f && (n(), v && d.complete()); + }, + y = function () { + g = null; + v && d.complete(); + }, + n = function () { + if (h) { + h = !1; + var a = l; + l = null; + d.next(a); + !v && (g = u(b(a)).subscribe(new m(d, r, y))); + } + }; + c.subscribe( + new m( + d, + function (a) { + h = !0; + l = a; + (!g || g.closed) && + (e ? n() : (g = u(b(a)).subscribe(new m(d, r, y)))); + }, + function () { + v = !0; + (f && h && g && !g.closed) || d.complete(); + } + ) + ); + }); + } + function vd(b, a, c) { + void 0 === a && (a = I); + void 0 === c && (c = ud); + var d = Y(b, a); + return wb(function () { + return d; + }, c); + } + function wd(b) { + void 0 === b && (b = I); + return function (a) { + return ta(function () { + return a.pipe( + tb( + function (a, d) { + a = a.current; + return { value: d, current: b.now(), last: a }; + }, + { current: b.now(), value: void 0, last: void 0 } + ), + N(function (a) { + return new Ee(a.value, a.current - a.last); + }) + ); + }); + }; + } + function xd(b, a, c) { + var d, e; + c = null !== c && void 0 !== c ? c : fb; + ab(b) ? (d = b) : 'number' === typeof b && (e = b); + if (a) + b = function () { + return a; + }; + else throw new TypeError('No observable provided to switch to'); + if (null == d && null == e) throw new TypeError('No timeout provided.'); + return bb({ first: d, each: e, scheduler: c, with: b }); + } + function yd(b) { + void 0 === b && (b = ja); + return N(function (a) { + return { value: a, timestamp: b.now() }; + }); + } + function zd(b) { + return n(function (a, c) { + var d = new C(); + c.next(d.asObservable()); + var e = function (a) { + d.error(a); + c.error(a); + }; + a.subscribe( + new m( + c, + function (a) { + return null === d || void 0 === d ? void 0 : d.next(a); + }, + function () { + d.complete(); + c.complete(); + }, + e + ) + ); + b.subscribe( + new m( + c, + function () { + d.complete(); + c.next((d = new C())); + }, + B, + e + ) + ); + return function () { + null === d || void 0 === d ? void 0 : d.unsubscribe(); + d = null; + }; + }); + } + function Ad(b, a) { + void 0 === a && (a = 0); + var c = 0 < a ? a : b; + return n(function (a, e) { + var d = [new C()], + h = 0; + e.next(d[0].asObservable()); + a.subscribe( + new m( + e, + function (a) { + var f, g; + try { + for ( + var l = F(d), m = l.next(); + !m.done; + m = l.next() + ) + m.value.next(a); + } catch (x) { + f = { error: x }; + } finally { + try { + m && !m.done && (g = l.return) && g.call(l); + } finally { + if (f) throw f.error; + } + } + a = h - b + 1; + 0 <= a && 0 === a % c && d.shift().complete(); + 0 === ++h % c && + ((a = new C()), + d.push(a), + e.next(a.asObservable())); + }, + function () { + for (; 0 < d.length; ) d.shift().complete(); + e.complete(); + }, + function (a) { + for (; 0 < d.length; ) d.shift().error(a); + e.error(a); + }, + function () { + d = null; + } + ) + ); + }); + } + function Bd(b) { + for (var a, c, d = [], e = 1; e < arguments.length; e++) + d[e - 1] = arguments[e]; + var f = null !== (a = Q(d)) && void 0 !== a ? a : I, + h = null !== (c = d[0]) && void 0 !== c ? c : null, + g = d[1] || Infinity; + return n(function (a, c) { + var d = [], + e = !1, + l = function (a) { + var b = a.subs; + a.window.complete(); + b.unsubscribe(); + P(d, a); + e && k(); + }, + k = function () { + if (d) { + var a = new D(); + c.add(a); + var e = new C(), + h = { window: e, subs: a, seen: 0 }; + d.push(h); + c.next(e.asObservable()); + G( + a, + f, + function () { + return l(h); + }, + b + ); + } + }; + null !== h && 0 <= h ? G(c, f, k, h, !0) : (e = !0); + k(); + var v = function (a) { + d.slice().forEach(function (b) { + return a(b.window); + }); + a(c); + c.unsubscribe(); + }; + a.subscribe( + new m( + c, + function (a) { + d.slice().forEach(function (b) { + b.window.next(a); + g <= ++b.seen && l(b); + }); + }, + function () { + return v(function (a) { + return a.complete(); + }); + }, + function (a) { + return v(function (b) { + return b.error(a); + }); + } + ) + ); + return function () { + d = null; + }; + }); + } + function Cd(b, a) { + return n(function (c, d) { + var e = [], + f = function (a) { + for (; 0 < e.length; ) e.shift().error(a); + d.error(a); + }; + u(b).subscribe( + new m( + d, + function (b) { + var c = new C(); + e.push(c); + var h = new D(), + g; + try { + g = u(a(b)); + } catch (r) { + f(r); + return; + } + d.next(c.asObservable()); + h.add( + g.subscribe( + new m( + d, + function () { + P(e, c); + c.complete(); + h.unsubscribe(); + }, + B, + f + ) + ) + ); + }, + B + ) + ); + c.subscribe( + new m( + d, + function (a) { + var b, + c, + d = e.slice(); + try { + for ( + var f = F(d), h = f.next(); + !h.done; + h = f.next() + ) + h.value.next(a); + } catch (x) { + b = { error: x }; + } finally { + try { + h && !h.done && (c = f.return) && c.call(f); + } finally { + if (b) throw b.error; + } + } + }, + function () { + for (; 0 < e.length; ) e.shift().complete(); + d.complete(); + }, + f, + function () { + for (; 0 < e.length; ) e.shift().unsubscribe(); + } + ) + ); + }); + } + function Dd(b) { + return n(function (a, c) { + var d, + e, + f = function (a) { + d.error(a); + c.error(a); + }, + h = function () { + null === e || void 0 === e ? void 0 : e.unsubscribe(); + null === d || void 0 === d ? void 0 : d.complete(); + d = new C(); + c.next(d.asObservable()); + var a; + try { + a = u(b()); + } catch (k) { + f(k); + return; + } + a.subscribe((e = new m(c, h, h, f))); + }; + h(); + a.subscribe( + new m( + c, + function (a) { + return d.next(a); + }, + function () { + d.complete(); + c.complete(); + }, + f, + function () { + null === e || void 0 === e ? void 0 : e.unsubscribe(); + d = null; + } + ) + ); + }); + } + function Ed() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var c = na(b); + return n(function (a, e) { + for ( + var d = b.length, + h = Array(d), + g = b.map(function () { + return !1; + }), + k = !1, + v = function (a) { + u(b[a]).subscribe( + new m( + e, + function (b) { + h[a] = b; + k || + g[a] || + ((g[a] = !0), + (k = g.every(E)) && (g = null)); + }, + B + ) + ); + }, + r = 0; + r < d; + r++ + ) + v(r); + a.subscribe( + new m(e, function (a) { + k && + ((a = A([a], z(h))), + e.next(c ? c.apply(void 0, A([], z(a))) : a)); + }) + ); + }); + } + function Fd(b) { + return oc(gb, b); + } + function Gd() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return n(function (a, d) { + gb.apply(void 0, A([a], z(b))).subscribe(d); + }); + } + function Hd() { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return Gd.apply(void 0, A([], z(b))); + } + function Id(b, a) { + for (var c = 0, d = a.length; c < d; c++) + for ( + var e = a[c], + f = Object.getOwnPropertyNames(e.prototype), + h = 0, + g = f.length; + h < g; + h++ + ) { + var k = f[h]; + b.prototype[k] = e.prototype[k]; + } + } + function Jd(b) { + switch (b.responseType) { + case 'json': + return 'response' in b + ? b.response + : JSON.parse(b.responseText); + case 'document': + return b.responseXML; + default: + return 'response' in b ? b.response : b.responseText; + } + } + function Fe(b, a) { + return ca({ method: 'GET', url: b, headers: a }); + } + function Ge(b, a, c) { + return ca({ method: 'POST', url: b, body: a, headers: c }); + } + function He(b, a) { + return ca({ method: 'DELETE', url: b, headers: a }); + } + function Ie(b, a, c) { + return ca({ method: 'PUT', url: b, body: a, headers: c }); + } + function Je(b, a, c) { + return ca({ method: 'PATCH', url: b, body: a, headers: c }); + } + function Ke(b, a) { + return Le(ca({ method: 'GET', url: b, headers: a })); + } + function Me(b) { + return new q(function (a) { + var c, + d, + e = V( + { + async: !0, + crossDomain: !1, + withCredentials: !1, + method: 'GET', + timeout: 0, + responseType: 'json' + }, + b + ), + f = e.queryParams, + h = e.body, + g = e.headers, + k = e.url; + if (!k) throw new TypeError('url is required'); + if (f) { + var m; + if (k.includes('?')) { + k = k.split('?'); + if (2 < k.length) throw new TypeError('invalid url'); + m = new URLSearchParams(k[1]); + new URLSearchParams(f).forEach(function (a, b) { + return m.set(b, a); + }); + k = k[0] + '?' + m; + } else (m = new URLSearchParams(f)), (k = k + '?' + m); + } + f = {}; + if (g) + for (var r in g) + g.hasOwnProperty(r) && (f[r.toLowerCase()] = g[r]); + var n = e.crossDomain; + n || + 'x-requested-with' in f || + (f['x-requested-with'] = 'XMLHttpRequest'); + var x = e.xsrfCookieName, + g = e.xsrfHeaderName; + (e.withCredentials || !n) && + x && + g && + (n = + null !== + (d = + null === + (c = + null === document || void 0 === document + ? void 0 + : document.cookie.match( + new RegExp( + '(^|;\\s*)(' + + x + + ')\x3d([^;]*)' + ) + )) || void 0 === c + ? void 0 + : c.pop()) && void 0 !== d + ? d + : '') && + (f[g] = n); + c = Ne(h, f); + var p = V(V({}, e), { url: k, headers: f, body: c }), + t; + t = b.createXHR ? b.createXHR() : new XMLHttpRequest(); + var q = b.progressSubscriber, + e = b.includeDownloadProgress, + e = void 0 === e ? !1 : e; + d = b.includeUploadProgress; + d = void 0 === d ? !1 : d; + h = function (b, c) { + t.addEventListener(b, function () { + var b, + d = c(); + null === + (b = null === q || void 0 === q ? void 0 : q.error) || + void 0 === b + ? void 0 + : b.call(q, d); + a.error(d); + }); + }; + h('timeout', function () { + return new Kd(t, p); + }); + h('abort', function () { + return new xa('aborted', t, p); + }); + var u = function (b, c, d) { + b.addEventListener(c, function (b) { + a.next(new xb(b, t, p, d + '_' + b.type)); + }); + }; + d && + [yb, zb, Ld].forEach(function (a) { + return u(t.upload, a, Oe); + }); + q && + [yb, zb].forEach(function (a) { + return t.upload.addEventListener(a, function (a) { + var b; + return null === + (b = + null === q || void 0 === q ? void 0 : q.next) || + void 0 === b + ? void 0 + : b.call(q, a); + }); + }); + e && + [yb, zb].forEach(function (a) { + return u(t, a, Md); + }); + var J = function (b) { + a.error(new xa('ajax error' + (b ? ' ' + b : ''), t, p)); + }; + t.addEventListener('error', function (a) { + var b; + null === (b = null === q || void 0 === q ? void 0 : q.error) || + void 0 === b + ? void 0 + : b.call(q, a); + J(); + }); + t.addEventListener(Ld, function (b) { + var c, + d, + e = t.status; + if (400 > e) { + null === + (c = + null === q || void 0 === q ? void 0 : q.complete) || + void 0 === c + ? void 0 + : c.call(q); + c = void 0; + try { + c = new xb(b, t, p, Md + '_' + b.type); + } catch (we) { + a.error(we); + return; + } + a.next(c); + a.complete(); + } else null === (d = null === q || void 0 === q ? void 0 : q.error) || void 0 === d ? void 0 : d.call(q, b), J(e); + }); + e = p.user; + d = p.method; + h = p.async; + e ? t.open(d, k, h, e, p.password) : t.open(d, k, h); + h && ((t.timeout = p.timeout), (t.responseType = p.responseType)); + 'withCredentials' in t && (t.withCredentials = p.withCredentials); + for (r in f) f.hasOwnProperty(r) && t.setRequestHeader(r, f[r]); + c ? t.send(c) : t.send(); + return function () { + t && 4 !== t.readyState && t.abort(); + }; + }); + } + function Ne(b, a) { + var c; + if ( + !b || + 'string' === typeof b || + ('undefined' !== typeof FormData && b instanceof FormData) || + ('undefined' !== typeof URLSearchParams && + b instanceof URLSearchParams) || + Ab(b, 'ArrayBuffer') || + Ab(b, 'File') || + Ab(b, 'Blob') || + ('undefined' !== typeof ReadableStream && + b instanceof ReadableStream) + ) + return b; + if ('undefined' !== typeof ArrayBuffer && ArrayBuffer.isView(b)) + return b.buffer; + if ('object' === typeof b) + return ( + (a['content-type'] = + null !== (c = a['content-type']) && void 0 !== c + ? c + : 'application/json;charset\x3dutf-8'), + JSON.stringify(b) + ); + throw new TypeError('Unknown body type'); + } + function Ab(b, a) { + return Pe.call(b) === '[object ' + a + ']'; + } + var Ra = function (b, a) { + Ra = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (a, b) { + a.__proto__ = b; + }) || + function (a, b) { + for (var c in b) + Object.prototype.hasOwnProperty.call(b, c) && + (a[c] = b[c]); + }; + return Ra(b, a); + }, + V = function () { + V = + Object.assign || + function (b) { + for (var a, c = 1, d = arguments.length; c < d; c++) { + a = arguments[c]; + for (var e in a) + Object.prototype.hasOwnProperty.call(a, e) && + (b[e] = a[e]); + } + return b; + }; + return V.apply(this, arguments); + }, + Qa = S(function (b) { + return function (a) { + b(this); + this.message = a + ? a.length + + ' errors occurred during unsubscription:\n' + + a + .map(function (a, b) { + return b + 1 + ') ' + a.toString(); + }) + .join('\n ') + : ''; + this.name = 'UnsubscriptionError'; + this.errors = a; + }; + }), + D = (function () { + function b(a) { + this.initialTeardown = a; + this.closed = !1; + this._teardowns = this._parentage = null; + } + b.prototype.unsubscribe = function () { + var a, b, d, e, f; + if (!this.closed) { + this.closed = !0; + var h = this._parentage; + if (h) + if (((this._parentage = null), Array.isArray(h))) + try { + for ( + var g = F(h), k = g.next(); + !k.done; + k = g.next() + ) + k.value.remove(this); + } catch (x) { + a = { error: x }; + } finally { + try { + k && !k.done && (b = g.return) && b.call(g); + } finally { + if (a) throw a.error; + } + } + else h.remove(this); + a = this.initialTeardown; + if (p(a)) + try { + a(); + } catch (x) { + f = x instanceof Qa ? x.errors : [x]; + } + if ((a = this._teardowns)) { + this._teardowns = null; + try { + for ( + var m = F(a), r = m.next(); + !r.done; + r = m.next() + ) { + var n = r.value; + try { + (a = n), p(a) ? a() : a.unsubscribe(); + } catch (x) { + (f = null !== f && void 0 !== f ? f : []), + x instanceof Qa + ? (f = A(A([], z(f)), z(x.errors))) + : f.push(x); + } + } + } catch (x) { + d = { error: x }; + } finally { + try { + r && !r.done && (e = m.return) && e.call(m); + } finally { + if (d) throw d.error; + } + } + } + if (f) throw new Qa(f); + } + }; + b.prototype.add = function (a) { + var c; + if (a && a !== this) + if (this.closed) p(a) ? a() : a.unsubscribe(); + else { + if (a instanceof b) { + if (a.closed || a._hasParent(this)) return; + a._addParent(this); + } + (this._teardowns = + null !== (c = this._teardowns) && void 0 !== c + ? c + : []).push(a); + } + }; + b.prototype._hasParent = function (a) { + var b = this._parentage; + return b === a || (Array.isArray(b) && b.includes(a)); + }; + b.prototype._addParent = function (a) { + var b = this._parentage; + this._parentage = Array.isArray(b) + ? (b.push(a), b) + : b + ? [b, a] + : a; + }; + b.prototype._removeParent = function (a) { + var b = this._parentage; + b === a + ? (this._parentage = null) + : Array.isArray(b) && P(b, a); + }; + b.prototype.remove = function (a) { + var c = this._teardowns; + c && P(c, a); + a instanceof b && a._removeParent(this); + }; + b.EMPTY = (function () { + var a = new b(); + a.closed = !0; + return a; + })(); + return b; + })(), + Nd = D.EMPTY, + T = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: void 0, + useDeprecatedSynchronousErrorHandling: !1, + useDeprecatedNextContext: !1 + }, + ea = { + setTimeout: function () { + for (var b = [], a = 0; a < arguments.length; a++) + b[a] = arguments[a]; + a = ea.delegate; + return ( + (null === a || void 0 === a ? void 0 : a.setTimeout) || + setTimeout + ).apply(void 0, A([], z(b))); + }, + clearTimeout: function (b) { + var a = ea.delegate; + return ( + (null === a || void 0 === a ? void 0 : a.clearTimeout) || + clearTimeout + )(b); + }, + delegate: void 0 + }, + ya = K('C', void 0, void 0), + W = null, + ma = (function (b) { + function a(a) { + var c = b.call(this) || this; + c.isStopped = !1; + a + ? ((c.destination = a), Gb(a) && a.add(c)) + : (c.destination = Qe); + return c; + } + w(a, b); + a.create = function (a, b, e) { + return new wa(a, b, e); + }; + a.prototype.next = function (a) { + this.isStopped ? Ua(K('N', a, void 0), this) : this._next(a); + }; + a.prototype.error = function (a) { + this.isStopped + ? Ua(K('E', void 0, a), this) + : ((this.isStopped = !0), this._error(a)); + }; + a.prototype.complete = function () { + this.isStopped + ? Ua(ya, this) + : ((this.isStopped = !0), this._complete()); + }; + a.prototype.unsubscribe = function () { + this.closed || + ((this.isStopped = !0), + b.prototype.unsubscribe.call(this), + (this.destination = null)); + }; + a.prototype._next = function (a) { + this.destination.next(a); + }; + a.prototype._error = function (a) { + try { + this.destination.error(a); + } finally { + this.unsubscribe(); + } + }; + a.prototype._complete = function () { + try { + this.destination.complete(); + } finally { + this.unsubscribe(); + } + }; + return a; + })(D), + wa = (function (b) { + function a(a, d, e) { + var c = b.call(this) || this, + h; + p(a) + ? (h = a) + : a && + ((h = a.next), + (d = a.error), + (e = a.complete), + c && + T.useDeprecatedNextContext && + ((a = Object.create(a)), + (a.unsubscribe = function () { + return c.unsubscribe(); + })), + (h = null === h || void 0 === h ? void 0 : h.bind(a)), + (d = null === d || void 0 === d ? void 0 : d.bind(a)), + (e = null === e || void 0 === e ? void 0 : e.bind(a))); + c.destination = { + next: h ? Ta(h, c) : B, + error: Ta(null !== d && void 0 !== d ? d : Ib, c), + complete: e ? Ta(e, c) : B + }; + return c; + } + w(a, b); + return a; + })(ma), + Qe = { closed: !0, next: B, error: Ib, complete: B }, + oa = + ('function' === typeof Symbol && Symbol.observable) || + '@@observable', + q = (function () { + function b(a) { + a && (this._subscribe = a); + } + b.prototype.lift = function (a) { + var c = new b(); + c.source = this; + c.operator = a; + return c; + }; + b.prototype.subscribe = function (a, b, d) { + var c = this, + f = ae(a) ? a : new wa(a, b, d); + Ca(function () { + var a = c.operator, + b = c.source; + f.add( + a + ? a.call(f, b) + : b + ? c._subscribe(f) + : c._trySubscribe(f) + ); + }); + return f; + }; + b.prototype._trySubscribe = function (a) { + try { + return this._subscribe(a); + } catch (c) { + a.error(c); + } + }; + b.prototype.forEach = function (a, b) { + var c = this; + b = Kb(b); + return new b(function (b, d) { + var e = new wa({ + next: function (b) { + try { + a(b); + } catch (k) { + d(k), e.unsubscribe(); + } + }, + error: d, + complete: b + }); + c.subscribe(e); + }); + }; + b.prototype._subscribe = function (a) { + var b; + return null === (b = this.source) || void 0 === b + ? void 0 + : b.subscribe(a); + }; + b.prototype[oa] = function () { + return this; + }; + b.prototype.pipe = function () { + for (var a = [], b = 0; b < arguments.length; b++) + a[b] = arguments[b]; + return Jb(a)(this); + }; + b.prototype.toPromise = function (a) { + var b = this; + a = Kb(a); + return new a(function (a, c) { + var d; + b.subscribe( + function (a) { + return (d = a); + }, + function (a) { + return c(a); + }, + function () { + return a(d); + } + ); + }); + }; + b.create = function (a) { + return new b(a); + }; + return b; + })(), + m = (function (b) { + function a(a, d, e, f, h) { + var c = b.call(this, a) || this; + c.onFinalize = h; + c._next = d + ? function (b) { + try { + d(b); + } catch (v) { + a.error(v); + } + } + : b.prototype._next; + c._error = f + ? function (b) { + try { + f(b); + } catch (v) { + a.error(v); + } finally { + this.unsubscribe(); + } + } + : b.prototype._error; + c._complete = e + ? function () { + try { + e(); + } catch (k) { + a.error(k); + } finally { + this.unsubscribe(); + } + } + : b.prototype._complete; + return c; + } + w(a, b); + a.prototype.unsubscribe = function () { + var a, + d = this.closed; + b.prototype.unsubscribe.call(this); + !d && + (null === (a = this.onFinalize) || void 0 === a + ? void 0 + : a.call(this)); + }; + return a; + })(ma), + Pa = (function (b) { + function a(a, d) { + var c = b.call(this) || this; + c.source = a; + c.subjectFactory = d; + c._subject = null; + c._refCount = 0; + c._connection = null; + p(null === a || void 0 === a ? void 0 : a.lift) && + (c.lift = a.lift); + return c; + } + w(a, b); + a.prototype._subscribe = function (a) { + return this.getSubject().subscribe(a); + }; + a.prototype.getSubject = function () { + var a = this._subject; + if (!a || a.isStopped) this._subject = this.subjectFactory(); + return this._subject; + }; + a.prototype._teardown = function () { + this._refCount = 0; + var a = this._connection; + this._subject = this._connection = null; + null === a || void 0 === a ? void 0 : a.unsubscribe(); + }; + a.prototype.connect = function () { + var a = this, + b = this._connection; + if (!b) { + var b = (this._connection = new D()), + e = this.getSubject(); + b.add( + this.source.subscribe( + new m( + e, + void 0, + function () { + a._teardown(); + e.complete(); + }, + function (b) { + a._teardown(); + e.error(b); + }, + function () { + return a._teardown(); + } + ) + ) + ); + b.closed && ((this._connection = null), (b = D.EMPTY)); + } + return b; + }; + a.prototype.refCount = function () { + return Wa()(this); + }; + return a; + })(q), + Da = { + now: function () { + return (Da.delegate || performance).now(); + }, + delegate: void 0 + }, + U = { + schedule: function (b) { + var a = requestAnimationFrame, + c = cancelAnimationFrame, + d = U.delegate; + d && + ((a = d.requestAnimationFrame), + (c = d.cancelAnimationFrame)); + var e = a(function (a) { + c = void 0; + b(a); + }); + return new D(function () { + return null === c || void 0 === c ? void 0 : c(e); + }); + }, + requestAnimationFrame: function () { + for (var b = [], a = 0; a < arguments.length; a++) + b[a] = arguments[a]; + a = U.delegate; + return ( + (null === a || void 0 === a + ? void 0 + : a.requestAnimationFrame) || requestAnimationFrame + ).apply(void 0, A([], z(b))); + }, + cancelAnimationFrame: function () { + for (var b = [], a = 0; a < arguments.length; a++) + b[a] = arguments[a]; + a = U.delegate; + return ( + (null === a || void 0 === a + ? void 0 + : a.cancelAnimationFrame) || cancelAnimationFrame + ).apply(void 0, A([], z(b))); + }, + delegate: void 0 + }, + Re = Lb(), + Od = S(function (b) { + return function () { + b(this); + this.name = 'ObjectUnsubscribedError'; + this.message = 'object unsubscribed'; + }; + }), + C = (function (b) { + function a() { + var a = b.call(this) || this; + a.closed = !1; + a.observers = []; + a.isStopped = !1; + a.hasError = !1; + a.thrownError = null; + return a; + } + w(a, b); + a.prototype.lift = function (a) { + var b = new Bb(this, this); + b.operator = a; + return b; + }; + a.prototype._throwIfClosed = function () { + if (this.closed) throw new Od(); + }; + a.prototype.next = function (a) { + var b = this; + Ca(function () { + var c, d; + b._throwIfClosed(); + if (!b.isStopped) { + var h = b.observers.slice(); + try { + for ( + var g = F(h), k = g.next(); + !k.done; + k = g.next() + ) + k.value.next(a); + } catch (v) { + c = { error: v }; + } finally { + try { + k && !k.done && (d = g.return) && d.call(g); + } finally { + if (c) throw c.error; + } + } + } + }); + }; + a.prototype.error = function (a) { + var b = this; + Ca(function () { + b._throwIfClosed(); + if (!b.isStopped) { + b.hasError = b.isStopped = !0; + b.thrownError = a; + for (var c = b.observers; c.length; ) + c.shift().error(a); + } + }); + }; + a.prototype.complete = function () { + var a = this; + Ca(function () { + a._throwIfClosed(); + if (!a.isStopped) { + a.isStopped = !0; + for (var b = a.observers; b.length; ) + b.shift().complete(); + } + }); + }; + a.prototype.unsubscribe = function () { + this.isStopped = this.closed = !0; + this.observers = null; + }; + Object.defineProperty(a.prototype, 'observed', { + get: function () { + var a; + return ( + 0 < + (null === (a = this.observers) || void 0 === a + ? void 0 + : a.length) + ); + }, + enumerable: !1, + configurable: !0 + }); + a.prototype._trySubscribe = function (a) { + this._throwIfClosed(); + return b.prototype._trySubscribe.call(this, a); + }; + a.prototype._subscribe = function (a) { + this._throwIfClosed(); + this._checkFinalizedStatuses(a); + return this._innerSubscribe(a); + }; + a.prototype._innerSubscribe = function (a) { + var b = this.isStopped, + c = this.observers; + return this.hasError || b + ? Nd + : (c.push(a), + new D(function () { + return P(c, a); + })); + }; + a.prototype._checkFinalizedStatuses = function (a) { + var b = this.thrownError, + c = this.isStopped; + this.hasError ? a.error(b) : c && a.complete(); + }; + a.prototype.asObservable = function () { + var a = new q(); + a.source = this; + return a; + }; + a.create = function (a, b) { + return new Bb(a, b); + }; + return a; + })(q), + Bb = (function (b) { + function a(a, d) { + var c = b.call(this) || this; + c.destination = a; + c.source = d; + return c; + } + w(a, b); + a.prototype.next = function (a) { + var b, c; + null === + (c = + null === (b = this.destination) || void 0 === b + ? void 0 + : b.next) || void 0 === c + ? void 0 + : c.call(b, a); + }; + a.prototype.error = function (a) { + var b, c; + null === + (c = + null === (b = this.destination) || void 0 === b + ? void 0 + : b.error) || void 0 === c + ? void 0 + : c.call(b, a); + }; + a.prototype.complete = function () { + var a, b; + null === + (b = + null === (a = this.destination) || void 0 === a + ? void 0 + : a.complete) || void 0 === b + ? void 0 + : b.call(a); + }; + a.prototype._subscribe = function (a) { + var b, c; + return null !== + (c = + null === (b = this.source) || void 0 === b + ? void 0 + : b.subscribe(a)) && void 0 !== c + ? c + : Nd; + }; + return a; + })(C), + Xc = (function (b) { + function a(a) { + var c = b.call(this) || this; + c._value = a; + return c; + } + w(a, b); + Object.defineProperty(a.prototype, 'value', { + get: function () { + return this.getValue(); + }, + enumerable: !1, + configurable: !0 + }); + a.prototype._subscribe = function (a) { + var c = b.prototype._subscribe.call(this, a); + !c.closed && a.next(this._value); + return c; + }; + a.prototype.getValue = function () { + var a = this.thrownError, + b = this._value; + if (this.hasError) throw a; + this._throwIfClosed(); + return b; + }; + a.prototype.next = function (a) { + b.prototype.next.call(this, (this._value = a)); + }; + return a; + })(C), + ja = { + now: function () { + return (ja.delegate || Date).now(); + }, + delegate: void 0 + }, + ha = (function (b) { + function a(a, d, e) { + void 0 === a && (a = Infinity); + void 0 === d && (d = Infinity); + void 0 === e && (e = ja); + var c = b.call(this) || this; + c._bufferSize = a; + c._windowTime = d; + c._timestampProvider = e; + c._buffer = []; + c._infiniteTimeWindow = Infinity === d; + c._bufferSize = Math.max(1, a); + c._windowTime = Math.max(1, d); + return c; + } + w(a, b); + a.prototype.next = function (a) { + var c = this._buffer, + e = this._infiniteTimeWindow, + f = this._timestampProvider, + h = this._windowTime; + this.isStopped || (c.push(a), !e && c.push(f.now() + h)); + this._trimBuffer(); + b.prototype.next.call(this, a); + }; + a.prototype._subscribe = function (a) { + this._throwIfClosed(); + this._trimBuffer(); + for ( + var b = this._innerSubscribe(a), + c = this._infiniteTimeWindow, + f = this._buffer.slice(), + h = 0; + h < f.length && !a.closed; + h += c ? 1 : 2 + ) + a.next(f[h]); + this._checkFinalizedStatuses(a); + return b; + }; + a.prototype._trimBuffer = function () { + var a = this._bufferSize, + b = this._timestampProvider, + e = this._buffer, + f = this._infiniteTimeWindow, + h = (f ? 1 : 2) * a; + Infinity > a && h < e.length && e.splice(0, e.length - h); + if (!f) { + a = b.now(); + b = 0; + for (f = 1; f < e.length && e[f] <= a; f += 2) b = f; + b && e.splice(0, b + 1); + } + }; + return a; + })(C), + cb = (function (b) { + function a() { + var a = (null !== b && b.apply(this, arguments)) || this; + a._value = null; + a._hasValue = !1; + a._isComplete = !1; + return a; + } + w(a, b); + a.prototype._checkFinalizedStatuses = function (a) { + var b = this._hasValue, + c = this._value, + f = this.thrownError, + h = this.isStopped, + g = this._isComplete; + if (this.hasError) a.error(f); + else if (h || g) b && a.next(c), a.complete(); + }; + a.prototype.next = function (a) { + this.isStopped || ((this._value = a), (this._hasValue = !0)); + }; + a.prototype.complete = function () { + var a = this._hasValue, + d = this._value; + this._isComplete || + ((this._isComplete = !0), + a && b.prototype.next.call(this, d), + b.prototype.complete.call(this)); + }; + return a; + })(C), + ka = { + setInterval: function () { + for (var b = [], a = 0; a < arguments.length; a++) + b[a] = arguments[a]; + a = ka.delegate; + return ( + (null === a || void 0 === a ? void 0 : a.setInterval) || + setInterval + ).apply(void 0, A([], z(b))); + }, + clearInterval: function (b) { + var a = ka.delegate; + return ( + (null === a || void 0 === a ? void 0 : a.clearInterval) || + clearInterval + )(b); + }, + delegate: void 0 + }, + za = (function (b) { + function a(a, d) { + var c = b.call(this, a, d) || this; + c.scheduler = a; + c.work = d; + c.pending = !1; + return c; + } + w(a, b); + a.prototype.schedule = function (a, b) { + void 0 === b && (b = 0); + if (this.closed) return this; + this.state = a; + a = this.id; + var c = this.scheduler; + null != a && (this.id = this.recycleAsyncId(c, a, b)); + this.pending = !0; + this.delay = b; + this.id = this.id || this.requestAsyncId(c, this.id, b); + return this; + }; + a.prototype.requestAsyncId = function (a, b, e) { + void 0 === e && (e = 0); + return ka.setInterval(a.flush.bind(a, this), e); + }; + a.prototype.recycleAsyncId = function (a, b, e) { + void 0 === e && (e = 0); + if (null != e && this.delay === e && !1 === this.pending) + return b; + ka.clearInterval(b); + }; + a.prototype.execute = function (a, b) { + if (this.closed) return Error('executing a cancelled action'); + this.pending = !1; + if ((a = this._execute(a, b))) return a; + !1 === this.pending && + null != this.id && + (this.id = this.recycleAsyncId( + this.scheduler, + this.id, + null + )); + }; + a.prototype._execute = function (a, b) { + b = !1; + var c; + try { + this.work(a); + } catch (f) { + (b = !0), + (c = f + ? f + : Error('Scheduled action threw falsy error')); + } + if (b) return this.unsubscribe(), c; + }; + a.prototype.unsubscribe = function () { + if (!this.closed) { + var a = this.id, + d = this.scheduler, + e = d.actions; + this.work = this.state = this.scheduler = null; + this.pending = !1; + P(e, this); + null != a && (this.id = this.recycleAsyncId(d, a, null)); + this.delay = null; + b.prototype.unsubscribe.call(this); + } + }; + return a; + })( + (function (b) { + function a(a, d) { + return b.call(this) || this; + } + w(a, b); + a.prototype.schedule = function (a, b) { + return this; + }; + return a; + })(D) + ), + Se = 1, + Cb, + Xa = {}, + Te = function (b) { + var a = Se++; + Xa[a] = !0; + Cb || (Cb = Promise.resolve()); + Cb.then(function () { + return Mb(a) && b(); + }); + return a; + }, + Ue = function (b) { + Mb(b); + }, + la = { + setImmediate: function () { + for (var b = [], a = 0; a < arguments.length; a++) + b[a] = arguments[a]; + a = la.delegate; + return ( + (null === a || void 0 === a ? void 0 : a.setImmediate) || Te + ).apply(void 0, A([], z(b))); + }, + clearImmediate: function (b) { + var a = la.delegate; + return ( + (null === a || void 0 === a ? void 0 : a.clearImmediate) || + Ue + )(b); + }, + delegate: void 0 + }, + Ve = (function (b) { + function a(a, d) { + var c = b.call(this, a, d) || this; + c.scheduler = a; + c.work = d; + return c; + } + w(a, b); + a.prototype.requestAsyncId = function (a, d, e) { + void 0 === e && (e = 0); + if (null !== e && 0 < e) + return b.prototype.requestAsyncId.call(this, a, d, e); + a.actions.push(this); + return ( + a._scheduled || + (a._scheduled = la.setImmediate(a.flush.bind(a, void 0))) + ); + }; + a.prototype.recycleAsyncId = function (a, d, e) { + void 0 === e && (e = 0); + if ((null != e && 0 < e) || (null == e && 0 < this.delay)) + return b.prototype.recycleAsyncId.call(this, a, d, e); + a.actions.some(function (a) { + return a.id === d; + }) || (la.clearImmediate(d), (a._scheduled = void 0)); + }; + return a; + })(za), + Db = (function () { + function b(a, c) { + void 0 === c && (c = b.now); + this.schedulerActionCtor = a; + this.now = c; + } + b.prototype.schedule = function (a, b, d) { + void 0 === b && (b = 0); + return new this.schedulerActionCtor(this, a).schedule(d, b); + }; + b.now = ja.now; + return b; + })(), + Aa = (function (b) { + function a(a, d) { + void 0 === d && (d = Db.now); + a = b.call(this, a, d) || this; + a.actions = []; + a._active = !1; + a._scheduled = void 0; + return a; + } + w(a, b); + a.prototype.flush = function (a) { + var b = this.actions; + if (this._active) b.push(a); + else { + var c; + this._active = !0; + do if ((c = a.execute(a.state, a.delay))) break; + while ((a = b.shift())); + this._active = !1; + if (c) { + for (; (a = b.shift()); ) a.unsubscribe(); + throw c; + } + } + }; + return a; + })(Db), + Pd = new ((function (b) { + function a() { + return (null !== b && b.apply(this, arguments)) || this; + } + w(a, b); + a.prototype.flush = function (a) { + this._active = !0; + var b = this._scheduled; + this._scheduled = void 0; + var c = this.actions, + f; + a = a || c.shift(); + do if ((f = a.execute(a.state, a.delay))) break; + while ((a = c[0]) && a.id === b && c.shift()); + this._active = !1; + if (f) { + for (; (a = c[0]) && a.id === b && c.shift(); ) + a.unsubscribe(); + throw f; + } + }; + return a; + })(Aa))(Ve), + I = new Aa(za), + fb = I, + We = (function (b) { + function a(a, d) { + var c = b.call(this, a, d) || this; + c.scheduler = a; + c.work = d; + return c; + } + w(a, b); + a.prototype.schedule = function (a, d) { + void 0 === d && (d = 0); + if (0 < d) return b.prototype.schedule.call(this, a, d); + this.delay = d; + this.state = a; + this.scheduler.flush(this); + return this; + }; + a.prototype.execute = function (a, d) { + return 0 < d || this.closed + ? b.prototype.execute.call(this, a, d) + : this._execute(a, d); + }; + a.prototype.requestAsyncId = function (a, d, e) { + void 0 === e && (e = 0); + return (null != e && 0 < e) || (null == e && 0 < this.delay) + ? b.prototype.requestAsyncId.call(this, a, d, e) + : a.flush(this); + }; + return a; + })(za), + Qd = new ((function (b) { + function a() { + return (null !== b && b.apply(this, arguments)) || this; + } + w(a, b); + return a; + })(Aa))(We), + Xe = (function (b) { + function a(a, d) { + var c = b.call(this, a, d) || this; + c.scheduler = a; + c.work = d; + return c; + } + w(a, b); + a.prototype.requestAsyncId = function (a, d, e) { + void 0 === e && (e = 0); + if (null !== e && 0 < e) + return b.prototype.requestAsyncId.call(this, a, d, e); + a.actions.push(this); + return ( + a._scheduled || + (a._scheduled = U.requestAnimationFrame(function () { + return a.flush(void 0); + })) + ); + }; + a.prototype.recycleAsyncId = function (a, d, e) { + void 0 === e && (e = 0); + if ((null != e && 0 < e) || (null == e && 0 < this.delay)) + return b.prototype.recycleAsyncId.call(this, a, d, e); + a.actions.some(function (a) { + return a.id === d; + }) || (U.cancelAnimationFrame(d), (a._scheduled = void 0)); + }; + return a; + })(za), + Rd = new ((function (b) { + function a() { + return (null !== b && b.apply(this, arguments)) || this; + } + w(a, b); + a.prototype.flush = function (a) { + this._active = !0; + var b = this._scheduled; + this._scheduled = void 0; + var c = this.actions, + f; + a = a || c.shift(); + do if ((f = a.execute(a.state, a.delay))) break; + while ((a = c[0]) && a.id === b && c.shift()); + this._active = !1; + if (f) { + for (; (a = c[0]) && a.id === b && c.shift(); ) + a.unsubscribe(); + throw f; + } + }; + return a; + })(Aa))(Xe), + Sd = (function (b) { + function a(a, d) { + void 0 === a && (a = Eb); + void 0 === d && (d = Infinity); + var c = + b.call(this, a, function () { + return c.frame; + }) || this; + c.maxFrames = d; + c.frame = 0; + c.index = -1; + return c; + } + w(a, b); + a.prototype.flush = function () { + for ( + var a = this.actions, b = this.maxFrames, e, f; + (f = a[0]) && + f.delay <= b && + !(a.shift(), + (this.frame = f.delay), + (e = f.execute(f.state, f.delay))); + ); + if (e) { + for (; (f = a.shift()); ) f.unsubscribe(); + throw e; + } + }; + a.frameTimeFactor = 10; + return a; + })(Aa), + Eb = (function (b) { + function a(a, d, e) { + void 0 === e && (e = a.index += 1); + var c = b.call(this, a, d) || this; + c.scheduler = a; + c.work = d; + c.index = e; + c.active = !0; + c.index = a.index = e; + return c; + } + w(a, b); + a.prototype.schedule = function (c, d) { + void 0 === d && (d = 0); + if (Number.isFinite(d)) { + if (!this.id) return b.prototype.schedule.call(this, c, d); + this.active = !1; + var e = new a(this.scheduler, this.work); + this.add(e); + return e.schedule(c, d); + } + return D.EMPTY; + }; + a.prototype.requestAsyncId = function (b, d, e) { + void 0 === e && (e = 0); + this.delay = b.frame + e; + b = b.actions; + b.push(this); + b.sort(a.sortActions); + return !0; + }; + a.prototype.recycleAsyncId = function (a, b, e) {}; + a.prototype._execute = function (a, d) { + if (!0 === this.active) + return b.prototype._execute.call(this, a, d); + }; + a.sortActions = function (a, b) { + return a.delay === b.delay + ? a.index === b.index + ? 0 + : a.index > b.index + ? 1 + : -1 + : a.delay > b.delay + ? 1 + : -1; + }; + return a; + })(za), + M = new q(function (b) { + return b.complete(); + }), + Za = function (b) { + return b && 'number' === typeof b.length && 'function' !== typeof b; + }, + Ya; + Ya = + 'function' === typeof Symbol && Symbol.iterator + ? Symbol.iterator + : '@@iterator'; + (function (b) { + b.NEXT = 'N'; + b.ERROR = 'E'; + b.COMPLETE = 'C'; + })(g.NotificationKind || (g.NotificationKind = {})); + var Na = (function () { + function b(a, b, d) { + this.kind = a; + this.value = b; + this.error = d; + this.hasValue = 'N' === a; + } + b.prototype.observe = function (a) { + return Fa(this, a); + }; + b.prototype.do = function (a, b, d) { + var c = this.kind, + f = this.value, + h = this.error; + return 'N' === c + ? null === a || void 0 === a + ? void 0 + : a(f) + : 'E' === c + ? null === b || void 0 === b + ? void 0 + : b(h) + : null === d || void 0 === d + ? void 0 + : d(); + }; + b.prototype.accept = function (a, b, d) { + return p(null === a || void 0 === a ? void 0 : a.next) + ? this.observe(a) + : this.do(a, b, d); + }; + b.prototype.toObservable = function () { + var a = this.kind, + b = this.value, + d = this.error, + b = + 'N' === a + ? $a(b) + : 'E' === a + ? Vb(function () { + return d; + }) + : 'C' === a + ? M + : 0; + if (!b) + throw new TypeError('Unexpected notification kind ' + a); + return b; + }; + b.createNext = function (a) { + return new b('N', a); + }; + b.createError = function (a) { + return new b('E', void 0, a); + }; + b.createComplete = function () { + return b.completeNotification; + }; + b.completeNotification = new b('C'); + return b; + })(), + ba = S(function (b) { + return function () { + b(this); + this.name = 'EmptyError'; + this.message = 'no elements in sequence'; + }; + }), + ob = S(function (b) { + return function () { + b(this); + this.name = 'ArgumentOutOfRangeError'; + this.message = 'argument out of range'; + }; + }), + id = S(function (b) { + return function (a) { + b(this); + this.name = 'NotFoundError'; + this.message = a; + }; + }), + hd = S(function (b) { + return function (a) { + b(this); + this.name = 'SequenceError'; + this.message = a; + }; + }), + Wb = S(function (b) { + return function (a) { + void 0 === a && (a = null); + b(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + this.info = a; + }; + }), + ke = Array.isArray, + le = Array.isArray, + me = Object.getPrototypeOf, + ne = Object.prototype, + oe = Object.keys, + Ye = { + connector: function () { + return new C(); + }, + resetOnDisconnect: !0 + }, + se = ['addListener', 'removeListener'], + qe = ['addEventListener', 'removeEventListener'], + ue = ['on', 'off'], + Td = new q(B), + ve = Array.isArray, + ye = function (b, a) { + return b.push(a), b; + }, + Ae = { + connector: function () { + return new C(); + } + }, + De = (function (b) { + function a() { + var a = (null !== b && b.apply(this, arguments)) || this; + a.activeGroups = 0; + a.teardownAttempted = !1; + return a; + } + w(a, b); + a.prototype.unsubscribe = function () { + this.teardownAttempted = !0; + 0 === this.activeGroups && b.prototype.unsubscribe.call(this); + }; + return a; + })(m), + ud = { leading: !0, trailing: !1 }, + Ee = (function () { + return function (b, a) { + this.value = b; + this.interval = a; + }; + })(), + Ze = Object.freeze({ + audit: hb, + auditTime: hc, + buffer: ic, + bufferCount: jc, + bufferTime: kc, + bufferToggle: lc, + bufferWhen: mc, + catchError: ib, + combineAll: Ia, + combineLatestAll: Ia, + combineLatest: kb, + combineLatestWith: pc, + concat: rc, + concatAll: Ha, + concatMap: Ja, + concatMapTo: qc, + concatWith: sc, + connect: Ka, + count: tc, + debounce: uc, + debounceTime: vc, + defaultIfEmpty: ua, + delay: wc, + delayWhen: La, + dematerialize: xc, + distinct: yc, + distinctUntilChanged: nb, + distinctUntilKeyChanged: zc, + elementAt: Ac, + endWith: Bc, + every: Cc, + exhaust: Ma, + exhaustAll: Ma, + exhaustMap: pb, + expand: Dc, + filter: O, + finalize: Ec, + find: Fc, + findIndex: Hc, + first: Ic, + groupBy: Jc, + ignoreElements: lb, + isEmpty: Kc, + last: Lc, + map: N, + mapTo: mb, + materialize: Mc, + max: Nc, + merge: Qc, + mergeAll: ra, + flatMap: H, + mergeMap: H, + mergeMapTo: Oc, + mergeScan: Pc, + mergeWith: Rc, + min: Sc, + multicast: Oa, + observeOn: pa, + onErrorResumeNext: ec, + pairwise: Tc, + partition: function (b, a) { + return function (c) { + return [O(b, a)(c), O(fc(b, a))(c)]; + }; + }, + pluck: Uc, + publish: Vc, + publishBehavior: Wc, + publishLast: Yc, + publishReplay: Zc, + race: function () { + for (var b = [], a = 0; a < arguments.length; a++) + b[a] = arguments[a]; + return rb.apply(void 0, A([], z(Z(b)))); + }, + raceWith: rb, + reduce: ga, + repeat: $c, + repeatWhen: ad, + retry: bd, + retryWhen: cd, + refCount: Wa, + sample: sb, + sampleTime: dd, + scan: tb, + sequenceEqual: ed, + share: ub, + shareReplay: fd, + single: gd, + skip: jd, + skipLast: kd, + skipUntil: ld, + skipWhile: md, + startWith: nd, + subscribeOn: qa, + switchAll: od, + switchMap: ia, + switchMapTo: pd, + switchScan: qd, + take: aa, + takeLast: qb, + takeUntil: rd, + takeWhile: sd, + tap: td, + throttle: wb, + throttleTime: vd, + throwIfEmpty: va, + timeInterval: wd, + timeout: bb, + timeoutWith: xd, + timestamp: yd, + toArray: jb, + window: zd, + windowCount: Ad, + windowTime: Bd, + windowToggle: Cd, + windowWhen: Dd, + withLatestFrom: Ed, + zip: Gd, + zipAll: Fd, + zipWith: Hd + }), + Ba = (function () { + return function (b, a) { + void 0 === a && (a = Infinity); + this.subscribedFrame = b; + this.unsubscribedFrame = a; + }; + })(), + Ud = (function () { + function b() { + this.subscriptions = []; + } + b.prototype.logSubscribedFrame = function () { + this.subscriptions.push(new Ba(this.scheduler.now())); + return this.subscriptions.length - 1; + }; + b.prototype.logUnsubscribedFrame = function (a) { + var b = this.subscriptions; + b[a] = new Ba(b[a].subscribedFrame, this.scheduler.now()); + }; + return b; + })(), + Fb = (function (b) { + function a(a, d) { + var c = + b.call(this, function (a) { + var b = this, + c = b.logSubscribedFrame(), + d = new D(); + d.add( + new D(function () { + b.logUnsubscribedFrame(c); + }) + ); + b.scheduleMessages(a); + return d; + }) || this; + c.messages = a; + c.subscriptions = []; + c.scheduler = d; + return c; + } + w(a, b); + a.prototype.scheduleMessages = function (a) { + for (var b = this.messages.length, c = 0; c < b; c++) { + var f = this.messages[c]; + a.add( + this.scheduler.schedule( + function (a) { + Fa(a.message.notification, a.subscriber); + }, + f.frame, + { message: f, subscriber: a } + ) + ); + } + }; + return a; + })(q); + Id(Fb, [Ud]); + var Vd = (function (b) { + function a(a, d) { + var c = b.call(this) || this; + c.messages = a; + c.subscriptions = []; + c.scheduler = d; + return c; + } + w(a, b); + a.prototype._subscribe = function (a) { + var c = this, + e = c.logSubscribedFrame(), + f = new D(); + f.add( + new D(function () { + c.logUnsubscribedFrame(e); + }) + ); + f.add(b.prototype._subscribe.call(this, a)); + return f; + }; + a.prototype.setup = function () { + for ( + var a = this, + b = a.messages.length, + e = function (b) { + (function () { + var c = a.messages[b], + d = c.notification; + a.scheduler.schedule(function () { + Fa(d, a); + }, c.frame); + })(); + }, + f = 0; + f < b; + f++ + ) + e(f); + }; + return a; + })(C); + Id(Vd, [Ud]); + var $e = (function (b) { + function a(a) { + var c = b.call(this, Eb, 750) || this; + c.assertDeepEqual = a; + c.hotObservables = []; + c.coldObservables = []; + c.flushTests = []; + c.runMode = !1; + return c; + } + w(a, b); + a.prototype.createTime = function (b) { + b = this.runMode ? b.trim().indexOf('|') : b.indexOf('|'); + if (-1 === b) + throw Error( + 'marble diagram for time should have a completion marker "|"' + ); + return b * a.frameTimeFactor; + }; + a.prototype.createColdObservable = function (b, d, e) { + if (-1 !== b.indexOf('^')) + throw Error( + 'cold observable cannot have subscription offset "^"' + ); + if (-1 !== b.indexOf('!')) + throw Error( + 'cold observable cannot have unsubscription marker "!"' + ); + b = a.parseMarbles(b, d, e, void 0, this.runMode); + b = new Fb(b, this); + this.coldObservables.push(b); + return b; + }; + a.prototype.createHotObservable = function (b, d, e) { + if (-1 !== b.indexOf('!')) + throw Error( + 'hot observable cannot have unsubscription marker "!"' + ); + b = a.parseMarbles(b, d, e, void 0, this.runMode); + b = new Vd(b, this); + this.hotObservables.push(b); + return b; + }; + a.prototype.materializeInnerObservable = function (a, b) { + var c = this, + d = []; + a.subscribe( + function (a) { + d.push({ + frame: c.frame - b, + notification: K('N', a, void 0) + }); + }, + function (a) { + d.push({ + frame: c.frame - b, + notification: K('E', void 0, a) + }); + }, + function () { + d.push({ frame: c.frame - b, notification: ya }); + } + ); + return d; + }; + a.prototype.expectObservable = function (b, d) { + var c = this; + void 0 === d && (d = null); + var f = [], + g = { actual: f, ready: !1 }; + d = a.parseMarblesAsSubscriptions(d, this.runMode); + var l = Infinity === d.subscribedFrame ? 0 : d.subscribedFrame; + d = d.unsubscribedFrame; + var k; + this.schedule(function () { + k = b.subscribe( + function (a) { + a = + a instanceof q + ? c.materializeInnerObservable(a, c.frame) + : a; + f.push({ + frame: c.frame, + notification: K('N', a, void 0) + }); + }, + function (a) { + f.push({ + frame: c.frame, + notification: K('E', void 0, a) + }); + }, + function () { + f.push({ frame: c.frame, notification: ya }); + } + ); + }, l); + Infinity !== d && + this.schedule(function () { + return k.unsubscribe(); + }, d); + this.flushTests.push(g); + var m = this.runMode; + return { + toBe: function (b, c, d) { + g.ready = !0; + g.expected = a.parseMarbles(b, c, d, !0, m); + }, + toEqual: function (a) { + g.ready = !0; + g.expected = []; + c.schedule(function () { + k = a.subscribe( + function (a) { + a = + a instanceof q + ? c.materializeInnerObservable( + a, + c.frame + ) + : a; + g.expected.push({ + frame: c.frame, + notification: K('N', a, void 0) + }); + }, + function (a) { + g.expected.push({ + frame: c.frame, + notification: K('E', void 0, a) + }); + }, + function () { + g.expected.push({ + frame: c.frame, + notification: ya + }); + } + ); + }, l); + } + }; + }; + a.prototype.expectSubscriptions = function (b) { + var c = { actual: b, ready: !1 }; + this.flushTests.push(c); + var e = this.runMode; + return { + toBe: function (b) { + b = 'string' === typeof b ? [b] : b; + c.ready = !0; + c.expected = b + .map(function (b) { + return a.parseMarblesAsSubscriptions(b, e); + }) + .filter(function (a) { + return Infinity !== a.subscribedFrame; + }); + } + }; + }; + a.prototype.flush = function () { + for (var a = this, d = this.hotObservables; 0 < d.length; ) + d.shift().setup(); + b.prototype.flush.call(this); + this.flushTests = this.flushTests.filter(function (b) { + return b.ready + ? (a.assertDeepEqual(b.actual, b.expected), !1) + : !0; + }); + }; + a.parseMarblesAsSubscriptions = function (a, b) { + var c = this; + void 0 === b && (b = !1); + if ('string' !== typeof a) return new Ba(Infinity); + var d = A([], z(a)); + a = d.length; + for ( + var g = -1, + l = Infinity, + k = Infinity, + m = 0, + r = function (a) { + var e = m, + f = function (a) { + e += a * c.frameTimeFactor; + }, + h = d[a]; + switch (h) { + case ' ': + b || f(1); + break; + case '-': + f(1); + break; + case '(': + g = m; + f(1); + break; + case ')': + g = -1; + f(1); + break; + case '^': + if (Infinity !== l) + throw Error( + "found a second subscription point '^' in a subscription marble diagram. There can only be one." + ); + l = -1 < g ? g : m; + f(1); + break; + case '!': + if (Infinity !== k) + throw Error( + "found a second unsubscription point '!' in a subscription marble diagram. There can only be one." + ); + k = -1 < g ? g : m; + break; + default: + if ( + b && + h.match(/^[0-9]$/) && + (0 === a || ' ' === d[a - 1]) + ) { + var r = d + .slice(a) + .join('') + .match( + /^([0-9]+(?:\.[0-9]+)?)(ms|s|m) / + ); + if (r) { + a += r[0].length - 1; + var h = parseFloat(r[1]), + p = void 0; + switch (r[2]) { + case 'ms': + p = h; + break; + case 's': + p = 1e3 * h; + break; + case 'm': + p = 6e4 * h; + } + f(p / n.frameTimeFactor); + break; + } + } + throw Error( + "there can only be '^' and '!' markers in a subscription marble diagram. Found instead '" + + h + + "'." + ); + } + m = e; + q = a; + }, + n = this, + q, + p = 0; + p < a; + p++ + ) + r(p), (p = q); + return 0 > k ? new Ba(l) : new Ba(l, k); + }; + a.parseMarbles = function (a, b, e, f, g) { + var c = this; + void 0 === f && (f = !1); + void 0 === g && (g = !1); + if (-1 !== a.indexOf('!')) + throw Error( + 'conventional marble diagrams cannot have the unsubscription marker "!"' + ); + var d = A([], z(a)), + h = d.length, + m = []; + a = g ? a.replace(/^[ ]+/, '').indexOf('^') : a.indexOf('^'); + var n = -1 === a ? 0 : a * -this.frameTimeFactor, + p = + 'object' !== typeof b + ? function (a) { + return a; + } + : function (a) { + return f && b[a] instanceof Fb + ? b[a].messages + : b[a]; + }, + q = -1; + a = function (a) { + var b = n, + f = function (a) { + b += a * c.frameTimeFactor; + }, + h = void 0, + k = d[a]; + switch (k) { + case ' ': + g || f(1); + break; + case '-': + f(1); + break; + case '(': + q = n; + f(1); + break; + case ')': + q = -1; + f(1); + break; + case '|': + h = ya; + f(1); + break; + case '^': + f(1); + break; + case '#': + h = K('E', void 0, e || 'error'); + f(1); + break; + default: + if ( + g && + k.match(/^[0-9]$/) && + (0 === a || ' ' === d[a - 1]) + ) { + var l = d + .slice(a) + .join('') + .match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (l) { + a += l[0].length - 1; + var k = parseFloat(l[1]), + r = void 0; + switch (l[2]) { + case 'ms': + r = k; + break; + case 's': + r = 1e3 * k; + break; + case 'm': + r = 6e4 * k; + } + f(r / t.frameTimeFactor); + break; + } + } + h = K('N', p(k), void 0); + f(1); + } + h && m.push({ frame: -1 < q ? q : n, notification: h }); + n = b; + u = a; + }; + for (var t = this, u, w = 0; w < h; w++) a(w), (w = u); + return m; + }; + a.prototype.createAnimator = function () { + var b = this; + if (!this.runMode) + throw Error('animate() must only be used in run mode'); + var d = 0, + e; + return { + animate: function (c) { + var d, f; + if (e) + throw Error( + 'animate() must not be called more than once within run()' + ); + if (/[|#]/.test(c)) + throw Error('animate() must not complete or error'); + e = new Map(); + c = a.parseMarbles(c, void 0, void 0, void 0, !0); + try { + for ( + var g = F(c), m = g.next(); + !m.done; + m = g.next() + ) + b.schedule(function () { + var a, + c, + d = b.now(), + f = Array.from(e.values()); + e.clear(); + try { + for ( + var g = ((a = void 0), F(f)), + h = g.next(); + !h.done; + h = g.next() + ) { + var k = h.value; + k(d); + } + } catch (J) { + a = { error: J }; + } finally { + try { + h && + !h.done && + (c = g.return) && + c.call(g); + } finally { + if (a) throw a.error; + } + } + }, m.value.frame); + } catch (r) { + d = { error: r }; + } finally { + try { + m && !m.done && (f = g.return) && f.call(g); + } finally { + if (d) throw d.error; + } + } + }, + delegate: { + requestAnimationFrame: function (a) { + if (!e) + throw Error( + 'animate() was not called within run()' + ); + var b = ++d; + e.set(b, a); + return b; + }, + cancelAnimationFrame: function (a) { + if (!e) + throw Error( + 'animate() was not called within run()' + ); + e.delete(a); + } + } + }; + }; + a.prototype.createDelegates = function () { + var a = this, + b = 0, + e = new Map(), + f = function () { + var b = a.now(), + c = Array.from(e.values()).filter(function (a) { + return a.due <= b; + }), + d = c.filter(function (a) { + return 'immediate' === a.type; + }); + if (0 < d.length) + (d = d[0]), + (c = d.handle), + (d = d.handler), + e.delete(c), + d(); + else if ( + ((d = c.filter(function (a) { + return 'interval' === a.type; + })), + 0 < d.length) + ) { + var c = d[0], + g = c.duration, + d = c.handler; + c.due = b + g; + c.subscription = a.schedule(f, g); + d(); + } else if ( + ((c = c.filter(function (a) { + return 'timeout' === a.type; + })), + 0 < c.length) + ) + (d = c[0]), + (c = d.handle), + (d = d.handler), + e.delete(c), + d(); + else + throw Error('Expected a due immediate or interval'); + }; + return { + immediate: { + setImmediate: function (c) { + var d = ++b; + e.set(d, { + due: a.now(), + duration: 0, + handle: d, + handler: c, + subscription: a.schedule(f, 0), + type: 'immediate' + }); + return d; + }, + clearImmediate: function (a) { + var b = e.get(a); + b && (b.subscription.unsubscribe(), e.delete(a)); + } + }, + interval: { + setInterval: function (c, d) { + void 0 === d && (d = 0); + var g = ++b; + e.set(g, { + due: a.now() + d, + duration: d, + handle: g, + handler: c, + subscription: a.schedule(f, d), + type: 'interval' + }); + return g; + }, + clearInterval: function (a) { + var b = e.get(a); + b && (b.subscription.unsubscribe(), e.delete(a)); + } + }, + timeout: { + setTimeout: function (c, d) { + void 0 === d && (d = 0); + var g = ++b; + e.set(g, { + due: a.now() + d, + duration: d, + handle: g, + handler: c, + subscription: a.schedule(f, d), + type: 'timeout' + }); + return g; + }, + clearTimeout: function (a) { + var b = e.get(a); + b && (b.subscription.unsubscribe(), e.delete(a)); + } + } + }; + }; + a.prototype.run = function (b) { + var c = a.frameTimeFactor, + e = this.maxFrames; + a.frameTimeFactor = 1; + this.maxFrames = Infinity; + this.runMode = !0; + var f = this.createAnimator(), + g = this.createDelegates(); + U.delegate = f.delegate; + ja.delegate = this; + la.delegate = g.immediate; + ka.delegate = g.interval; + ea.delegate = g.timeout; + Da.delegate = this; + f = { + cold: this.createColdObservable.bind(this), + hot: this.createHotObservable.bind(this), + flush: this.flush.bind(this), + time: this.createTime.bind(this), + expectObservable: this.expectObservable.bind(this), + expectSubscriptions: this.expectSubscriptions.bind(this), + animate: f.animate + }; + try { + var l = b(f); + this.flush(); + return l; + } finally { + (a.frameTimeFactor = c), + (this.maxFrames = e), + (this.runMode = !1), + (U.delegate = void 0), + (ja.delegate = void 0), + (la.delegate = void 0), + (ka.delegate = void 0), + (ea.delegate = void 0), + (Da.delegate = void 0); + } + }; + a.frameTimeFactor = 10; + return a; + })(Sd), + af = Object.freeze({ TestScheduler: $e }), + xb = (function () { + return function (b, a, c, d) { + void 0 === d && (d = 'download_load'); + this.originalEvent = b; + this.xhr = a; + this.request = c; + this.type = d; + c = a.status; + d = a.responseType; + this.status = null !== c && void 0 !== c ? c : 0; + this.responseType = null !== d && void 0 !== d ? d : ''; + this.responseHeaders = (c = a.getAllResponseHeaders()) + ? c.split('\n').reduce(function (a, b) { + var c = b.indexOf(': '); + a[b.slice(0, c)] = b.slice(c + 2); + return a; + }, {}) + : {}; + this.response = Jd(a); + a = b.total; + this.loaded = b.loaded; + this.total = a; + }; + })(), + xa = S(function (b) { + return function (a, b, d) { + this.message = a; + this.name = 'AjaxError'; + this.xhr = b; + this.request = d; + this.status = b.status; + this.responseType = b.responseType; + var c; + try { + c = Jd(b); + } catch (f) { + c = b.responseText; + } + this.response = c; + }; + }), + Kd = (function () { + function b(a, b) { + xa.call(this, 'ajax timeout', a, b); + this.name = 'AjaxTimeoutError'; + return this; + } + b.prototype = Object.create(xa.prototype); + return b; + })(), + Le = N(function (b) { + return b.response; + }), + ca = (function () { + var b = function (a) { + return Me('string' === typeof a ? { url: a } : a); + }; + b.get = Fe; + b.post = Ge; + b.delete = He; + b.put = Ie; + b.patch = Je; + b.getJSON = Ke; + return b; + })(), + Oe = 'upload', + Md = 'download', + yb = 'loadstart', + zb = 'progress', + Ld = 'load', + Pe = Object.prototype.toString, + bf = Object.freeze({ + ajax: ca, + AjaxError: xa, + AjaxTimeoutError: Kd, + AjaxResponse: xb + }), + cf = { + url: '', + deserializer: function (b) { + return JSON.parse(b.data); + }, + serializer: function (b) { + return JSON.stringify(b); + } + }, + Wd = (function (b) { + function a(a, d) { + var c = b.call(this) || this; + c._socket = null; + if (a instanceof q) (c.destination = d), (c.source = a); + else { + d = c._config = V({}, cf); + c._output = new C(); + if ('string' === typeof a) d.url = a; + else for (var f in a) a.hasOwnProperty(f) && (d[f] = a[f]); + if (!d.WebSocketCtor && WebSocket) + d.WebSocketCtor = WebSocket; + else if (!d.WebSocketCtor) + throw Error('no WebSocket constructor can be found'); + c.destination = new ha(); + } + return c; + } + w(a, b); + a.prototype.lift = function (b) { + var c = new a(this._config, this.destination); + c.operator = b; + c.source = this; + return c; + }; + a.prototype._resetState = function () { + this._socket = null; + this.source || (this.destination = new ha()); + this._output = new C(); + }; + a.prototype.multiplex = function (a, b, e) { + var c = this; + return new q(function (d) { + try { + c.next(a()); + } catch (k) { + d.error(k); + } + var f = c.subscribe( + function (a) { + try { + e(a) && d.next(a); + } catch (v) { + d.error(v); + } + }, + function (a) { + return d.error(a); + }, + function () { + return d.complete(); + } + ); + return function () { + try { + c.next(b()); + } catch (k) { + d.error(k); + } + f.unsubscribe(); + }; + }); + }; + a.prototype._connectSocket = function () { + var a = this, + b = this._config, + e = b.WebSocketCtor, + f = b.protocol, + g = b.url, + b = b.binaryType, + l = this._output, + k = null; + try { + (this._socket = k = f ? new e(g, f) : new e(g)), + b && (this._socket.binaryType = b); + } catch (r) { + l.error(r); + return; + } + var m = new D(function () { + a._socket = null; + k && 1 === k.readyState && k.close(); + }); + k.onopen = function (b) { + if (a._socket) { + var c = a._config.openObserver; + c && c.next(b); + b = a.destination; + a.destination = ma.create( + function (b) { + if (1 === k.readyState) + try { + var c = a._config.serializer; + k.send(c(b)); + } catch (t) { + a.destination.error(t); + } + }, + function (b) { + var c = a._config.closingObserver; + c && c.next(void 0); + b && b.code + ? k.close(b.code, b.reason) + : l.error( + new TypeError( + 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }' + ) + ); + a._resetState(); + }, + function () { + var b = a._config.closingObserver; + b && b.next(void 0); + k.close(); + a._resetState(); + } + ); + b && + b instanceof ha && + m.add(b.subscribe(a.destination)); + } else k.close(), a._resetState(); + }; + k.onerror = function (b) { + a._resetState(); + l.error(b); + }; + k.onclose = function (b) { + k === a._socket && a._resetState(); + var c = a._config.closeObserver; + c && c.next(b); + b.wasClean ? l.complete() : l.error(b); + }; + k.onmessage = function (b) { + try { + var c = a._config.deserializer; + l.next(c(b)); + } catch (x) { + l.error(x); + } + }; + }; + a.prototype._subscribe = function (a) { + var b = this, + c = this.source; + if (c) return c.subscribe(a); + this._socket || this._connectSocket(); + this._output.subscribe(a); + a.add(function () { + var a = b._socket; + 0 === b._output.observers.length && + (!a || + (1 !== a.readyState && 0 !== a.readyState) || + a.close(), + b._resetState()); + }); + return a; + }; + a.prototype.unsubscribe = function () { + var a = this._socket; + !a || (1 !== a.readyState && 0 !== a.readyState) || a.close(); + this._resetState(); + b.prototype.unsubscribe.call(this); + }; + return a; + })(Bb), + df = Object.freeze({ + webSocket: function (b) { + return new Wd(b); + }, + WebSocketSubject: Wd + }), + ef = Object.freeze({ + fromFetch: function (b, a) { + void 0 === a && (a = {}); + var c = a.selector, + d = Xd(a, ['selector']); + return new q(function (a) { + var e = new AbortController(), + g = e.signal, + l = !0, + k = d.signal; + if (k) + if (k.aborted) e.abort(); + else { + var n = function () { + g.aborted || e.abort(); + }; + k.addEventListener('abort', n); + a.add(function () { + return k.removeEventListener('abort', n); + }); + } + var p = V(V({}, d), { signal: g }), + q = function (b) { + l = !1; + a.error(b); + }; + fetch(b, p) + .then(function (b) { + c + ? u(c(b)).subscribe( + new m( + a, + void 0, + function () { + l = !1; + a.complete(); + }, + q + ) + ) + : ((l = !1), a.next(b), a.complete()); + }) + .catch(q); + return function () { + l && e.abort(); + }; + }); + } + }); + g.operators = Ze; + g.testing = af; + g.ajax = bf; + g.webSocket = df; + g.fetch = ef; + g.Observable = q; + g.ConnectableObservable = Pa; + g.observable = oa; + g.animationFrames = function (b) { + return b ? Lb(b) : Re; + }; + g.Subject = C; + g.BehaviorSubject = Xc; + g.ReplaySubject = ha; + g.AsyncSubject = cb; + g.asap = Pd; + g.asapScheduler = Pd; + g.async = fb; + g.asyncScheduler = I; + g.queue = Qd; + g.queueScheduler = Qd; + g.animationFrame = Rd; + g.animationFrameScheduler = Rd; + g.VirtualTimeScheduler = Sd; + g.VirtualAction = Eb; + g.Scheduler = Db; + g.Subscription = D; + g.Subscriber = ma; + g.Notification = Na; + g.pipe = Va; + g.noop = B; + g.identity = E; + g.isObservable = function (b) { + return !!b && (b instanceof q || (p(b.lift) && p(b.subscribe))); + }; + g.lastValueFrom = function (b, a) { + var c = 'object' === typeof a; + return new Promise(function (d, e) { + var f = !1, + g; + b.subscribe({ + next: function (a) { + g = a; + f = !0; + }, + error: e, + complete: function () { + f ? d(g) : c ? d(a.defaultValue) : e(new ba()); + } + }); + }); + }; + g.firstValueFrom = function (b, a) { + var c = 'object' === typeof a; + return new Promise(function (d, e) { + var f = new wa({ + next: function (a) { + d(a); + f.unsubscribe(); + }, + error: e, + complete: function () { + c ? d(a.defaultValue) : e(new ba()); + } + }); + b.subscribe(f); + }); + }; + g.ArgumentOutOfRangeError = ob; + g.EmptyError = ba; + g.NotFoundError = id; + g.ObjectUnsubscribedError = Od; + g.SequenceError = hd; + g.TimeoutError = Wb; + g.UnsubscriptionError = Qa; + g.bindCallback = function (b, a, c) { + return Ga(!1, b, a, c); + }; + g.bindNodeCallback = function (b, a, c) { + return Ga(!0, b, a, c); + }; + g.combineLatest = Zb; + g.concat = sa; + g.connectable = function (b, a) { + void 0 === a && (a = Ye); + var c = null, + d = a.connector; + a = a.resetOnDisconnect; + var e = void 0 === a ? !0 : a, + f = d(); + a = new q(function (a) { + return f.subscribe(a); + }); + a.connect = function () { + if (!c || c.closed) + (c = ta(function () { + return b; + }).subscribe(f)), + e && + c.add(function () { + return (f = d()); + }); + return c; + }; + return a; + }; + g.defer = ta; + g.empty = function (b) { + return b ? be(b) : M; + }; + g.forkJoin = function () { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var a = na(b), + b = Xb(b), + c = b.args, + d = b.keys, + b = new q(function (a) { + var b = c.length; + if (b) + for ( + var e = Array(b), + g = b, + k = b, + n = function (b) { + var f = !1; + u(c[b]).subscribe( + new m( + a, + function (a) { + f || ((f = !0), k--); + e[b] = a; + }, + function () { + return g--; + }, + void 0, + function () { + (g && f) || + (k || a.next(d ? Yb(d, e) : e), + a.complete()); + } + ) + ); + }, + p = 0; + p < b; + p++ + ) + n(p); + else a.complete(); + }); + return a ? b.pipe(X(a)) : b; + }; + g.from = L; + g.fromEvent = eb; + g.fromEventPattern = cc; + g.generate = function (b, a, c, d, e) { + function f() { + var b; + return Sa(this, function (d) { + switch (d.label) { + case 0: + (b = k), (d.label = 1); + case 1: + return a && !a(b) ? [3, 4] : [4, l(b)]; + case 2: + d.sent(), (d.label = 3); + case 3: + return (b = c(b)), [3, 1]; + case 4: + return [2]; + } + }); + } + var g, l, k; + 1 === arguments.length + ? ((k = b.initialState), + (a = b.condition), + (c = b.iterate), + (g = b.resultSelector), + (l = void 0 === g ? E : g), + (e = b.scheduler)) + : ((k = b), !d || Ea(d) ? ((l = E), (e = d)) : (l = d)); + return ta( + e + ? function () { + return Sb(f(), e); + } + : f + ); + }; + g.iif = function (b, a, c) { + return ta(function () { + return b() ? a : c; + }); + }; + g.interval = dc; + g.merge = function () { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + var a = Q(b), + c = 'number' === typeof b[b.length - 1] ? b.pop() : Infinity; + return b.length ? (1 === b.length ? u(b[0]) : ra(c)(L(b, a))) : M; + }; + g.never = function () { + return Td; + }; + g.of = $a; + g.onErrorResumeNext = function () { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + return ec(Z(b))(M); + }; + g.pairs = function (b, a) { + return L(Object.entries(b), a); + }; + g.partition = function (b, a, c) { + return [O(a, c)(u(b)), O(fc(a, c))(u(b))]; + }; + g.race = function () { + for (var b = [], a = 0; a < arguments.length; a++) b[a] = arguments[a]; + b = Z(b); + return 1 === b.length ? u(b[0]) : new q(gc(b)); + }; + g.range = function (b, a, c) { + null == a && ((a = b), (b = 0)); + if (0 >= a) return M; + var d = a + b; + return new q( + c + ? function (a) { + var e = b; + return c.schedule(function () { + e < d ? (a.next(e++), this.schedule()) : a.complete(); + }); + } + : function (a) { + for (var c = b; c < d && !a.closed; ) a.next(c++); + a.complete(); + } + ); + }; + g.throwError = Vb; + g.timer = Y; + g.using = function (b, a) { + return new q(function (c) { + var d = b(), + e = a(d); + (e ? u(e) : M).subscribe(c); + return function () { + d && d.unsubscribe(); + }; + }); + }; + g.zip = gb; + g.scheduled = Ub; + g.EMPTY = M; + g.NEVER = Td; + g.config = T; + g.audit = hb; + g.auditTime = hc; + g.buffer = ic; + g.bufferCount = jc; + g.bufferTime = kc; + g.bufferToggle = lc; + g.bufferWhen = mc; + g.catchError = ib; + g.combineAll = Ia; + g.combineLatestAll = Ia; + g.combineLatestWith = pc; + g.concatAll = Ha; + g.concatMap = Ja; + g.concatMapTo = qc; + g.concatWith = sc; + g.connect = Ka; + g.count = tc; + g.debounce = uc; + g.debounceTime = vc; + g.defaultIfEmpty = ua; + g.delay = wc; + g.delayWhen = La; + g.dematerialize = xc; + g.distinct = yc; + g.distinctUntilChanged = nb; + g.distinctUntilKeyChanged = zc; + g.elementAt = Ac; + g.endWith = Bc; + g.every = Cc; + g.exhaust = Ma; + g.exhaustAll = Ma; + g.exhaustMap = pb; + g.expand = Dc; + g.filter = O; + g.finalize = Ec; + g.find = Fc; + g.findIndex = Hc; + g.first = Ic; + g.groupBy = Jc; + g.ignoreElements = lb; + g.isEmpty = Kc; + g.last = Lc; + g.map = N; + g.mapTo = mb; + g.materialize = Mc; + g.max = Nc; + g.mergeAll = ra; + g.flatMap = H; + g.mergeMap = H; + g.mergeMapTo = Oc; + g.mergeScan = Pc; + g.mergeWith = Rc; + g.min = Sc; + g.multicast = Oa; + g.observeOn = pa; + g.pairwise = Tc; + g.pluck = Uc; + g.publish = Vc; + g.publishBehavior = Wc; + g.publishLast = Yc; + g.publishReplay = Zc; + g.raceWith = rb; + g.reduce = ga; + g.repeat = $c; + g.repeatWhen = ad; + g.retry = bd; + g.retryWhen = cd; + g.refCount = Wa; + g.sample = sb; + g.sampleTime = dd; + g.scan = tb; + g.sequenceEqual = ed; + g.share = ub; + g.shareReplay = fd; + g.single = gd; + g.skip = jd; + g.skipLast = kd; + g.skipUntil = ld; + g.skipWhile = md; + g.startWith = nd; + g.subscribeOn = qa; + g.switchAll = od; + g.switchMap = ia; + g.switchMapTo = pd; + g.switchScan = qd; + g.take = aa; + g.takeLast = qb; + g.takeUntil = rd; + g.takeWhile = sd; + g.tap = td; + g.throttle = wb; + g.throttleTime = vd; + g.throwIfEmpty = va; + g.timeInterval = wd; + g.timeout = bb; + g.timeoutWith = xd; + g.timestamp = yd; + g.toArray = jb; + g.window = zd; + g.windowCount = Ad; + g.windowTime = Bd; + g.windowToggle = Cd; + g.windowWhen = Dd; + g.withLatestFrom = Ed; + g.zipAll = Fd; + g.zipWith = Hd; + Object.defineProperty(g, '__esModule', { value: !0 }); +}); +//# sourceMappingURL=rxjs.umd.min.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/Subscriber.js b/node_modules/rxjs/dist/cjs/internal/Subscriber.js index 7dfd60a9e..ed92f0222 100644 --- a/node_modules/rxjs/dist/cjs/internal/Subscriber.js +++ b/node_modules/rxjs/dist/cjs/internal/Subscriber.js @@ -1,50 +1,78 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { +'use strict'; +var __extends = + (this && this.__extends) || + (function () { + var extendStatics = function (d, b) { + extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) + if (Object.prototype.hasOwnProperty.call(b, p)) + d[p] = b[p]; + }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== 'function' && b !== null) + throw new TypeError( + 'Class extends value ' + + String(b) + + ' is not a constructor or null' + ); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); +var __read = + (this && this.__read) || + function (o, n) { + var m = typeof Symbol === 'function' && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; try { - if (r && !r.done && (m = i["return"])) m.call(i); + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error: error }; + } finally { + try { + if (r && !r.done && (m = i['return'])) m.call(i); + } finally { + if (e) throw e.error; + } } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); + return ar; + }; +var __spreadArray = + (this && this.__spreadArray) || + function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; +Object.defineProperty(exports, '__esModule', { value: true }); exports.EMPTY_OBSERVER = exports.SafeSubscriber = exports.Subscriber = void 0; -var isFunction_1 = require("./util/isFunction"); -var Subscription_1 = require("./Subscription"); -var config_1 = require("./config"); -var reportUnhandledError_1 = require("./util/reportUnhandledError"); -var noop_1 = require("./util/noop"); -var NotificationFactories_1 = require("./NotificationFactories"); -var timeoutProvider_1 = require("./scheduler/timeoutProvider"); -var errorContext_1 = require("./util/errorContext"); +var isFunction_1 = require('./util/isFunction'); +var Subscription_1 = require('./Subscription'); +var config_1 = require('./config'); +var reportUnhandledError_1 = require('./util/reportUnhandledError'); +var noop_1 = require('./util/noop'); +var NotificationFactories_1 = require('./NotificationFactories'); +var timeoutProvider_1 = require('./scheduler/timeoutProvider'); +var errorContext_1 = require('./util/errorContext'); var Subscriber = (function (_super) { __extends(Subscriber, _super); function Subscriber(destination) { @@ -55,8 +83,7 @@ var Subscriber = (function (_super) { if (Subscription_1.isSubscription(destination)) { destination.add(_this); } - } - else { + } else { _this.destination = exports.EMPTY_OBSERVER; } return _this; @@ -66,26 +93,32 @@ var Subscriber = (function (_super) { }; Subscriber.prototype.next = function (value) { if (this.isStopped) { - handleStoppedNotification(NotificationFactories_1.nextNotification(value), this); - } - else { + handleStoppedNotification( + NotificationFactories_1.nextNotification(value), + this + ); + } else { this._next(value); } }; Subscriber.prototype.error = function (err) { if (this.isStopped) { - handleStoppedNotification(NotificationFactories_1.errorNotification(err), this); - } - else { + handleStoppedNotification( + NotificationFactories_1.errorNotification(err), + this + ); + } else { this.isStopped = true; this._error(err); } }; Subscriber.prototype.complete = function () { if (this.isStopped) { - handleStoppedNotification(NotificationFactories_1.COMPLETE_NOTIFICATION, this); - } - else { + handleStoppedNotification( + NotificationFactories_1.COMPLETE_NOTIFICATION, + this + ); + } else { this.isStopped = true; this._complete(); } @@ -103,21 +136,19 @@ var Subscriber = (function (_super) { Subscriber.prototype._error = function (err) { try { this.destination.error(err); - } - finally { + } finally { this.unsubscribe(); } }; Subscriber.prototype._complete = function () { try { this.destination.complete(); - } - finally { + } finally { this.unsubscribe(); } }; return Subscriber; -}(Subscription_1.Subscription)); +})(Subscription_1.Subscription); exports.Subscriber = Subscriber; var SafeSubscriber = (function (_super) { __extends(SafeSubscriber, _super); @@ -126,30 +157,48 @@ var SafeSubscriber = (function (_super) { var next; if (isFunction_1.isFunction(observerOrNext)) { next = observerOrNext; - } - else if (observerOrNext) { - (next = observerOrNext.next, error = observerOrNext.error, complete = observerOrNext.complete); + } else if (observerOrNext) { + (next = observerOrNext.next), + (error = observerOrNext.error), + (complete = observerOrNext.complete); var context_1; if (_this && config_1.config.useDeprecatedNextContext) { context_1 = Object.create(observerOrNext); - context_1.unsubscribe = function () { return _this.unsubscribe(); }; - } - else { + context_1.unsubscribe = function () { + return _this.unsubscribe(); + }; + } else { context_1 = observerOrNext; } - next = next === null || next === void 0 ? void 0 : next.bind(context_1); - error = error === null || error === void 0 ? void 0 : error.bind(context_1); - complete = complete === null || complete === void 0 ? void 0 : complete.bind(context_1); + next = + next === null || next === void 0 + ? void 0 + : next.bind(context_1); + error = + error === null || error === void 0 + ? void 0 + : error.bind(context_1); + complete = + complete === null || complete === void 0 + ? void 0 + : complete.bind(context_1); } _this.destination = { next: next ? wrapForErrorHandling(next, _this) : noop_1.noop, - error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler, _this), - complete: complete ? wrapForErrorHandling(complete, _this) : noop_1.noop, + error: wrapForErrorHandling( + error !== null && error !== void 0 + ? error + : defaultErrorHandler, + _this + ), + complete: complete + ? wrapForErrorHandling(complete, _this) + : noop_1.noop }; return _this; } return SafeSubscriber; -}(Subscriber)); +})(Subscriber); exports.SafeSubscriber = SafeSubscriber; function wrapForErrorHandling(handler, instance) { return function () { @@ -159,12 +208,10 @@ function wrapForErrorHandling(handler, instance) { } try { handler.apply(void 0, __spreadArray([], __read(args))); - } - catch (err) { + } catch (err) { if (config_1.config.useDeprecatedSynchronousErrorHandling) { errorContext_1.captureError(err); - } - else { + } else { reportUnhandledError_1.reportUnhandledError(err); } } @@ -175,12 +222,15 @@ function defaultErrorHandler(err) { } function handleStoppedNotification(notification, subscriber) { var onStoppedNotification = config_1.config.onStoppedNotification; - onStoppedNotification && timeoutProvider_1.timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); }); + onStoppedNotification && + timeoutProvider_1.timeoutProvider.setTimeout(function () { + return onStoppedNotification(notification, subscriber); + }); } exports.EMPTY_OBSERVER = { closed: true, next: noop_1.noop, error: defaultErrorHandler, - complete: noop_1.noop, + complete: noop_1.noop }; -//# sourceMappingURL=Subscriber.js.map \ No newline at end of file +//# sourceMappingURL=Subscriber.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js b/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js index 82e4d18ae..c10f82d83 100644 --- a/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js +++ b/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js @@ -1,26 +1,45 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +var __extends = + (this && this.__extends) || + (function () { + var extendStatics = function (d, b) { + extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) + if (Object.prototype.hasOwnProperty.call(b, p)) + d[p] = b[p]; + }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== 'function' && b !== null) + throw new TypeError( + 'Class extends value ' + + String(b) + + ' is not a constructor or null' + ); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); +Object.defineProperty(exports, '__esModule', { value: true }); exports.ConnectableObservable = void 0; -var Observable_1 = require("../Observable"); -var Subscription_1 = require("../Subscription"); -var refCount_1 = require("../operators/refCount"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -var lift_1 = require("../util/lift"); +var Observable_1 = require('../Observable'); +var Subscription_1 = require('../Subscription'); +var refCount_1 = require('../operators/refCount'); +var OperatorSubscriber_1 = require('../operators/OperatorSubscriber'); +var lift_1 = require('../util/lift'); var ConnectableObservable = (function (_super) { __extends(ConnectableObservable, _super); function ConnectableObservable(source, subjectFactory) { @@ -49,7 +68,9 @@ var ConnectableObservable = (function (_super) { this._refCount = 0; var _connection = this._connection; this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + _connection === null || _connection === void 0 + ? void 0 + : _connection.unsubscribe(); }; ConnectableObservable.prototype.connect = function () { var _this = this; @@ -57,13 +78,25 @@ var ConnectableObservable = (function (_super) { if (!connection) { connection = this._connection = new Subscription_1.Subscription(); var subject_1 = this.getSubject(); - connection.add(this.source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subject_1, undefined, function () { - _this._teardown(); - subject_1.complete(); - }, function (err) { - _this._teardown(); - subject_1.error(err); - }, function () { return _this._teardown(); }))); + connection.add( + this.source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subject_1, + undefined, + function () { + _this._teardown(); + subject_1.complete(); + }, + function (err) { + _this._teardown(); + subject_1.error(err); + }, + function () { + return _this._teardown(); + } + ) + ) + ); if (connection.closed) { this._connection = null; connection = Subscription_1.Subscription.EMPTY; @@ -75,6 +108,6 @@ var ConnectableObservable = (function (_super) { return refCount_1.refCount()(this); }; return ConnectableObservable; -}(Observable_1.Observable)); +})(Observable_1.Observable); exports.ConnectableObservable = ConnectableObservable; -//# sourceMappingURL=ConnectableObservable.js.map \ No newline at end of file +//# sourceMappingURL=ConnectableObservable.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js b/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js index 54da93751..e5438d961 100644 --- a/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js +++ b/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js @@ -1,15 +1,15 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.combineLatestInit = exports.combineLatest = void 0; -var Observable_1 = require("../Observable"); -var argsArgArrayOrObject_1 = require("../util/argsArgArrayOrObject"); -var from_1 = require("./from"); -var identity_1 = require("../util/identity"); -var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); -var args_1 = require("../util/args"); -var createObject_1 = require("../util/createObject"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -var executeSchedule_1 = require("../util/executeSchedule"); +var Observable_1 = require('../Observable'); +var argsArgArrayOrObject_1 = require('../util/argsArgArrayOrObject'); +var from_1 = require('./from'); +var identity_1 = require('../util/identity'); +var mapOneOrManyArgs_1 = require('../util/mapOneOrManyArgs'); +var args_1 = require('../util/args'); +var createObject_1 = require('../util/createObject'); +var OperatorSubscriber_1 = require('../operators/OperatorSubscriber'); +var executeSchedule_1 = require('../util/executeSchedule'); function combineLatest() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -17,59 +17,86 @@ function combineLatest() { } var scheduler = args_1.popScheduler(args); var resultSelector = args_1.popResultSelector(args); - var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), + observables = _a.args, + keys = _a.keys; if (observables.length === 0) { return from_1.from([], scheduler); } - var result = new Observable_1.Observable(combineLatestInit(observables, scheduler, keys - ? - function (values) { return createObject_1.createObject(keys, values); } - : - identity_1.identity)); - return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + var result = new Observable_1.Observable( + combineLatestInit( + observables, + scheduler, + keys + ? function (values) { + return createObject_1.createObject(keys, values); + } + : identity_1.identity + ) + ); + return resultSelector + ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) + : result; } exports.combineLatest = combineLatest; function combineLatestInit(observables, scheduler, valueTransform) { - if (valueTransform === void 0) { valueTransform = identity_1.identity; } + if (valueTransform === void 0) { + valueTransform = identity_1.identity; + } return function (subscriber) { - maybeSchedule(scheduler, function () { - var length = observables.length; - var values = new Array(length); - var active = length; - var remainingFirstValues = length; - var _loop_1 = function (i) { - maybeSchedule(scheduler, function () { - var source = from_1.from(observables[i], scheduler); - var hasFirstValue = false; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - values[i] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, function () { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - }; - for (var i = 0; i < length; i++) { - _loop_1(i); - } - }, subscriber); + maybeSchedule( + scheduler, + function () { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function (i) { + maybeSchedule( + scheduler, + function () { + var source = from_1.from(observables[i], scheduler); + var hasFirstValue = false; + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + values[i] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next( + valueTransform(values.slice()) + ); + } + }, + function () { + if (!--active) { + subscriber.complete(); + } + } + ) + ); + }, + subscriber + ); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, + subscriber + ); }; } exports.combineLatestInit = combineLatestInit; function maybeSchedule(scheduler, execute, subscription) { if (scheduler) { executeSchedule_1.executeSchedule(subscription, scheduler, execute); - } - else { + } else { execute(); } } -//# sourceMappingURL=combineLatest.js.map \ No newline at end of file +//# sourceMappingURL=combineLatest.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js index f964c6c1c..0e0c119bf 100644 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js @@ -1,43 +1,72 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; +'use strict'; +var __extends = + (this && this.__extends) || + (function () { + var extendStatics = function (d, b) { + extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) + if (Object.prototype.hasOwnProperty.call(b, p)) + d[p] = b[p]; + }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== 'function' && b !== null) + throw new TypeError( + 'Class extends value ' + + String(b) + + ' is not a constructor or null' + ); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); +var __assign = + (this && this.__assign) || + function () { + __assign = + Object.assign || + function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, '__esModule', { value: true }); exports.WebSocketSubject = void 0; -var Subject_1 = require("../../Subject"); -var Subscriber_1 = require("../../Subscriber"); -var Observable_1 = require("../../Observable"); -var Subscription_1 = require("../../Subscription"); -var ReplaySubject_1 = require("../../ReplaySubject"); +var Subject_1 = require('../../Subject'); +var Subscriber_1 = require('../../Subscriber'); +var Observable_1 = require('../../Observable'); +var Subscription_1 = require('../../Subscription'); +var ReplaySubject_1 = require('../../ReplaySubject'); var DEFAULT_WEBSOCKET_CONFIG = { url: '', - deserializer: function (e) { return JSON.parse(e.data); }, - serializer: function (value) { return JSON.stringify(value); }, + deserializer: function (e) { + return JSON.parse(e.data); + }, + serializer: function (value) { + return JSON.stringify(value); + } }; -var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; +var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = + 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; var WebSocketSubject = (function (_super) { __extends(WebSocketSubject, _super); function WebSocketSubject(urlConfigOrSource, destination) { @@ -46,14 +75,15 @@ var WebSocketSubject = (function (_super) { if (urlConfigOrSource instanceof Observable_1.Observable) { _this.destination = destination; _this.source = urlConfigOrSource; - } - else { - var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG)); + } else { + var config = (_this._config = __assign( + {}, + DEFAULT_WEBSOCKET_CONFIG + )); _this._output = new Subject_1.Subject(); if (typeof urlConfigOrSource === 'string') { config.url = urlConfigOrSource; - } - else { + } else { for (var key in urlConfigOrSource) { if (urlConfigOrSource.hasOwnProperty(key)) { config[key] = urlConfigOrSource[key]; @@ -62,8 +92,7 @@ var WebSocketSubject = (function (_super) { } if (!config.WebSocketCtor && WebSocket) { config.WebSocketCtor = WebSocket; - } - else if (!config.WebSocketCtor) { + } else if (!config.WebSocketCtor) { throw new Error('no WebSocket constructor can be found'); } _this.destination = new ReplaySubject_1.ReplaySubject(); @@ -83,30 +112,39 @@ var WebSocketSubject = (function (_super) { } this._output = new Subject_1.Subject(); }; - WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) { + WebSocketSubject.prototype.multiplex = function ( + subMsg, + unsubMsg, + messageFilter + ) { var self = this; return new Observable_1.Observable(function (observer) { try { self.next(subMsg()); - } - catch (err) { + } catch (err) { observer.error(err); } - var subscription = self.subscribe(function (x) { - try { - if (messageFilter(x)) { - observer.next(x); + var subscription = self.subscribe( + function (x) { + try { + if (messageFilter(x)) { + observer.next(x); + } + } catch (err) { + observer.error(err); } + }, + function (err) { + return observer.error(err); + }, + function () { + return observer.complete(); } - catch (err) { - observer.error(err); - } - }, function (err) { return observer.error(err); }, function () { return observer.complete(); }); + ); return function () { try { self.next(unsubMsg()); - } - catch (err) { + } catch (err) { observer.error(err); } subscription.unsubscribe(); @@ -115,17 +153,22 @@ var WebSocketSubject = (function (_super) { }; WebSocketSubject.prototype._connectSocket = function () { var _this = this; - var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType; + var _a = this._config, + WebSocketCtor = _a.WebSocketCtor, + protocol = _a.protocol, + url = _a.url, + binaryType = _a.binaryType; var observer = this._output; var socket = null; try { - socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); + socket = protocol + ? new WebSocketCtor(url, protocol) + : new WebSocketCtor(url); this._socket = socket; if (binaryType) { this._socket.binaryType = binaryType; } - } - catch (e) { + } catch (e) { observer.error(e); return; } @@ -147,36 +190,40 @@ var WebSocketSubject = (function (_super) { openObserver.next(evt); } var queue = _this.destination; - _this.destination = Subscriber_1.Subscriber.create(function (x) { - if (socket.readyState === 1) { - try { - var serializer = _this._config.serializer; - socket.send(serializer(x)); + _this.destination = Subscriber_1.Subscriber.create( + function (x) { + if (socket.readyState === 1) { + try { + var serializer = _this._config.serializer; + socket.send(serializer(x)); + } catch (e) { + _this.destination.error(e); + } } - catch (e) { - _this.destination.error(e); + }, + function (err) { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); } + if (err && err.code) { + socket.close(err.code, err.reason); + } else { + observer.error( + new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT) + ); + } + _this._resetState(); + }, + function () { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); + } + socket.close(); + _this._resetState(); } - }, function (err) { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - if (err && err.code) { - socket.close(err.code, err.reason); - } - else { - observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); - } - _this._resetState(); - }, function () { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - socket.close(); - _this._resetState(); - }); + ); if (queue && queue instanceof ReplaySubject_1.ReplaySubject) { subscription.add(queue.subscribe(_this.destination)); } @@ -195,8 +242,7 @@ var WebSocketSubject = (function (_super) { } if (e.wasClean) { observer.complete(); - } - else { + } else { observer.error(e); } }; @@ -204,8 +250,7 @@ var WebSocketSubject = (function (_super) { try { var deserializer = _this._config.deserializer; observer.next(deserializer(e)); - } - catch (err) { + } catch (err) { observer.error(err); } }; @@ -223,7 +268,10 @@ var WebSocketSubject = (function (_super) { subscriber.add(function () { var _socket = _this._socket; if (_this._output.observers.length === 0) { - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + if ( + _socket && + (_socket.readyState === 1 || _socket.readyState === 0) + ) { _socket.close(); } _this._resetState(); @@ -240,6 +288,6 @@ var WebSocketSubject = (function (_super) { _super.prototype.unsubscribe.call(this); }; return WebSocketSubject; -}(Subject_1.AnonymousSubject)); +})(Subject_1.AnonymousSubject); exports.WebSocketSubject = WebSocketSubject; -//# sourceMappingURL=WebSocketSubject.js.map \ No newline at end of file +//# sourceMappingURL=WebSocketSubject.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js index 12a6e81a7..647ca6f72 100644 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js @@ -1,34 +1,52 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) +'use strict'; +var __assign = + (this && this.__assign) || + function () { + __assign = + Object.assign || + function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; +var __rest = + (this && this.__rest) || + function (s, e) { + var t = {}; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - } + if (s != null && typeof Object.getOwnPropertySymbols === 'function') + for ( + var i = 0, p = Object.getOwnPropertySymbols(s); + i < p.length; + i++ + ) { + if ( + e.indexOf(p[i]) < 0 && + Object.prototype.propertyIsEnumerable.call(s, p[i]) + ) + t[p[i]] = s[p[i]]; + } return t; }; - return __assign.apply(this, arguments); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, '__esModule', { value: true }); exports.fromFetch = void 0; -var OperatorSubscriber_1 = require("../../operators/OperatorSubscriber"); -var Observable_1 = require("../../Observable"); -var innerFrom_1 = require("../../observable/innerFrom"); +var OperatorSubscriber_1 = require('../../operators/OperatorSubscriber'); +var Observable_1 = require('../../Observable'); +var innerFrom_1 = require('../../observable/innerFrom'); function fromFetch(input, initWithSelector) { - if (initWithSelector === void 0) { initWithSelector = {}; } - var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]); + if (initWithSelector === void 0) { + initWithSelector = {}; + } + var selector = initWithSelector.selector, + init = __rest(initWithSelector, ['selector']); return new Observable_1.Observable(function (subscriber) { var controller = new AbortController(); var signal = controller.signal; @@ -37,36 +55,48 @@ function fromFetch(input, initWithSelector) { if (outerSignal) { if (outerSignal.aborted) { controller.abort(); - } - else { + } else { var outerSignalHandler_1 = function () { if (!signal.aborted) { controller.abort(); } }; outerSignal.addEventListener('abort', outerSignalHandler_1); - subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); }); + subscriber.add(function () { + return outerSignal.removeEventListener( + 'abort', + outerSignalHandler_1 + ); + }); } } - var perSubscriberInit = __assign(__assign({}, init), { signal: signal }); + var perSubscriberInit = __assign(__assign({}, init), { + signal: signal + }); var handleError = function (err) { abortable = false; subscriber.error(err); }; fetch(input, perSubscriberInit) .then(function (response) { - if (selector) { - innerFrom_1.innerFrom(selector(response)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, function () { + if (selector) { + innerFrom_1.innerFrom(selector(response)).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + undefined, + function () { + abortable = false; + subscriber.complete(); + }, + handleError + ) + ); + } else { abortable = false; + subscriber.next(response); subscriber.complete(); - }, handleError)); - } - else { - abortable = false; - subscriber.next(response); - subscriber.complete(); - } - }) + } + }) .catch(handleError); return function () { if (abortable) { @@ -76,4 +106,4 @@ function fromFetch(input, initWithSelector) { }); } exports.fromFetch = fromFetch; -//# sourceMappingURL=fetch.js.map \ No newline at end of file +//# sourceMappingURL=fetch.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js b/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js index 9e51a12ab..83210cc30 100644 --- a/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js +++ b/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js @@ -1,20 +1,22 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.forkJoin = void 0; -var Observable_1 = require("../Observable"); -var argsArgArrayOrObject_1 = require("../util/argsArgArrayOrObject"); -var innerFrom_1 = require("./innerFrom"); -var args_1 = require("../util/args"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); -var createObject_1 = require("../util/createObject"); +var Observable_1 = require('../Observable'); +var argsArgArrayOrObject_1 = require('../util/argsArgArrayOrObject'); +var innerFrom_1 = require('./innerFrom'); +var args_1 = require('../util/args'); +var OperatorSubscriber_1 = require('../operators/OperatorSubscriber'); +var mapOneOrManyArgs_1 = require('../util/mapOneOrManyArgs'); +var createObject_1 = require('../util/createObject'); function forkJoin() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } var resultSelector = args_1.popResultSelector(args); - var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), + sources = _a.args, + keys = _a.keys; var result = new Observable_1.Observable(function (subscriber) { var length = sources.length; if (!length) { @@ -26,26 +28,45 @@ function forkJoin() { var remainingEmissions = length; var _loop_1 = function (sourceIndex) { var hasValue = false; - innerFrom_1.innerFrom(sources[sourceIndex]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, function () { return remainingCompletions--; }, undefined, function () { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject_1.createObject(keys, values) : values); + innerFrom_1.innerFrom(sources[sourceIndex]).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, + function () { + return remainingCompletions--; + }, + undefined, + function () { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next( + keys + ? createObject_1.createObject( + keys, + values + ) + : values + ); + } + subscriber.complete(); + } } - subscriber.complete(); - } - })); + ) + ); }; for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { _loop_1(sourceIndex); } }); - return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + return resultSelector + ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) + : result; } exports.forkJoin = forkJoin; -//# sourceMappingURL=forkJoin.js.map \ No newline at end of file +//# sourceMappingURL=forkJoin.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/observable/race.js b/node_modules/rxjs/dist/cjs/internal/observable/race.js index 22ed0388a..5066b061f 100644 --- a/node_modules/rxjs/dist/cjs/internal/observable/race.js +++ b/node_modules/rxjs/dist/cjs/internal/observable/race.js @@ -1,37 +1,50 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.raceInit = exports.race = void 0; -var Observable_1 = require("../Observable"); -var innerFrom_1 = require("./innerFrom"); -var argsOrArgArray_1 = require("../util/argsOrArgArray"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); +var Observable_1 = require('../Observable'); +var innerFrom_1 = require('./innerFrom'); +var argsOrArgArray_1 = require('../util/argsOrArgArray'); +var OperatorSubscriber_1 = require('../operators/OperatorSubscriber'); function race() { var sources = []; for (var _i = 0; _i < arguments.length; _i++) { sources[_i] = arguments[_i]; } sources = argsOrArgArray_1.argsOrArgArray(sources); - return sources.length === 1 ? innerFrom_1.innerFrom(sources[0]) : new Observable_1.Observable(raceInit(sources)); + return sources.length === 1 + ? innerFrom_1.innerFrom(sources[0]) + : new Observable_1.Observable(raceInit(sources)); } exports.race = race; function raceInit(sources) { return function (subscriber) { var subscriptions = []; var _loop_1 = function (i) { - subscriptions.push(innerFrom_1.innerFrom(sources[i]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - if (subscriptions) { - for (var s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); + subscriptions.push( + innerFrom_1.innerFrom(sources[i]).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + } + ) + ) + ); }; - for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + for ( + var i = 0; + subscriptions && !subscriber.closed && i < sources.length; + i++ + ) { _loop_1(i); } }; } exports.raceInit = raceInit; -//# sourceMappingURL=race.js.map \ No newline at end of file +//# sourceMappingURL=race.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/observable/zip.js b/node_modules/rxjs/dist/cjs/internal/observable/zip.js index 71b39e0db..378ce8a34 100644 --- a/node_modules/rxjs/dist/cjs/internal/observable/zip.js +++ b/node_modules/rxjs/dist/cjs/internal/observable/zip.js @@ -1,33 +1,42 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { +'use strict'; +var __read = + (this && this.__read) || + function (o, n) { + var m = typeof Symbol === 'function' && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; try { - if (r && !r.done && (m = i["return"])) m.call(i); + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error: error }; + } finally { + try { + if (r && !r.done && (m = i['return'])) m.call(i); + } finally { + if (e) throw e.error; + } } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); + return ar; + }; +var __spreadArray = + (this && this.__spreadArray) || + function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; +Object.defineProperty(exports, '__esModule', { value: true }); exports.zip = void 0; -var Observable_1 = require("../Observable"); -var innerFrom_1 = require("./innerFrom"); -var argsOrArgArray_1 = require("../util/argsOrArgArray"); -var empty_1 = require("./empty"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -var args_1 = require("../util/args"); +var Observable_1 = require('../Observable'); +var innerFrom_1 = require('./innerFrom'); +var argsOrArgArray_1 = require('../util/argsOrArgArray'); +var empty_1 = require('./empty'); +var OperatorSubscriber_1 = require('../operators/OperatorSubscriber'); +var args_1 = require('../util/args'); function zip() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -37,34 +46,69 @@ function zip() { var sources = argsOrArgArray_1.argsOrArgArray(args); return sources.length ? new Observable_1.Observable(function (subscriber) { - var buffers = sources.map(function () { return []; }); - var completed = sources.map(function () { return false; }); - subscriber.add(function () { - buffers = completed = null; - }); - var _loop_1 = function (sourceIndex) { - innerFrom_1.innerFrom(sources[sourceIndex]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - buffers[sourceIndex].push(value); - if (buffers.every(function (buffer) { return buffer.length; })) { - var result = buffers.map(function (buffer) { return buffer.shift(); }); - subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); - if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { - subscriber.complete(); - } - } - }, function () { - completed[sourceIndex] = true; - !buffers[sourceIndex].length && subscriber.complete(); - })); - }; - for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - _loop_1(sourceIndex); - } - return function () { - buffers = completed = null; - }; - }) + var buffers = sources.map(function () { + return []; + }); + var completed = sources.map(function () { + return false; + }); + subscriber.add(function () { + buffers = completed = null; + }); + var _loop_1 = function (sourceIndex) { + innerFrom_1.innerFrom(sources[sourceIndex]).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + buffers[sourceIndex].push(value); + if ( + buffers.every(function (buffer) { + return buffer.length; + }) + ) { + var result = buffers.map(function (buffer) { + return buffer.shift(); + }); + subscriber.next( + resultSelector + ? resultSelector.apply( + void 0, + __spreadArray( + [], + __read(result) + ) + ) + : result + ); + if ( + buffers.some(function (buffer, i) { + return !buffer.length && completed[i]; + }) + ) { + subscriber.complete(); + } + } + }, + function () { + completed[sourceIndex] = true; + !buffers[sourceIndex].length && + subscriber.complete(); + } + ) + ); + }; + for ( + var sourceIndex = 0; + !subscriber.closed && sourceIndex < sources.length; + sourceIndex++ + ) { + _loop_1(sourceIndex); + } + return function () { + buffers = completed = null; + }; + }) : empty_1.EMPTY; } exports.zip = zip; -//# sourceMappingURL=zip.js.map \ No newline at end of file +//# sourceMappingURL=zip.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js b/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js index 37e141e60..b97159b86 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js @@ -1,62 +1,82 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +var __extends = + (this && this.__extends) || + (function () { + var extendStatics = function (d, b) { + extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) + if (Object.prototype.hasOwnProperty.call(b, p)) + d[p] = b[p]; + }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== 'function' && b !== null) + throw new TypeError( + 'Class extends value ' + + String(b) + + ' is not a constructor or null' + ); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); +Object.defineProperty(exports, '__esModule', { value: true }); exports.OperatorSubscriber = void 0; -var Subscriber_1 = require("../Subscriber"); +var Subscriber_1 = require('../Subscriber'); var OperatorSubscriber = (function (_super) { __extends(OperatorSubscriber, _super); - function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + function OperatorSubscriber( + destination, + onNext, + onComplete, + onError, + onFinalize + ) { var _this = _super.call(this, destination) || this; _this.onFinalize = onFinalize; _this._next = onNext ? function (value) { - try { - onNext(value); - } - catch (err) { - destination.error(err); - } - } + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } : _super.prototype._next; _this._error = onError ? function (err) { - try { - onError(err); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } + try { + onError(err); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._error; _this._complete = onComplete ? function () { - try { - onComplete(); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } + try { + onComplete(); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._complete; return _this; } @@ -64,9 +84,12 @@ var OperatorSubscriber = (function (_super) { var _a; var closed = this.closed; _super.prototype.unsubscribe.call(this); - !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + !closed && + ((_a = this.onFinalize) === null || _a === void 0 + ? void 0 + : _a.call(this)); }; return OperatorSubscriber; -}(Subscriber_1.Subscriber)); +})(Subscriber_1.Subscriber); exports.OperatorSubscriber = OperatorSubscriber; -//# sourceMappingURL=OperatorSubscriber.js.map \ No newline at end of file +//# sourceMappingURL=OperatorSubscriber.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/audit.js b/node_modules/rxjs/dist/cjs/internal/operators/audit.js index b73b57182..00fe6850c 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/audit.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/audit.js @@ -1,9 +1,9 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.audit = void 0; -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var innerFrom_1 = require('../observable/innerFrom'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function audit(durationSelector) { return lift_1.operate(function (source, subscriber) { var hasValue = false; @@ -11,7 +11,9 @@ function audit(durationSelector) { var durationSubscriber = null; var isComplete = false; var endDuration = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); durationSubscriber = null; if (hasValue) { hasValue = false; @@ -25,17 +27,35 @@ function audit(durationSelector) { durationSubscriber = null; isComplete && subscriber.complete(); }; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom_1.innerFrom(durationSelector(value)).subscribe((durationSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, endDuration, cleanupDuration))); - } - }, function () { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom_1 + .innerFrom(durationSelector(value)) + .subscribe( + (durationSubscriber = + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + endDuration, + cleanupDuration + )) + ); + } + }, + function () { + isComplete = true; + (!hasValue || + !durationSubscriber || + durationSubscriber.closed) && + subscriber.complete(); + } + ) + ); }); } exports.audit = audit; -//# sourceMappingURL=audit.js.map \ No newline at end of file +//# sourceMappingURL=audit.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/buffer.js b/node_modules/rxjs/dist/cjs/internal/operators/buffer.js index 1308e330e..cbc8d6d85 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/buffer.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/buffer.js @@ -1,25 +1,39 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.buffer = void 0; -var lift_1 = require("../util/lift"); -var noop_1 = require("../util/noop"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var noop_1 = require('../util/noop'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function buffer(closingNotifier) { return lift_1.operate(function (source, subscriber) { var currentBuffer = []; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - closingNotifier.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { - var b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, noop_1.noop)); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + return currentBuffer.push(value); + }, + function () { + subscriber.next(currentBuffer); + subscriber.complete(); + } + ) + ); + closingNotifier.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, + noop_1.noop + ) + ); return function () { currentBuffer = null; }; }); } exports.buffer = buffer; -//# sourceMappingURL=buffer.js.map \ No newline at end of file +//# sourceMappingURL=buffer.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js index 931290339..2f63cfad0 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js @@ -1,85 +1,141 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } +'use strict'; +var __values = + (this && this.__values) || + function (o) { + var s = typeof Symbol === 'function' && Symbol.iterator, + m = s && o[s], + i = 0; + if (m) return m.call(o); + if (o && typeof o.length === 'number') + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError( + s ? 'Object is not iterable.' : 'Symbol.iterator is not defined.' + ); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, '__esModule', { value: true }); exports.bufferCount = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var arrRemove_1 = require("../util/arrRemove"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var arrRemove_1 = require('../util/arrRemove'); function bufferCount(bufferSize, startBufferEvery) { - if (startBufferEvery === void 0) { startBufferEvery = null; } - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + if (startBufferEvery === void 0) { + startBufferEvery = null; + } + startBufferEvery = + startBufferEvery !== null && startBufferEvery !== void 0 + ? startBufferEvery + : bufferSize; return lift_1.operate(function (source, subscriber) { var buffers = []; var count = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var e_1, _a, e_2, _b; - var toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a, e_2, _b; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - if (toEmit) { - try { - for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { - var buffer = toEmit_1_1.value; - arrRemove_1.arrRemove(buffers, buffer); - subscriber.next(buffer); + try { + for ( + var buffers_1 = __values(buffers), + buffers_1_1 = buffers_1.next(); + !buffers_1_1.done; + buffers_1_1 = buffers_1.next() + ) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = + toEmit !== null && toEmit !== void 0 + ? toEmit + : []; + toEmit.push(buffer); + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + buffers_1_1 && + !buffers_1_1.done && + (_a = buffers_1.return) + ) + _a.call(buffers_1); + } finally { + if (e_1) throw e_1.error; + } } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { + if (toEmit) { + try { + for ( + var toEmit_1 = __values(toEmit), + toEmit_1_1 = toEmit_1.next(); + !toEmit_1_1.done; + toEmit_1_1 = toEmit_1.next() + ) { + var buffer = toEmit_1_1.value; + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if ( + toEmit_1_1 && + !toEmit_1_1.done && + (_b = toEmit_1.return) + ) + _b.call(toEmit_1); + } finally { + if (e_2) throw e_2.error; + } + } + } + }, + function () { + var e_3, _a; try { - if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); + for ( + var buffers_2 = __values(buffers), + buffers_2_1 = buffers_2.next(); + !buffers_2_1.done; + buffers_2_1 = buffers_2.next() + ) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } catch (e_3_1) { + e_3 = { error: e_3_1 }; + } finally { + try { + if ( + buffers_2_1 && + !buffers_2_1.done && + (_a = buffers_2.return) + ) + _a.call(buffers_2); + } finally { + if (e_3) throw e_3.error; + } } - finally { if (e_2) throw e_2.error; } - } - } - }, function () { - var e_3, _a; - try { - for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { - var buffer = buffers_2_1.value; - subscriber.next(buffer); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); + subscriber.complete(); + }, + undefined, + function () { + buffers = null; } - finally { if (e_3) throw e_3.error; } - } - subscriber.complete(); - }, undefined, function () { - buffers = null; - })); + ) + ); }); } exports.bufferCount = bufferCount; -//# sourceMappingURL=bufferCount.js.map \ No newline at end of file +//# sourceMappingURL=bufferCount.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js index 819f8502a..5b5f5cbcb 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js @@ -1,38 +1,50 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } +'use strict'; +var __values = + (this && this.__values) || + function (o) { + var s = typeof Symbol === 'function' && Symbol.iterator, + m = s && o[s], + i = 0; + if (m) return m.call(o); + if (o && typeof o.length === 'number') + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError( + s ? 'Object is not iterable.' : 'Symbol.iterator is not defined.' + ); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, '__esModule', { value: true }); exports.bufferTime = void 0; -var Subscription_1 = require("../Subscription"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var arrRemove_1 = require("../util/arrRemove"); -var async_1 = require("../scheduler/async"); -var args_1 = require("../util/args"); -var executeSchedule_1 = require("../util/executeSchedule"); +var Subscription_1 = require('../Subscription'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var arrRemove_1 = require('../util/arrRemove'); +var async_1 = require('../scheduler/async'); +var args_1 = require('../util/args'); +var executeSchedule_1 = require('../util/executeSchedule'); function bufferTime(bufferTimeSpan) { var _a, _b; var otherArgs = []; for (var _i = 1; _i < arguments.length; _i++) { otherArgs[_i - 1] = arguments[_i]; } - var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; - var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var scheduler = + (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 + ? _a + : async_1.asyncScheduler; + var bufferCreationInterval = + (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; var maxBufferSize = otherArgs[1] || Infinity; return lift_1.operate(function (source, subscriber) { var bufferRecords = []; var restartOnEmit = false; var emit = function (record) { - var buffer = record.buffer, subs = record.subs; + var buffer = record.buffer, + subs = record.subs; subs.unsubscribe(); arrRemove_1.arrRemove(bufferRecords, record); subscriber.next(buffer); @@ -45,47 +57,84 @@ function bufferTime(bufferTimeSpan) { var buffer = []; var record_1 = { buffer: buffer, - subs: subs, + subs: subs }; bufferRecords.push(record_1); - executeSchedule_1.executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); + executeSchedule_1.executeSchedule( + subs, + scheduler, + function () { + return emit(record_1); + }, + bufferTimeSpan + ); } }; if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - executeSchedule_1.executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } - else { + executeSchedule_1.executeSchedule( + subscriber, + scheduler, + startBuffer, + bufferCreationInterval, + true + ); + } else { restartOnEmit = true; } startBuffer(); - var bufferTimeSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var recordsCopy = bufferRecords.slice(); - try { - for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { - var record = recordsCopy_1_1.value; - var buffer = record.buffer; - buffer.push(value); - maxBufferSize <= buffer.length && emit(record); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + var bufferTimeSubscriber = new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + var recordsCopy = bufferRecords.slice(); try { - if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); + for ( + var recordsCopy_1 = __values(recordsCopy), + recordsCopy_1_1 = recordsCopy_1.next(); + !recordsCopy_1_1.done; + recordsCopy_1_1 = recordsCopy_1.next() + ) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + recordsCopy_1_1 && + !recordsCopy_1_1.done && + (_a = recordsCopy_1.return) + ) + _a.call(recordsCopy_1); + } finally { + if (e_1) throw e_1.error; + } } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); + }, + function () { + while ( + bufferRecords === null || bufferRecords === void 0 + ? void 0 + : bufferRecords.length + ) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 + ? void 0 + : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, + undefined, + function () { + return (bufferRecords = null); } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, undefined, function () { return (bufferRecords = null); }); + ); source.subscribe(bufferTimeSubscriber); }); } exports.bufferTime = bufferTime; -//# sourceMappingURL=bufferTime.js.map \ No newline at end of file +//# sourceMappingURL=bufferTime.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js index 82501c648..fe6097713 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js @@ -1,59 +1,99 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } +'use strict'; +var __values = + (this && this.__values) || + function (o) { + var s = typeof Symbol === 'function' && Symbol.iterator, + m = s && o[s], + i = 0; + if (m) return m.call(o); + if (o && typeof o.length === 'number') + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError( + s ? 'Object is not iterable.' : 'Symbol.iterator is not defined.' + ); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, '__esModule', { value: true }); exports.bufferToggle = void 0; -var Subscription_1 = require("../Subscription"); -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); -var arrRemove_1 = require("../util/arrRemove"); +var Subscription_1 = require('../Subscription'); +var lift_1 = require('../util/lift'); +var innerFrom_1 = require('../observable/innerFrom'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var noop_1 = require('../util/noop'); +var arrRemove_1 = require('../util/arrRemove'); function bufferToggle(openings, closingSelector) { return lift_1.operate(function (source, subscriber) { var buffers = []; - innerFrom_1.innerFrom(openings).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (openValue) { - var buffer = []; - buffers.push(buffer); - var closingSubscription = new Subscription_1.Subscription(); - var emitBuffer = function () { - arrRemove_1.arrRemove(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(innerFrom_1.innerFrom(closingSelector(openValue)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, emitBuffer, noop_1.noop))); - }, noop_1.noop)); - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + innerFrom_1.innerFrom(openings).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription_1.Subscription(); + var emitBuffer = function () { + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add( + innerFrom_1 + .innerFrom(closingSelector(openValue)) + .subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + emitBuffer, + noop_1.noop + ) + ) + ); + }, + noop_1.noop + ) + ); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + try { + for ( + var buffers_1 = __values(buffers), + buffers_1_1 = buffers_1.next(); + !buffers_1_1.done; + buffers_1_1 = buffers_1.next() + ) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + buffers_1_1 && + !buffers_1_1.done && + (_a = buffers_1.return) + ) + _a.call(buffers_1); + } finally { + if (e_1) throw e_1.error; + } + } + }, + function () { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); + ) + ); }); } exports.bufferToggle = bufferToggle; -//# sourceMappingURL=bufferToggle.js.map \ No newline at end of file +//# sourceMappingURL=bufferToggle.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js index 44f48f8d6..e54766ec0 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js @@ -1,27 +1,52 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.bufferWhen = void 0; -var lift_1 = require("../util/lift"); -var noop_1 = require("../util/noop"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require('../util/lift'); +var noop_1 = require('../util/noop'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var innerFrom_1 = require('../observable/innerFrom'); function bufferWhen(closingSelector) { return lift_1.operate(function (source, subscriber) { var buffer = null; var closingSubscriber = null; var openBuffer = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); var b = buffer; buffer = []; b && subscriber.next(b); - innerFrom_1.innerFrom(closingSelector()).subscribe((closingSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, openBuffer, noop_1.noop))); + innerFrom_1 + .innerFrom(closingSelector()) + .subscribe( + (closingSubscriber = + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + openBuffer, + noop_1.noop + )) + ); }; openBuffer(); - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, undefined, function () { return (buffer = closingSubscriber = null); })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + return buffer === null || buffer === void 0 + ? void 0 + : buffer.push(value); + }, + function () { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, + undefined, + function () { + return (buffer = closingSubscriber = null); + } + ) + ); }); } exports.bufferWhen = bufferWhen; -//# sourceMappingURL=bufferWhen.js.map \ No newline at end of file +//# sourceMappingURL=bufferWhen.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/catchError.js b/node_modules/rxjs/dist/cjs/internal/operators/catchError.js index 6a30a1560..c4ab6663b 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/catchError.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/catchError.js @@ -1,25 +1,33 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.catchError = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var lift_1 = require("../util/lift"); +var innerFrom_1 = require('../observable/innerFrom'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var lift_1 = require('../util/lift'); function catchError(selector) { return lift_1.operate(function (source, subscriber) { var innerSub = null; var syncUnsub = false; var handledResult; - innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, undefined, function (err) { - handledResult = innerFrom_1.innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - else { - syncUnsub = true; - } - })); + innerSub = source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + undefined, + undefined, + function (err) { + handledResult = innerFrom_1.innerFrom( + selector(err, catchError(selector)(source)) + ); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } else { + syncUnsub = true; + } + } + ) + ); if (syncUnsub) { innerSub.unsubscribe(); innerSub = null; @@ -28,4 +36,4 @@ function catchError(selector) { }); } exports.catchError = catchError; -//# sourceMappingURL=catchError.js.map \ No newline at end of file +//# sourceMappingURL=catchError.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/debounce.js b/node_modules/rxjs/dist/cjs/internal/operators/debounce.js index b36a9c5cd..30431ad57 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/debounce.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/debounce.js @@ -1,17 +1,19 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.debounce = void 0; -var lift_1 = require("../util/lift"); -var noop_1 = require("../util/noop"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require('../util/lift'); +var noop_1 = require('../util/noop'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var innerFrom_1 = require('../observable/innerFrom'); function debounce(durationSelector) { return lift_1.operate(function (source, subscriber) { var hasValue = false; var lastValue = null; var durationSubscriber = null; var emit = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); durationSubscriber = null; if (hasValue) { hasValue = false; @@ -20,19 +22,36 @@ function debounce(durationSelector) { subscriber.next(value); } }; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, emit, noop_1.noop); - innerFrom_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = durationSubscriber = null; - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + emit, + noop_1.noop + ); + innerFrom_1 + .innerFrom(durationSelector(value)) + .subscribe(durationSubscriber); + }, + function () { + emit(); + subscriber.complete(); + }, + undefined, + function () { + lastValue = durationSubscriber = null; + } + ) + ); }); } exports.debounce = debounce; -//# sourceMappingURL=debounce.js.map \ No newline at end of file +//# sourceMappingURL=debounce.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js b/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js index 6a5ef1a24..7b7752eb7 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js @@ -1,11 +1,13 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.debounceTime = void 0; -var async_1 = require("../scheduler/async"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var async_1 = require('../scheduler/async'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function debounceTime(dueTime, scheduler) { - if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } return lift_1.operate(function (source, subscriber) { var activeTask = null; var lastValue = null; @@ -29,20 +31,28 @@ function debounceTime(dueTime, scheduler) { } emit(); } - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = activeTask = null; - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, + function () { + emit(); + subscriber.complete(); + }, + undefined, + function () { + lastValue = activeTask = null; + } + ) + ); }); } exports.debounceTime = debounceTime; -//# sourceMappingURL=debounceTime.js.map \ No newline at end of file +//# sourceMappingURL=debounceTime.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js b/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js index a68b917f2..bea4a96ae 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js @@ -1,21 +1,27 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.defaultIfEmpty = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function defaultIfEmpty(defaultValue) { return lift_1.operate(function (source, subscriber) { var hasValue = false; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + subscriber.next(value); + }, + function () { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + } + ) + ); }); } exports.defaultIfEmpty = defaultIfEmpty; -//# sourceMappingURL=defaultIfEmpty.js.map \ No newline at end of file +//# sourceMappingURL=defaultIfEmpty.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js b/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js index fc34836ed..9f11846a6 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js @@ -1,13 +1,22 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.dematerialize = void 0; -var Notification_1 = require("../Notification"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var Notification_1 = require('../Notification'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function dematerialize() { return lift_1.operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (notification) { return Notification_1.observeNotification(notification, subscriber); })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + notification + ) { + return Notification_1.observeNotification( + notification, + subscriber + ); + }) + ); }); } exports.dematerialize = dematerialize; -//# sourceMappingURL=dematerialize.js.map \ No newline at end of file +//# sourceMappingURL=dematerialize.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinct.js b/node_modules/rxjs/dist/cjs/internal/operators/distinct.js index fa1351672..1aa2ae264 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/distinct.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/distinct.js @@ -1,21 +1,35 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.distinct = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var noop_1 = require('../util/noop'); function distinct(keySelector, flushes) { return lift_1.operate(function (source, subscriber) { var distinctKeys = new Set(); - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes === null || flushes === void 0 ? void 0 : flushes.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop_1.noop)); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + }) + ); + flushes === null || flushes === void 0 + ? void 0 + : flushes.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + return distinctKeys.clear(); + }, + noop_1.noop + ) + ); }); } exports.distinct = distinct; -//# sourceMappingURL=distinct.js.map \ No newline at end of file +//# sourceMappingURL=distinct.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js index 92ba34dd7..8c8f5490e 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js @@ -1,27 +1,36 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.distinctUntilChanged = void 0; -var identity_1 = require("../util/identity"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var identity_1 = require('../util/identity'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function distinctUntilChanged(comparator, keySelector) { - if (keySelector === void 0) { keySelector = identity_1.identity; } - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + if (keySelector === void 0) { + keySelector = identity_1.identity; + } + comparator = + comparator !== null && comparator !== void 0 + ? comparator + : defaultCompare; return lift_1.operate(function (source, subscriber) { var previousKey; var first = true; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var currentKey = keySelector(value); - if (first || !comparator(previousKey, currentKey)) { - first = false; - previousKey = currentKey; - subscriber.next(value); - } - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + }) + ); }); } exports.distinctUntilChanged = distinctUntilChanged; function defaultCompare(a, b) { return a === b; } -//# sourceMappingURL=distinctUntilChanged.js.map \ No newline at end of file +//# sourceMappingURL=distinctUntilChanged.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/every.js b/node_modules/rxjs/dist/cjs/internal/operators/every.js index 5e010a79e..9477b1677 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/every.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/every.js @@ -1,21 +1,27 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.every = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function every(predicate, thisArg) { return lift_1.operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, function () { - subscriber.next(true); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, + function () { + subscriber.next(true); + subscriber.complete(); + } + ) + ); }); } exports.every = every; -//# sourceMappingURL=every.js.map \ No newline at end of file +//# sourceMappingURL=every.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js b/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js index b0bf5e9f4..516575dc4 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js @@ -1,25 +1,37 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.exhaustAll = void 0; -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var innerFrom_1 = require('../observable/innerFrom'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function exhaustAll() { return lift_1.operate(function (source, subscriber) { var isComplete = false; var innerSub = null; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (inner) { - if (!innerSub) { - innerSub = innerFrom_1.innerFrom(inner).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - })); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (inner) { + if (!innerSub) { + innerSub = innerFrom_1.innerFrom(inner).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + undefined, + function () { + innerSub = null; + isComplete && subscriber.complete(); + } + ) + ); + } + }, + function () { + isComplete = true; + !innerSub && subscriber.complete(); + } + ) + ); }); } exports.exhaustAll = exhaustAll; -//# sourceMappingURL=exhaustAll.js.map \ No newline at end of file +//# sourceMappingURL=exhaustAll.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js b/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js index 75defd273..b0aba9ace 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js @@ -1,33 +1,53 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.exhaustMap = void 0; -var map_1 = require("./map"); -var innerFrom_1 = require("../observable/innerFrom"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var map_1 = require('./map'); +var innerFrom_1 = require('../observable/innerFrom'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function exhaustMap(project, resultSelector) { if (resultSelector) { return function (source) { - return source.pipe(exhaustMap(function (a, i) { return innerFrom_1.innerFrom(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); + return source.pipe( + exhaustMap(function (a, i) { + return innerFrom_1.innerFrom(project(a, i)).pipe( + map_1.map(function (b, ii) { + return resultSelector(a, b, i, ii); + }) + ); + }) + ); }; } return lift_1.operate(function (source, subscriber) { var index = 0; var innerSub = null; var isComplete = false; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (outerValue) { - if (!innerSub) { - innerSub = new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom_1.innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (outerValue) { + if (!innerSub) { + innerSub = new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + undefined, + function () { + innerSub = null; + isComplete && subscriber.complete(); + } + ); + innerFrom_1 + .innerFrom(project(outerValue, index++)) + .subscribe(innerSub); + } + }, + function () { + isComplete = true; + !innerSub && subscriber.complete(); + } + ) + ); }); } exports.exhaustMap = exhaustMap; -//# sourceMappingURL=exhaustMap.js.map \ No newline at end of file +//# sourceMappingURL=exhaustMap.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/filter.js b/node_modules/rxjs/dist/cjs/internal/operators/filter.js index 850df50a8..ca57e8b8e 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/filter.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/filter.js @@ -1,13 +1,22 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.filter = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function filter(predicate, thisArg) { return lift_1.operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + return ( + predicate.call(thisArg, value, index++) && + subscriber.next(value) + ); + }) + ); }); } exports.filter = filter; -//# sourceMappingURL=filter.js.map \ No newline at end of file +//# sourceMappingURL=filter.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/find.js b/node_modules/rxjs/dist/cjs/internal/operators/find.js index 4ce77bc9e..745dcdaec 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/find.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/find.js @@ -1,8 +1,8 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.createFind = exports.find = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function find(predicate, thisArg) { return lift_1.operate(createFind(predicate, thisArg, 'value')); } @@ -11,17 +11,23 @@ function createFind(predicate, thisArg, emit) { var findIndex = emit === 'index'; return function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, function () { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, + function () { + subscriber.next(findIndex ? -1 : undefined); + subscriber.complete(); + } + ) + ); }; } exports.createFind = createFind; -//# sourceMappingURL=find.js.map \ No newline at end of file +//# sourceMappingURL=find.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js b/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js index 5a2ca5fa6..166c632a2 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js @@ -1,66 +1,124 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +var __extends = + (this && this.__extends) || + (function () { + var extendStatics = function (d, b) { + extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) + if (Object.prototype.hasOwnProperty.call(b, p)) + d[p] = b[p]; + }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== 'function' && b !== null) + throw new TypeError( + 'Class extends value ' + + String(b) + + ' is not a constructor or null' + ); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); +Object.defineProperty(exports, '__esModule', { value: true }); exports.groupBy = void 0; -var Observable_1 = require("../Observable"); -var innerFrom_1 = require("../observable/innerFrom"); -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var Observable_1 = require('../Observable'); +var innerFrom_1 = require('../observable/innerFrom'); +var Subject_1 = require('../Subject'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function groupBy(keySelector, elementOrOptions, duration, connector) { return lift_1.operate(function (source, subscriber) { var element; if (!elementOrOptions || typeof elementOrOptions === 'function') { element = elementOrOptions; - } - else { - (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); + } else { + (duration = elementOrOptions.duration), + (element = elementOrOptions.element), + (connector = elementOrOptions.connector); } var groups = new Map(); var notify = function (cb) { groups.forEach(cb); cb(subscriber); }; - var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; - var groupBySourceSubscriber = new GroupBySubscriber(subscriber, function (value) { - try { - var key_1 = keySelector(value); - var group_1 = groups.get(key_1); - if (!group_1) { - groups.set(key_1, (group_1 = connector ? connector() : new Subject_1.Subject())); - var grouped = createGroupedObservable(key_1, group_1); - subscriber.next(grouped); - if (duration) { - var durationSubscriber_1 = new OperatorSubscriber_1.OperatorSubscriber(group_1, function () { - group_1.complete(); - durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); - }, undefined, undefined, function () { return groups.delete(key_1); }); - groupBySourceSubscriber.add(innerFrom_1.innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + var handleError = function (err) { + return notify(function (consumer) { + return consumer.error(err); + }); + }; + var groupBySourceSubscriber = new GroupBySubscriber( + subscriber, + function (value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set( + key_1, + (group_1 = connector + ? connector() + : new Subject_1.Subject()) + ); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = + new OperatorSubscriber_1.OperatorSubscriber( + group_1, + function () { + group_1.complete(); + durationSubscriber_1 === null || + durationSubscriber_1 === void 0 + ? void 0 + : durationSubscriber_1.unsubscribe(); + }, + undefined, + undefined, + function () { + return groups.delete(key_1); + } + ); + groupBySourceSubscriber.add( + innerFrom_1 + .innerFrom(duration(grouped)) + .subscribe(durationSubscriber_1) + ); + } } + group_1.next(element ? element(value) : value); + } catch (err) { + handleError(err); } - group_1.next(element ? element(value) : value); - } - catch (err) { - handleError(err); + }, + function () { + return notify(function (consumer) { + return consumer.complete(); + }); + }, + handleError, + function () { + return groups.clear(); } - }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }); + ); source.subscribe(groupBySourceSubscriber); function createGroupedObservable(key, groupSubject) { - var result = new Observable_1.Observable(function (groupSubscriber) { + var result = new Observable_1.Observable(function ( + groupSubscriber + ) { groupBySourceSubscriber.activeGroups++; var innerSub = groupSubject.subscribe(groupSubscriber); return function () { @@ -79,7 +137,7 @@ exports.groupBy = groupBy; var GroupBySubscriber = (function (_super) { __extends(GroupBySubscriber, _super); function GroupBySubscriber() { - var _this = _super !== null && _super.apply(this, arguments) || this; + var _this = (_super !== null && _super.apply(this, arguments)) || this; _this.activeGroups = 0; _this.teardownAttempted = false; return _this; @@ -89,5 +147,5 @@ var GroupBySubscriber = (function (_super) { this.activeGroups === 0 && _super.prototype.unsubscribe.call(this); }; return GroupBySubscriber; -}(OperatorSubscriber_1.OperatorSubscriber)); -//# sourceMappingURL=groupBy.js.map \ No newline at end of file +})(OperatorSubscriber_1.OperatorSubscriber); +//# sourceMappingURL=groupBy.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js b/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js index f007b7152..f1b48ea81 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js @@ -1,13 +1,15 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.ignoreElements = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var noop_1 = require('../util/noop'); function ignoreElements() { return lift_1.operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, noop_1.noop)); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, noop_1.noop) + ); }); } exports.ignoreElements = ignoreElements; -//# sourceMappingURL=ignoreElements.js.map \ No newline at end of file +//# sourceMappingURL=ignoreElements.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js b/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js index 0ca70bc0a..453173d6b 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js @@ -1,18 +1,24 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.isEmpty = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function isEmpty() { return lift_1.operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { - subscriber.next(false); - subscriber.complete(); - }, function () { - subscriber.next(true); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + subscriber.next(false); + subscriber.complete(); + }, + function () { + subscriber.next(true); + subscriber.complete(); + } + ) + ); }); } exports.isEmpty = isEmpty; -//# sourceMappingURL=isEmpty.js.map \ No newline at end of file +//# sourceMappingURL=isEmpty.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/map.js b/node_modules/rxjs/dist/cjs/internal/operators/map.js index 698163d42..1bdc31ea0 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/map.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/map.js @@ -1,15 +1,19 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.map = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function map(project, thisArg) { return lift_1.operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - subscriber.next(project.call(thisArg, value, index++)); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + subscriber.next(project.call(thisArg, value, index++)); + }) + ); }); } exports.map = map; -//# sourceMappingURL=map.js.map \ No newline at end of file +//# sourceMappingURL=map.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/materialize.js b/node_modules/rxjs/dist/cjs/internal/operators/materialize.js index 82a033f86..964cad58d 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/materialize.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/materialize.js @@ -1,21 +1,34 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.materialize = void 0; -var Notification_1 = require("../Notification"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var Notification_1 = require('../Notification'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function materialize() { return lift_1.operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - subscriber.next(Notification_1.Notification.createNext(value)); - }, function () { - subscriber.next(Notification_1.Notification.createComplete()); - subscriber.complete(); - }, function (err) { - subscriber.next(Notification_1.Notification.createError(err)); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + subscriber.next( + Notification_1.Notification.createNext(value) + ); + }, + function () { + subscriber.next( + Notification_1.Notification.createComplete() + ); + subscriber.complete(); + }, + function (err) { + subscriber.next( + Notification_1.Notification.createError(err) + ); + subscriber.complete(); + } + ) + ); }); } exports.materialize = materialize; -//# sourceMappingURL=materialize.js.map \ No newline at end of file +//# sourceMappingURL=materialize.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js index 5c99c91fa..36470610d 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js @@ -1,10 +1,19 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.mergeInternals = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var executeSchedule_1 = require("../util/executeSchedule"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalTeardown) { +var innerFrom_1 = require('../observable/innerFrom'); +var executeSchedule_1 = require('../util/executeSchedule'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +function mergeInternals( + source, + subscriber, + project, + concurrent, + onBeforeNext, + expand, + innerSubScheduler, + additionalTeardown +) { var buffer = []; var active = 0; var index = 0; @@ -14,52 +23,75 @@ function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, e subscriber.complete(); } }; - var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; + var outerNext = function (value) { + return active < concurrent ? doInnerSub(value) : buffer.push(value); + }; var doInnerSub = function (value) { expand && subscriber.next(value); active++; var innerComplete = false; - innerFrom_1.innerFrom(project(value, index++)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (innerValue) { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } - else { - subscriber.next(innerValue); - } - }, function () { - innerComplete = true; - }, undefined, function () { - if (innerComplete) { - try { - active--; - var _loop_1 = function () { - var bufferedValue = buffer.shift(); - if (innerSubScheduler) { - executeSchedule_1.executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); - } - else { - doInnerSub(bufferedValue); + innerFrom_1.innerFrom(project(value, index++)).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (innerValue) { + onBeforeNext === null || onBeforeNext === void 0 + ? void 0 + : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } else { + subscriber.next(innerValue); + } + }, + function () { + innerComplete = true; + }, + undefined, + function () { + if (innerComplete) { + try { + active--; + var _loop_1 = function () { + var bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule_1.executeSchedule( + subscriber, + innerSubScheduler, + function () { + return doInnerSub(bufferedValue); + } + ); + } else { + doInnerSub(bufferedValue); + } + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } catch (err) { + subscriber.error(err); } - }; - while (buffer.length && active < concurrent) { - _loop_1(); } - checkComplete(); - } - catch (err) { - subscriber.error(err); } - } - })); + ) + ); }; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, outerNext, function () { - isComplete = true; - checkComplete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + outerNext, + function () { + isComplete = true; + checkComplete(); + } + ) + ); return function () { - additionalTeardown === null || additionalTeardown === void 0 ? void 0 : additionalTeardown(); + additionalTeardown === null || additionalTeardown === void 0 + ? void 0 + : additionalTeardown(); }; } exports.mergeInternals = mergeInternals; -//# sourceMappingURL=mergeInternals.js.map \ No newline at end of file +//# sourceMappingURL=mergeInternals.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js b/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js index 11bb8abcb..dfcaa13c8 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js @@ -1,14 +1,50 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.observeOn = void 0; -var executeSchedule_1 = require("../util/executeSchedule"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var executeSchedule_1 = require('../util/executeSchedule'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function observeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } + if (delay === void 0) { + delay = 0; + } return lift_1.operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + return executeSchedule_1.executeSchedule( + subscriber, + scheduler, + function () { + return subscriber.next(value); + }, + delay + ); + }, + function () { + return executeSchedule_1.executeSchedule( + subscriber, + scheduler, + function () { + return subscriber.complete(); + }, + delay + ); + }, + function (err) { + return executeSchedule_1.executeSchedule( + subscriber, + scheduler, + function () { + return subscriber.error(err); + }, + delay + ); + } + ) + ); }); } exports.observeOn = observeOn; -//# sourceMappingURL=observeOn.js.map \ No newline at end of file +//# sourceMappingURL=observeOn.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNext.js b/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNext.js index 8c787ab0f..c3557efc5 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNext.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNext.js @@ -1,32 +1,41 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { +'use strict'; +var __read = + (this && this.__read) || + function (o, n) { + var m = typeof Symbol === 'function' && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; try { - if (r && !r.done && (m = i["return"])) m.call(i); + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error: error }; + } finally { + try { + if (r && !r.done && (m = i['return'])) m.call(i); + } finally { + if (e) throw e.error; + } } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); + return ar; + }; +var __spreadArray = + (this && this.__spreadArray) || + function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; +Object.defineProperty(exports, '__esModule', { value: true }); exports.onErrorResumeNext = void 0; -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var argsOrArgArray_1 = require("../util/argsOrArgArray"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); +var lift_1 = require('../util/lift'); +var innerFrom_1 = require('../observable/innerFrom'); +var argsOrArgArray_1 = require('../util/argsOrArgArray'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var noop_1 = require('../util/noop'); function onErrorResumeNext() { var sources = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -41,16 +50,19 @@ function onErrorResumeNext() { var nextSource = void 0; try { nextSource = innerFrom_1.innerFrom(remaining.shift()); - } - catch (err) { + } catch (err) { subscribeNext(); return; } - var innerSub = new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, noop_1.noop, noop_1.noop); + var innerSub = new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + undefined, + noop_1.noop, + noop_1.noop + ); subscriber.add(nextSource.subscribe(innerSub)); innerSub.add(subscribeNext); - } - else { + } else { subscriber.complete(); } } @@ -59,4 +71,4 @@ function onErrorResumeNext() { }); } exports.onErrorResumeNext = onErrorResumeNext; -//# sourceMappingURL=onErrorResumeNext.js.map \ No newline at end of file +//# sourceMappingURL=onErrorResumeNext.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js b/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js index 6a46c3822..0a05c4cf1 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js @@ -1,19 +1,23 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.pairwise = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function pairwise() { return lift_1.operate(function (source, subscriber) { var prev; var hasPrev = false; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + }) + ); }); } exports.pairwise = pairwise; -//# sourceMappingURL=pairwise.js.map \ No newline at end of file +//# sourceMappingURL=pairwise.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/refCount.js b/node_modules/rxjs/dist/cjs/internal/operators/refCount.js index d4ed02e46..313a23c17 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/refCount.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/refCount.js @@ -1,25 +1,35 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.refCount = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function refCount() { return lift_1.operate(function (source, subscriber) { var connection = null; source._refCount++; - var refCounter = new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, undefined, undefined, function () { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { + var refCounter = new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + undefined, + undefined, + undefined, + function () { + if ( + !source || + source._refCount <= 0 || + 0 < --source._refCount + ) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; connection = null; - return; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); } - var sharedConnection = source._connection; - var conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - subscriber.unsubscribe(); - }); + ); source.subscribe(refCounter); if (!refCounter.closed) { connection = source.connect(); @@ -27,4 +37,4 @@ function refCount() { }); } exports.refCount = refCount; -//# sourceMappingURL=refCount.js.map \ No newline at end of file +//# sourceMappingURL=refCount.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeat.js b/node_modules/rxjs/dist/cjs/internal/operators/repeat.js index 80d3f2ddf..06b92eceb 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/repeat.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/repeat.js @@ -1,64 +1,79 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.repeat = void 0; -var empty_1 = require("../observable/empty"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -var timer_1 = require("../observable/timer"); +var empty_1 = require('../observable/empty'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var innerFrom_1 = require('../observable/innerFrom'); +var timer_1 = require('../observable/timer'); function repeat(countOrConfig) { var _a; var count = Infinity; var delay; if (countOrConfig != null) { if (typeof countOrConfig === 'object') { - (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); - } - else { + (_a = countOrConfig.count), + (count = _a === void 0 ? Infinity : _a), + (delay = countOrConfig.delay); + } else { count = countOrConfig; } } return count <= 0 - ? function () { return empty_1.EMPTY; } + ? function () { + return empty_1.EMPTY; + } : lift_1.operate(function (source, subscriber) { - var soFar = 0; - var sourceSub; - var resubscribe = function () { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(soFar)); - var notifierSubscriber_1 = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - subscribeToSource(); - } - }; - var subscribeToSource = function () { - var syncUnsub = false; - sourceSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, function () { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } - else { - syncUnsub = true; - } - } - else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); + var soFar = 0; + var sourceSub; + var resubscribe = function () { + sourceSub === null || sourceSub === void 0 + ? void 0 + : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + var notifier = + typeof delay === 'number' + ? timer_1.timer(delay) + : innerFrom_1.innerFrom(delay(soFar)); + var notifierSubscriber_1 = + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + notifierSubscriber_1.unsubscribe(); + subscribeToSource(); + } + ); + notifier.subscribe(notifierSubscriber_1); + } else { + subscribeToSource(); + } + }; + var subscribeToSource = function () { + var syncUnsub = false; + sourceSub = source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + undefined, + function () { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } else { + syncUnsub = true; + } + } else { + subscriber.complete(); + } + } + ) + ); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); } exports.repeat = repeat; -//# sourceMappingURL=repeat.js.map \ No newline at end of file +//# sourceMappingURL=repeat.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js index 7d0c3cd41..d6a0b3556 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js @@ -1,9 +1,9 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.repeatWhen = void 0; -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var Subject_1 = require('../Subject'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function repeatWhen(notifier) { return lift_1.operate(function (source, subscriber) { var innerSub; @@ -11,30 +11,47 @@ function repeatWhen(notifier) { var completions$; var isNotifierComplete = false; var isMainComplete = false; - var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; + var checkComplete = function () { + return ( + isMainComplete && + isNotifierComplete && + (subscriber.complete(), true) + ); + }; var getCompletionSubject = function () { if (!completions$) { completions$ = new Subject_1.Subject(); - notifier(completions$).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { - if (innerSub) { - subscribeForRepeatWhen(); - } - else { - syncResub = true; - } - }, function () { - isNotifierComplete = true; - checkComplete(); - })); + notifier(completions$).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + if (innerSub) { + subscribeForRepeatWhen(); + } else { + syncResub = true; + } + }, + function () { + isNotifierComplete = true; + checkComplete(); + } + ) + ); } return completions$; }; var subscribeForRepeatWhen = function () { isMainComplete = false; - innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, function () { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); + innerSub = source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + undefined, + function () { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + } + ) + ); if (syncResub) { innerSub.unsubscribe(); innerSub = null; @@ -46,4 +63,4 @@ function repeatWhen(notifier) { }); } exports.repeatWhen = repeatWhen; -//# sourceMappingURL=repeatWhen.js.map \ No newline at end of file +//# sourceMappingURL=repeatWhen.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retry.js b/node_modules/rxjs/dist/cjs/internal/operators/retry.js index 8eb1f3e50..c57e790b9 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/retry.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/retry.js @@ -1,73 +1,92 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.retry = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var identity_1 = require("../util/identity"); -var timer_1 = require("../observable/timer"); -var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var identity_1 = require('../util/identity'); +var timer_1 = require('../observable/timer'); +var innerFrom_1 = require('../observable/innerFrom'); function retry(configOrCount) { - if (configOrCount === void 0) { configOrCount = Infinity; } + if (configOrCount === void 0) { + configOrCount = Infinity; + } var config; if (configOrCount && typeof configOrCount === 'object') { config = configOrCount; - } - else { + } else { config = { - count: configOrCount, + count: configOrCount }; } - var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; + var _a = config.count, + count = _a === void 0 ? Infinity : _a, + delay = config.delay, + _b = config.resetOnSuccess, + resetOnSuccess = _b === void 0 ? false : _b; return count <= 0 ? identity_1.identity : lift_1.operate(function (source, subscriber) { - var soFar = 0; - var innerSub; - var subscribeForRetry = function () { - var syncUnsub = false; - innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, undefined, function (err) { - if (soFar++ < count) { - var resub_1 = function () { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - else { - syncUnsub = true; - } - }; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(err, soFar)); - var notifierSubscriber_1 = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - resub_1(); - }, function () { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - resub_1(); - } - } - else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); + var soFar = 0; + var innerSub; + var subscribeForRetry = function () { + var syncUnsub = false; + innerSub = source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, + undefined, + function (err) { + if (soFar++ < count) { + var resub_1 = function () { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = + typeof delay === 'number' + ? timer_1.timer(delay) + : innerFrom_1.innerFrom( + delay(err, soFar) + ); + var notifierSubscriber_1 = + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, + function () { + subscriber.complete(); + } + ); + notifier.subscribe(notifierSubscriber_1); + } else { + resub_1(); + } + } else { + subscriber.error(err); + } + } + ) + ); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); } exports.retry = retry; -//# sourceMappingURL=retry.js.map \ No newline at end of file +//# sourceMappingURL=retry.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js index 0965cb22b..f2427d506 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js @@ -1,26 +1,40 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.retryWhen = void 0; -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var Subject_1 = require('../Subject'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function retryWhen(notifier) { return lift_1.operate(function (source, subscriber) { var innerSub; var syncResub = false; var errors$; var subscribeForRetryWhen = function () { - innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, undefined, function (err) { - if (!errors$) { - errors$ = new Subject_1.Subject(); - notifier(errors$).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { - return innerSub ? subscribeForRetryWhen() : (syncResub = true); - })); - } - if (errors$) { - errors$.next(err); - } - })); + innerSub = source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + undefined, + undefined, + function (err) { + if (!errors$) { + errors$ = new Subject_1.Subject(); + notifier(errors$).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + return innerSub + ? subscribeForRetryWhen() + : (syncResub = true); + } + ) + ); + } + if (errors$) { + errors$.next(err); + } + } + ) + ); if (syncResub) { innerSub.unsubscribe(); innerSub = null; @@ -32,4 +46,4 @@ function retryWhen(notifier) { }); } exports.retryWhen = retryWhen; -//# sourceMappingURL=retryWhen.js.map \ No newline at end of file +//# sourceMappingURL=retryWhen.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sample.js b/node_modules/rxjs/dist/cjs/internal/operators/sample.js index 8f6d9e287..421ddf536 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/sample.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/sample.js @@ -1,17 +1,21 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.sample = void 0; -var lift_1 = require("../util/lift"); -var noop_1 = require("../util/noop"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var noop_1 = require('../util/noop'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function sample(notifier) { return lift_1.operate(function (source, subscriber) { var hasValue = false; var lastValue = null; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + hasValue = true; + lastValue = value; + }) + ); var emit = function () { if (hasValue) { hasValue = false; @@ -20,8 +24,14 @@ function sample(notifier) { subscriber.next(value); } }; - notifier.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, emit, noop_1.noop)); + notifier.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + emit, + noop_1.noop + ) + ); }); } exports.sample = sample; -//# sourceMappingURL=sample.js.map \ No newline at end of file +//# sourceMappingURL=sample.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js b/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js index 814df1da5..abccbb843 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js @@ -1,26 +1,36 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.scanInternals = void 0; -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +function scanInternals( + accumulator, + seed, + hasSeed, + emitOnNext, + emitBeforeComplete +) { return function (source, subscriber) { var hasState = hasSeed; var state = seed; var index = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var i = index++; - state = hasState - ? - accumulator(state, value, i) - : - ((hasState = true), value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && - (function () { - hasState && subscriber.next(state); - subscriber.complete(); - }))); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + var i = index++; + state = hasState + ? accumulator(state, value, i) + : ((hasState = true), value); + emitOnNext && subscriber.next(state); + }, + emitBeforeComplete && + function () { + hasState && subscriber.next(state); + subscriber.complete(); + } + ) + ); }; } exports.scanInternals = scanInternals; -//# sourceMappingURL=scanInternals.js.map \ No newline at end of file +//# sourceMappingURL=scanInternals.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js b/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js index e5362e2e5..d68d63248 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js @@ -1,10 +1,14 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.sequenceEqual = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function sequenceEqual(compareTo, comparator) { - if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } + if (comparator === void 0) { + comparator = function (a, b) { + return a === b; + }; + } return lift_1.operate(function (source, subscriber) { var aState = createState(); var bState = createState(); @@ -13,20 +17,29 @@ function sequenceEqual(compareTo, comparator) { subscriber.complete(); }; var createSubscriber = function (selfState, otherState) { - var sequenceEqualSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (a) { - var buffer = otherState.buffer, complete = otherState.complete; - if (buffer.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); - } - else { - !comparator(a, buffer.shift()) && emit(false); - } - }, function () { - selfState.complete = true; - var complete = otherState.complete, buffer = otherState.buffer; - complete && emit(buffer.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); + var sequenceEqualSubscriber = + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (a) { + var buffer = otherState.buffer, + complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } else { + !comparator(a, buffer.shift()) && emit(false); + } + }, + function () { + selfState.complete = true; + var complete = otherState.complete, + buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || + sequenceEqualSubscriber === void 0 + ? void 0 + : sequenceEqualSubscriber.unsubscribe(); + } + ); return sequenceEqualSubscriber; }; source.subscribe(createSubscriber(aState, bState)); @@ -37,7 +50,7 @@ exports.sequenceEqual = sequenceEqual; function createState() { return { buffer: [], - complete: false, + complete: false }; } -//# sourceMappingURL=sequenceEqual.js.map \ No newline at end of file +//# sourceMappingURL=sequenceEqual.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/single.js b/node_modules/rxjs/dist/cjs/internal/operators/single.js index 9fa8f49b0..11ba976cd 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/single.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/single.js @@ -1,34 +1,50 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.single = void 0; -var EmptyError_1 = require("../util/EmptyError"); -var SequenceError_1 = require("../util/SequenceError"); -var NotFoundError_1 = require("../util/NotFoundError"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var EmptyError_1 = require('../util/EmptyError'); +var SequenceError_1 = require('../util/SequenceError'); +var NotFoundError_1 = require('../util/NotFoundError'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function single(predicate) { return lift_1.operate(function (source, subscriber) { var hasValue = false; var singleValue; var seenValue = false; var index = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError_1.SequenceError('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, function () { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } - else { - subscriber.error(seenValue ? new NotFoundError_1.NotFoundError('No matching values') : new EmptyError_1.EmptyError()); - } - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && + subscriber.error( + new SequenceError_1.SequenceError( + 'Too many matching values' + ) + ); + hasValue = true; + singleValue = value; + } + }, + function () { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } else { + subscriber.error( + seenValue + ? new NotFoundError_1.NotFoundError( + 'No matching values' + ) + : new EmptyError_1.EmptyError() + ); + } + } + ) + ); }); } exports.single = single; -//# sourceMappingURL=single.js.map \ No newline at end of file +//# sourceMappingURL=single.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js b/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js index d08178b77..a468f38cc 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js @@ -1,32 +1,35 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.skipLast = void 0; -var identity_1 = require("../util/identity"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var identity_1 = require('../util/identity'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function skipLast(skipCount) { return skipCount <= 0 - ? - identity_1.identity + ? identity_1.identity : lift_1.operate(function (source, subscriber) { - var ring = new Array(skipCount); - var seen = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } - else { - var index = valueIndex % skipCount; - var oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return function () { - ring = null; - }; - }); + var ring = new Array(skipCount); + var seen = 0; + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + } + ) + ); + return function () { + ring = null; + }; + }); } exports.skipLast = skipLast; -//# sourceMappingURL=skipLast.js.map \ No newline at end of file +//# sourceMappingURL=skipLast.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js b/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js index ff013ae1c..990d85507 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js @@ -1,20 +1,32 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.skipUntil = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -var noop_1 = require("../util/noop"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var innerFrom_1 = require('../observable/innerFrom'); +var noop_1 = require('../util/noop'); function skipUntil(notifier) { return lift_1.operate(function (source, subscriber) { var taking = false; - var skipSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, noop_1.noop); + var skipSubscriber = new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + skipSubscriber === null || skipSubscriber === void 0 + ? void 0 + : skipSubscriber.unsubscribe(); + taking = true; + }, + noop_1.noop + ); innerFrom_1.innerFrom(notifier).subscribe(skipSubscriber); - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + return taking && subscriber.next(value); + }) + ); }); } exports.skipUntil = skipUntil; -//# sourceMappingURL=skipUntil.js.map \ No newline at end of file +//# sourceMappingURL=skipUntil.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js b/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js index 11a465e50..91e9100b3 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js @@ -1,14 +1,23 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.skipWhile = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function skipWhile(predicate) { return lift_1.operate(function (source, subscriber) { var taking = false; var index = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + return ( + (taking || (taking = !predicate(value, index++))) && + subscriber.next(value) + ); + }) + ); }); } exports.skipWhile = skipWhile; -//# sourceMappingURL=skipWhile.js.map \ No newline at end of file +//# sourceMappingURL=skipWhile.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js b/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js index 283114838..c2bdf530a 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js @@ -1,28 +1,56 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.switchMap = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require('../observable/innerFrom'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function switchMap(project, resultSelector) { return lift_1.operate(function (source, subscriber) { var innerSubscriber = null; var index = 0; var isComplete = false; - var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - innerFrom_1.innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { - innerSubscriber = null; - checkComplete(); - }))); - }, function () { - isComplete = true; - checkComplete(); - })); + var checkComplete = function () { + return isComplete && !innerSubscriber && subscriber.complete(); + }; + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + innerSubscriber === null || innerSubscriber === void 0 + ? void 0 + : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + innerFrom_1.innerFrom(project(value, outerIndex)).subscribe( + (innerSubscriber = + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (innerValue) { + return subscriber.next( + resultSelector + ? resultSelector( + value, + innerValue, + outerIndex, + innerIndex++ + ) + : innerValue + ); + }, + function () { + innerSubscriber = null; + checkComplete(); + } + )) + ); + }, + function () { + isComplete = true; + checkComplete(); + } + ) + ); }); } exports.switchMap = switchMap; -//# sourceMappingURL=switchMap.js.map \ No newline at end of file +//# sourceMappingURL=switchMap.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/take.js b/node_modules/rxjs/dist/cjs/internal/operators/take.js index 1c4f74c59..9f1714d87 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/take.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/take.js @@ -1,24 +1,30 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.take = void 0; -var empty_1 = require("../observable/empty"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var empty_1 = require('../observable/empty'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function take(count) { return count <= 0 - ? - function () { return empty_1.EMPTY; } + ? function () { + return empty_1.EMPTY; + } : lift_1.operate(function (source, subscriber) { - var seen = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); + var seen = 0; + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + } + ) + ); + }); } exports.take = take; -//# sourceMappingURL=take.js.map \ No newline at end of file +//# sourceMappingURL=take.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js b/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js index a0a390fe3..a67d31d17 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js @@ -1,48 +1,76 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } +'use strict'; +var __values = + (this && this.__values) || + function (o) { + var s = typeof Symbol === 'function' && Symbol.iterator, + m = s && o[s], + i = 0; + if (m) return m.call(o); + if (o && typeof o.length === 'number') + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError( + s ? 'Object is not iterable.' : 'Symbol.iterator is not defined.' + ); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, '__esModule', { value: true }); exports.takeLast = void 0; -var empty_1 = require("../observable/empty"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var empty_1 = require('../observable/empty'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function takeLast(count) { return count <= 0 - ? function () { return empty_1.EMPTY; } + ? function () { + return empty_1.EMPTY; + } : lift_1.operate(function (source, subscriber) { - var buffer = []; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - buffer.push(value); - count < buffer.length && buffer.shift(); - }, function () { - var e_1, _a; - try { - for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { - var value = buffer_1_1.value; - subscriber.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }, undefined, function () { - buffer = null; - })); - }); + var buffer = []; + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, + function () { + var e_1, _a; + try { + for ( + var buffer_1 = __values(buffer), + buffer_1_1 = buffer_1.next(); + !buffer_1_1.done; + buffer_1_1 = buffer_1.next() + ) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + buffer_1_1 && + !buffer_1_1.done && + (_a = buffer_1.return) + ) + _a.call(buffer_1); + } finally { + if (e_1) throw e_1.error; + } + } + subscriber.complete(); + }, + undefined, + function () { + buffer = null; + } + ) + ); + }); } exports.takeLast = takeLast; -//# sourceMappingURL=takeLast.js.map \ No newline at end of file +//# sourceMappingURL=takeLast.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js b/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js index 93e83f415..d3019717b 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js @@ -1,15 +1,23 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.takeUntil = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -var noop_1 = require("../util/noop"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var innerFrom_1 = require('../observable/innerFrom'); +var noop_1 = require('../util/noop'); function takeUntil(notifier) { return lift_1.operate(function (source, subscriber) { - innerFrom_1.innerFrom(notifier).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop_1.noop)); + innerFrom_1.innerFrom(notifier).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + return subscriber.complete(); + }, + noop_1.noop + ) + ); !subscriber.closed && source.subscribe(subscriber); }); } exports.takeUntil = takeUntil; -//# sourceMappingURL=takeUntil.js.map \ No newline at end of file +//# sourceMappingURL=takeUntil.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js b/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js index 3727e56c6..e538fd528 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js @@ -1,18 +1,24 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.takeWhile = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function takeWhile(predicate, inclusive) { - if (inclusive === void 0) { inclusive = false; } + if (inclusive === void 0) { + inclusive = false; + } return lift_1.operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + }) + ); }); } exports.takeWhile = takeWhile; -//# sourceMappingURL=takeWhile.js.map \ No newline at end of file +//# sourceMappingURL=takeWhile.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/tap.js b/node_modules/rxjs/dist/cjs/internal/operators/tap.js index 0d1de3654..6bdf02dd5 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/tap.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/tap.js @@ -1,44 +1,64 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.tap = void 0; -var isFunction_1 = require("../util/isFunction"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var identity_1 = require("../util/identity"); +var isFunction_1 = require('../util/isFunction'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var identity_1 = require('../util/identity'); function tap(observerOrNext, error, complete) { - var tapObserver = isFunction_1.isFunction(observerOrNext) || error || complete - ? - { next: observerOrNext, error: error, complete: complete } - : observerOrNext; + var tapObserver = + isFunction_1.isFunction(observerOrNext) || error || complete + ? { next: observerOrNext, error: error, complete: complete } + : observerOrNext; return tapObserver ? lift_1.operate(function (source, subscriber) { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - var isUnsub = true; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var _a; - (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); - subscriber.next(value); - }, function () { - var _a; - isUnsub = false; - (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - subscriber.complete(); - }, function (err) { - var _a; - isUnsub = false; - (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); - subscriber.error(err); - }, function () { - var _a, _b; - if (isUnsub) { - (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) - : - identity_1.identity; + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver); + var isUnsub = true; + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + var _a; + (_a = tapObserver.next) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver, value); + subscriber.next(value); + }, + function () { + var _a; + isUnsub = false; + (_a = tapObserver.complete) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver); + subscriber.complete(); + }, + function (err) { + var _a; + isUnsub = false; + (_a = tapObserver.error) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver, err); + subscriber.error(err); + }, + function () { + var _a, _b; + if (isUnsub) { + (_a = tapObserver.unsubscribe) === null || + _a === void 0 + ? void 0 + : _a.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 + ? void 0 + : _b.call(tapObserver); + } + ) + ); + }) + : identity_1.identity; } exports.tap = tap; -//# sourceMappingURL=tap.js.map \ No newline at end of file +//# sourceMappingURL=tap.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throttle.js b/node_modules/rxjs/dist/cjs/internal/operators/throttle.js index 3d9635ff0..9ee3600d3 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/throttle.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/throttle.js @@ -1,23 +1,28 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.throttle = exports.defaultThrottleConfig = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var innerFrom_1 = require('../observable/innerFrom'); exports.defaultThrottleConfig = { leading: true, - trailing: false, + trailing: false }; function throttle(durationSelector, config) { - if (config === void 0) { config = exports.defaultThrottleConfig; } + if (config === void 0) { + config = exports.defaultThrottleConfig; + } return lift_1.operate(function (source, subscriber) { - var leading = config.leading, trailing = config.trailing; + var leading = config.leading, + trailing = config.trailing; var hasValue = false; var sendValue = null; var throttled = null; var isComplete = false; var endThrottling = function () { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled === null || throttled === void 0 + ? void 0 + : throttled.unsubscribe(); throttled = null; if (trailing) { send(); @@ -29,7 +34,15 @@ function throttle(durationSelector, config) { isComplete && subscriber.complete(); }; var startThrottle = function (value) { - return (throttled = innerFrom_1.innerFrom(durationSelector(value)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + return (throttled = innerFrom_1 + .innerFrom(durationSelector(value)) + .subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + endThrottling, + cleanupThrottling + ) + )); }; var send = function () { if (hasValue) { @@ -40,15 +53,23 @@ function throttle(durationSelector, config) { !isComplete && startThrottle(value); } }; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, function () { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && + (leading ? send() : startThrottle(value)); + }, + function () { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && + subscriber.complete(); + } + ) + ); }); } exports.throttle = throttle; -//# sourceMappingURL=throttle.js.map \ No newline at end of file +//# sourceMappingURL=throttle.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js b/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js index a3c6dafb0..ab64774c2 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js @@ -1,21 +1,33 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.throwIfEmpty = void 0; -var EmptyError_1 = require("../util/EmptyError"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var EmptyError_1 = require('../util/EmptyError'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function throwIfEmpty(errorFactory) { - if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } + if (errorFactory === void 0) { + errorFactory = defaultErrorFactory; + } return lift_1.operate(function (source, subscriber) { var hasValue = false; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + subscriber.next(value); + }, + function () { + return hasValue + ? subscriber.complete() + : subscriber.error(errorFactory()); + } + ) + ); }); } exports.throwIfEmpty = throwIfEmpty; function defaultErrorFactory() { return new EmptyError_1.EmptyError(); } -//# sourceMappingURL=throwIfEmpty.js.map \ No newline at end of file +//# sourceMappingURL=throwIfEmpty.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js b/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js index cc852a4f7..1a8bc2ebd 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js @@ -1,25 +1,39 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.TimeInterval = exports.timeInterval = void 0; -var async_1 = require("../scheduler/async"); -var scan_1 = require("./scan"); -var defer_1 = require("../observable/defer"); -var map_1 = require("./map"); +var async_1 = require('../scheduler/async'); +var scan_1 = require('./scan'); +var defer_1 = require('../observable/defer'); +var map_1 = require('./map'); function timeInterval(scheduler) { - if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } return function (source) { return defer_1.defer(function () { - return source.pipe(scan_1.scan(function (_a, value) { - var current = _a.current; - return ({ value: value, current: scheduler.now(), last: current }); - }, { - current: scheduler.now(), - value: undefined, - last: undefined, - }), map_1.map(function (_a) { - var current = _a.current, last = _a.last, value = _a.value; - return new TimeInterval(value, current - last); - })); + return source.pipe( + scan_1.scan( + function (_a, value) { + var current = _a.current; + return { + value: value, + current: scheduler.now(), + last: current + }; + }, + { + current: scheduler.now(), + value: undefined, + last: undefined + } + ), + map_1.map(function (_a) { + var current = _a.current, + last = _a.last, + value = _a.value; + return new TimeInterval(value, current - last); + }) + ); }); }; } @@ -30,6 +44,6 @@ var TimeInterval = (function () { this.interval = interval; } return TimeInterval; -}()); +})(); exports.TimeInterval = TimeInterval; -//# sourceMappingURL=timeInterval.js.map \ No newline at end of file +//# sourceMappingURL=timeInterval.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeout.js b/node_modules/rxjs/dist/cjs/internal/operators/timeout.js index ecf57eab0..46359332c 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/timeout.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/timeout.js @@ -1,16 +1,18 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.timeout = exports.TimeoutError = void 0; -var async_1 = require("../scheduler/async"); -var isDate_1 = require("../util/isDate"); -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var createErrorClass_1 = require("../util/createErrorClass"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var executeSchedule_1 = require("../util/executeSchedule"); +var async_1 = require('../scheduler/async'); +var isDate_1 = require('../util/isDate'); +var lift_1 = require('../util/lift'); +var innerFrom_1 = require('../observable/innerFrom'); +var createErrorClass_1 = require('../util/createErrorClass'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var executeSchedule_1 = require('../util/executeSchedule'); exports.TimeoutError = createErrorClass_1.createErrorClass(function (_super) { return function TimeoutErrorImpl(info) { - if (info === void 0) { info = null; } + if (info === void 0) { + info = null; + } _super(this); this.message = 'Timeout has occurred'; this.name = 'TimeoutError'; @@ -18,11 +20,24 @@ exports.TimeoutError = createErrorClass_1.createErrorClass(function (_super) { }; }); function timeout(config, schedulerArg) { - var _a = (isDate_1.isValidDate(config) - ? { first: config } - : typeof config === 'number' + var _a = isDate_1.isValidDate(config) + ? { first: config } + : typeof config === 'number' ? { each: config } - : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : async_1.asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; + : config, + first = _a.first, + each = _a.each, + _b = _a.with, + _with = _b === void 0 ? timeoutErrorFactory : _b, + _c = _a.scheduler, + scheduler = + _c === void 0 + ? schedulerArg !== null && schedulerArg !== void 0 + ? schedulerArg + : async_1.asyncScheduler + : _c, + _d = _a.meta, + meta = _d === void 0 ? null : _d; if (first == null && each == null) { throw new TypeError('No timeout provided.'); } @@ -32,36 +47,68 @@ function timeout(config, schedulerArg) { var lastValue = null; var seen = 0; var startTimer = function (delay) { - timerSubscription = executeSchedule_1.executeSchedule(subscriber, scheduler, function () { - try { - originalSourceSubscription.unsubscribe(); - innerFrom_1.innerFrom(_with({ - meta: meta, - lastValue: lastValue, - seen: seen, - })).subscribe(subscriber); - } - catch (err) { - subscriber.error(err); - } - }, delay); + timerSubscription = executeSchedule_1.executeSchedule( + subscriber, + scheduler, + function () { + try { + originalSourceSubscription.unsubscribe(); + innerFrom_1 + .innerFrom( + _with({ + meta: meta, + lastValue: lastValue, + seen: seen + }) + ) + .subscribe(subscriber); + } catch (err) { + subscriber.error(err); + } + }, + delay + ); }; - originalSourceSubscription = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next((lastValue = value)); - each > 0 && startTimer(each); - }, undefined, undefined, function () { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); + originalSourceSubscription = source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + timerSubscription === null || timerSubscription === void 0 + ? void 0 + : timerSubscription.unsubscribe(); + seen++; + subscriber.next((lastValue = value)); + each > 0 && startTimer(each); + }, + undefined, + undefined, + function () { + if ( + !(timerSubscription === null || + timerSubscription === void 0 + ? void 0 + : timerSubscription.closed) + ) { + timerSubscription === null || + timerSubscription === void 0 + ? void 0 + : timerSubscription.unsubscribe(); + } + lastValue = null; + } + ) + ); + startTimer( + first != null + ? typeof first === 'number' + ? first + : +first - scheduler.now() + : each + ); }); } exports.timeout = timeout; function timeoutErrorFactory(info) { throw new exports.TimeoutError(info); } -//# sourceMappingURL=timeout.js.map \ No newline at end of file +//# sourceMappingURL=timeout.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/window.js b/node_modules/rxjs/dist/cjs/internal/operators/window.js index 27c903f7e..2ed86bf8f 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/window.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/window.js @@ -1,10 +1,10 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.window = void 0; -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); +var Subject_1 = require('../Subject'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var noop_1 = require('../util/noop'); function window(windowBoundaries) { return lift_1.operate(function (source, subscriber) { var windowSubject = new Subject_1.Subject(); @@ -13,19 +13,39 @@ function window(windowBoundaries) { windowSubject.error(err); subscriber.error(err); }; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - windowBoundaries.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () { - windowSubject.complete(); - subscriber.next((windowSubject = new Subject_1.Subject())); - }, noop_1.noop, errorHandler)); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + return windowSubject === null || windowSubject === void 0 + ? void 0 + : windowSubject.next(value); + }, + function () { + windowSubject.complete(); + subscriber.complete(); + }, + errorHandler + ) + ); + windowBoundaries.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function () { + windowSubject.complete(); + subscriber.next((windowSubject = new Subject_1.Subject())); + }, + noop_1.noop, + errorHandler + ) + ); return function () { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject === null || windowSubject === void 0 + ? void 0 + : windowSubject.unsubscribe(); windowSubject = null; }; }); } exports.window = window; -//# sourceMappingURL=window.js.map \ No newline at end of file +//# sourceMappingURL=window.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js b/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js index e08a04451..994fdbbda 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js @@ -1,67 +1,95 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } +'use strict'; +var __values = + (this && this.__values) || + function (o) { + var s = typeof Symbol === 'function' && Symbol.iterator, + m = s && o[s], + i = 0; + if (m) return m.call(o); + if (o && typeof o.length === 'number') + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError( + s ? 'Object is not iterable.' : 'Symbol.iterator is not defined.' + ); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, '__esModule', { value: true }); exports.windowCount = void 0; -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var Subject_1 = require('../Subject'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); function windowCount(windowSize, startWindowEvery) { - if (startWindowEvery === void 0) { startWindowEvery = 0; } + if (startWindowEvery === void 0) { + startWindowEvery = 0; + } var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; return lift_1.operate(function (source, subscriber) { var windows = [new Subject_1.Subject()]; var starts = []; var count = 0; subscriber.next(windows[0].asObservable()); - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { - var window_1 = windows_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + try { + for ( + var windows_1 = __values(windows), + windows_1_1 = windows_1.next(); + !windows_1_1.done; + windows_1_1 = windows_1.next() + ) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + windows_1_1 && + !windows_1_1.done && + (_a = windows_1.return) + ) + _a.call(windows_1); + } finally { + if (e_1) throw e_1.error; + } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject_1.Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, + function () { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, + function (err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, + function () { + starts = null; + windows = null; } - finally { if (e_1) throw e_1.error; } - } - var c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count % startEvery === 0) { - var window_2 = new Subject_1.Subject(); - windows.push(window_2); - subscriber.next(window_2.asObservable()); - } - }, function () { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, function (err) { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, function () { - starts = null; - windows = null; - })); + ) + ); }); } exports.windowCount = windowCount; -//# sourceMappingURL=windowCount.js.map \ No newline at end of file +//# sourceMappingURL=windowCount.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js b/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js index f862b9c2e..73b1e4cfe 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js @@ -1,28 +1,33 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.windowTime = void 0; -var Subject_1 = require("../Subject"); -var async_1 = require("../scheduler/async"); -var Subscription_1 = require("../Subscription"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var arrRemove_1 = require("../util/arrRemove"); -var args_1 = require("../util/args"); -var executeSchedule_1 = require("../util/executeSchedule"); +var Subject_1 = require('../Subject'); +var async_1 = require('../scheduler/async'); +var Subscription_1 = require('../Subscription'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var arrRemove_1 = require('../util/arrRemove'); +var args_1 = require('../util/args'); +var executeSchedule_1 = require('../util/executeSchedule'); function windowTime(windowTimeSpan) { var _a, _b; var otherArgs = []; for (var _i = 1; _i < arguments.length; _i++) { otherArgs[_i - 1] = arguments[_i]; } - var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; - var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var scheduler = + (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 + ? _a + : async_1.asyncScheduler; + var windowCreationInterval = + (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; var maxWindowSize = otherArgs[1] || Infinity; return lift_1.operate(function (source, subscriber) { var windowRecords = []; var restartOnClose = false; var closeWindow = function (record) { - var window = record.window, subs = record.subs; + var window = record.window, + subs = record.subs; window.complete(); subs.unsubscribe(); arrRemove_1.arrRemove(windowRecords, record); @@ -36,21 +41,35 @@ function windowTime(windowTimeSpan) { var record_1 = { window: window_1, subs: subs, - seen: 0, + seen: 0 }; windowRecords.push(record_1); subscriber.next(window_1.asObservable()); - executeSchedule_1.executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); + executeSchedule_1.executeSchedule( + subs, + scheduler, + function () { + return closeWindow(record_1); + }, + windowTimeSpan + ); } }; if (windowCreationInterval !== null && windowCreationInterval >= 0) { - executeSchedule_1.executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } - else { + executeSchedule_1.executeSchedule( + subscriber, + scheduler, + startWindow, + windowCreationInterval, + true + ); + } else { restartOnClose = true; } startWindow(); - var loop = function (cb) { return windowRecords.slice().forEach(cb); }; + var loop = function (cb) { + return windowRecords.slice().forEach(cb); + }; var terminate = function (cb) { loop(function (_a) { var window = _a.window; @@ -59,16 +78,31 @@ function windowTime(windowTimeSpan) { cb(subscriber); subscriber.unsubscribe(); }; - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - loop(function (record) { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + loop(function (record) { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, + function () { + return terminate(function (consumer) { + return consumer.complete(); + }); + }, + function (err) { + return terminate(function (consumer) { + return consumer.error(err); + }); + } + ) + ); return function () { windowRecords = null; }; }); } exports.windowTime = windowTime; -//# sourceMappingURL=windowTime.js.map \ No newline at end of file +//# sourceMappingURL=windowTime.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js b/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js index 30d4e91ec..df90d321d 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js @@ -1,24 +1,31 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } +'use strict'; +var __values = + (this && this.__values) || + function (o) { + var s = typeof Symbol === 'function' && Symbol.iterator, + m = s && o[s], + i = 0; + if (m) return m.call(o); + if (o && typeof o.length === 'number') + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError( + s ? 'Object is not iterable.' : 'Symbol.iterator is not defined.' + ); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, '__esModule', { value: true }); exports.windowToggle = void 0; -var Subject_1 = require("../Subject"); -var Subscription_1 = require("../Subscription"); -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); -var arrRemove_1 = require("../util/arrRemove"); +var Subject_1 = require('../Subject'); +var Subscription_1 = require('../Subscription'); +var lift_1 = require('../util/lift'); +var innerFrom_1 = require('../observable/innerFrom'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var noop_1 = require('../util/noop'); +var arrRemove_1 = require('../util/arrRemove'); function windowToggle(openings, closingSelector) { return lift_1.operate(function (source, subscriber) { var windows = []; @@ -28,53 +35,88 @@ function windowToggle(openings, closingSelector) { } subscriber.error(err); }; - innerFrom_1.innerFrom(openings).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (openValue) { - var window = new Subject_1.Subject(); - windows.push(window); - var closingSubscription = new Subscription_1.Subscription(); - var closeWindow = function () { - arrRemove_1.arrRemove(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - var closingNotifier; - try { - closingNotifier = innerFrom_1.innerFrom(closingSelector(openValue)); - } - catch (err) { - handleError(err); - return; - } - subscriber.next(window.asObservable()); - closingSubscription.add(closingNotifier.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError))); - }, noop_1.noop)); - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var windowsCopy = windows.slice(); - try { - for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { - var window_1 = windowsCopy_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); + innerFrom_1.innerFrom(openings).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (openValue) { + var window = new Subject_1.Subject(); + windows.push(window); + var closingSubscription = new Subscription_1.Subscription(); + var closeWindow = function () { + arrRemove_1.arrRemove(windows, window); + window.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = innerFrom_1.innerFrom( + closingSelector(openValue) + ); + } catch (err) { + handleError(err); + return; + } + subscriber.next(window.asObservable()); + closingSubscription.add( + closingNotifier.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + closeWindow, + noop_1.noop, + handleError + ) + ) + ); + }, + noop_1.noop + ) + ); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + var windowsCopy = windows.slice(); + try { + for ( + var windowsCopy_1 = __values(windowsCopy), + windowsCopy_1_1 = windowsCopy_1.next(); + !windowsCopy_1_1.done; + windowsCopy_1_1 = windowsCopy_1.next() + ) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + windowsCopy_1_1 && + !windowsCopy_1_1.done && + (_a = windowsCopy_1.return) + ) + _a.call(windowsCopy_1); + } finally { + if (e_1) throw e_1.error; + } + } + }, + function () { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, + handleError, + function () { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (0 < windows.length) { - windows.shift().complete(); - } - subscriber.complete(); - }, handleError, function () { - while (0 < windows.length) { - windows.shift().unsubscribe(); - } - })); + ) + ); }); } exports.windowToggle = windowToggle; -//# sourceMappingURL=windowToggle.js.map \ No newline at end of file +//# sourceMappingURL=windowToggle.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js index a98d158b0..d3bb44733 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js @@ -1,10 +1,10 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); exports.windowWhen = void 0; -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); +var Subject_1 = require('../Subject'); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var innerFrom_1 = require('../observable/innerFrom'); function windowWhen(closingSelector) { return lift_1.operate(function (source, subscriber) { var window; @@ -14,29 +14,50 @@ function windowWhen(closingSelector) { subscriber.error(err); }; var openWindow = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); window === null || window === void 0 ? void 0 : window.complete(); window = new Subject_1.Subject(); subscriber.next(window.asObservable()); var closingNotifier; try { closingNotifier = innerFrom_1.innerFrom(closingSelector()); - } - catch (err) { + } catch (err) { handleError(err); return; } - closingNotifier.subscribe((closingSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + closingNotifier.subscribe( + (closingSubscriber = + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + openWindow, + openWindow, + handleError + )) + ); }; openWindow(); - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () { - window.complete(); - subscriber.complete(); - }, handleError, function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window = null; - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + return window.next(value); + }, + function () { + window.complete(); + subscriber.complete(); + }, + handleError, + function () { + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); + window = null; + } + ) + ); }); } exports.windowWhen = windowWhen; -//# sourceMappingURL=windowWhen.js.map \ No newline at end of file +//# sourceMappingURL=windowWhen.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js b/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js index 7246526fb..3ae5bcb40 100644 --- a/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js +++ b/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js @@ -1,33 +1,42 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { +'use strict'; +var __read = + (this && this.__read) || + function (o, n) { + var m = typeof Symbol === 'function' && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; try { - if (r && !r.done && (m = i["return"])) m.call(i); + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error: error }; + } finally { + try { + if (r && !r.done && (m = i['return'])) m.call(i); + } finally { + if (e) throw e.error; + } } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); + return ar; + }; +var __spreadArray = + (this && this.__spreadArray) || + function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; +Object.defineProperty(exports, '__esModule', { value: true }); exports.withLatestFrom = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -var identity_1 = require("../util/identity"); -var noop_1 = require("../util/noop"); -var args_1 = require("../util/args"); +var lift_1 = require('../util/lift'); +var OperatorSubscriber_1 = require('./OperatorSubscriber'); +var innerFrom_1 = require('../observable/innerFrom'); +var identity_1 = require('../util/identity'); +var noop_1 = require('../util/noop'); +var args_1 = require('../util/args'); function withLatestFrom() { var inputs = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -37,27 +46,47 @@ function withLatestFrom() { return lift_1.operate(function (source, subscriber) { var len = inputs.length; var otherValues = new Array(len); - var hasValue = inputs.map(function () { return false; }); + var hasValue = inputs.map(function () { + return false; + }); var ready = false; var _loop_1 = function (i) { - innerFrom_1.innerFrom(inputs[i]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - hasValue[i] = true; - (ready = hasValue.every(identity_1.identity)) && (hasValue = null); - } - }, noop_1.noop)); + innerFrom_1.innerFrom(inputs[i]).subscribe( + new OperatorSubscriber_1.OperatorSubscriber( + subscriber, + function (value) { + otherValues[i] = value; + if (!ready && !hasValue[i]) { + hasValue[i] = true; + (ready = hasValue.every(identity_1.identity)) && + (hasValue = null); + } + }, + noop_1.noop + ) + ); }; for (var i = 0; i < len; i++) { _loop_1(i); } - source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - if (ready) { - var values = __spreadArray([value], __read(otherValues)); - subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); - } - })); + source.subscribe( + new OperatorSubscriber_1.OperatorSubscriber(subscriber, function ( + value + ) { + if (ready) { + var values = __spreadArray([value], __read(otherValues)); + subscriber.next( + project + ? project.apply( + void 0, + __spreadArray([], __read(values)) + ) + : values + ); + } + }) + ); }); } exports.withLatestFrom = withLatestFrom; -//# sourceMappingURL=withLatestFrom.js.map \ No newline at end of file +//# sourceMappingURL=withLatestFrom.js.map diff --git a/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js b/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js index 80d8ceb08..18bb7b01f 100644 --- a/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js +++ b/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js @@ -1,70 +1,110 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { +'use strict'; +var __extends = + (this && this.__extends) || + (function () { + var extendStatics = function (d, b) { + extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) + if (Object.prototype.hasOwnProperty.call(b, p)) + d[p] = b[p]; + }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== 'function' && b !== null) + throw new TypeError( + 'Class extends value ' + + String(b) + + ' is not a constructor or null' + ); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); +var __read = + (this && this.__read) || + function (o, n) { + var m = typeof Symbol === 'function' && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error: error }; + } finally { + try { + if (r && !r.done && (m = i['return'])) m.call(i); + } finally { + if (e) throw e.error; + } } + return ar; + }; +var __spreadArray = + (this && this.__spreadArray) || + function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; +var __values = + (this && this.__values) || + function (o) { + var s = typeof Symbol === 'function' && Symbol.iterator, + m = s && o[s], + i = 0; + if (m) return m.call(o); + if (o && typeof o.length === 'number') + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError( + s ? 'Object is not iterable.' : 'Symbol.iterator is not defined.' + ); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, '__esModule', { value: true }); exports.TestScheduler = void 0; -var Observable_1 = require("../Observable"); -var ColdObservable_1 = require("./ColdObservable"); -var HotObservable_1 = require("./HotObservable"); -var SubscriptionLog_1 = require("./SubscriptionLog"); -var VirtualTimeScheduler_1 = require("../scheduler/VirtualTimeScheduler"); -var NotificationFactories_1 = require("../NotificationFactories"); -var dateTimestampProvider_1 = require("../scheduler/dateTimestampProvider"); -var performanceTimestampProvider_1 = require("../scheduler/performanceTimestampProvider"); -var animationFrameProvider_1 = require("../scheduler/animationFrameProvider"); -var immediateProvider_1 = require("../scheduler/immediateProvider"); -var intervalProvider_1 = require("../scheduler/intervalProvider"); -var timeoutProvider_1 = require("../scheduler/timeoutProvider"); +var Observable_1 = require('../Observable'); +var ColdObservable_1 = require('./ColdObservable'); +var HotObservable_1 = require('./HotObservable'); +var SubscriptionLog_1 = require('./SubscriptionLog'); +var VirtualTimeScheduler_1 = require('../scheduler/VirtualTimeScheduler'); +var NotificationFactories_1 = require('../NotificationFactories'); +var dateTimestampProvider_1 = require('../scheduler/dateTimestampProvider'); +var performanceTimestampProvider_1 = require('../scheduler/performanceTimestampProvider'); +var animationFrameProvider_1 = require('../scheduler/animationFrameProvider'); +var immediateProvider_1 = require('../scheduler/immediateProvider'); +var intervalProvider_1 = require('../scheduler/intervalProvider'); +var timeoutProvider_1 = require('../scheduler/timeoutProvider'); var defaultMaxFrame = 750; var TestScheduler = (function (_super) { __extends(TestScheduler, _super); function TestScheduler(assertDeepEqual) { - var _this = _super.call(this, VirtualTimeScheduler_1.VirtualAction, defaultMaxFrame) || this; + var _this = + _super.call( + this, + VirtualTimeScheduler_1.VirtualAction, + defaultMaxFrame + ) || this; _this.assertDeepEqual = assertDeepEqual; _this.hotObservables = []; _this.coldObservables = []; @@ -73,102 +113,226 @@ var TestScheduler = (function (_super) { return _this; } TestScheduler.prototype.createTime = function (marbles) { - var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); + var indexOf = this.runMode + ? marbles.trim().indexOf('|') + : marbles.indexOf('|'); if (indexOf === -1) { - throw new Error('marble diagram for time should have a completion marker "|"'); + throw new Error( + 'marble diagram for time should have a completion marker "|"' + ); } return indexOf * TestScheduler.frameTimeFactor; }; - TestScheduler.prototype.createColdObservable = function (marbles, values, error) { + TestScheduler.prototype.createColdObservable = function ( + marbles, + values, + error + ) { if (marbles.indexOf('^') !== -1) { - throw new Error('cold observable cannot have subscription offset "^"'); + throw new Error( + 'cold observable cannot have subscription offset "^"' + ); } if (marbles.indexOf('!') !== -1) { - throw new Error('cold observable cannot have unsubscription marker "!"'); + throw new Error( + 'cold observable cannot have unsubscription marker "!"' + ); } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var messages = TestScheduler.parseMarbles( + marbles, + values, + error, + undefined, + this.runMode + ); var cold = new ColdObservable_1.ColdObservable(messages, this); this.coldObservables.push(cold); return cold; }; - TestScheduler.prototype.createHotObservable = function (marbles, values, error) { + TestScheduler.prototype.createHotObservable = function ( + marbles, + values, + error + ) { if (marbles.indexOf('!') !== -1) { - throw new Error('hot observable cannot have unsubscription marker "!"'); + throw new Error( + 'hot observable cannot have unsubscription marker "!"' + ); } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var messages = TestScheduler.parseMarbles( + marbles, + values, + error, + undefined, + this.runMode + ); var subject = new HotObservable_1.HotObservable(messages, this); this.hotObservables.push(subject); return subject; }; - TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) { + TestScheduler.prototype.materializeInnerObservable = function ( + observable, + outerFrame + ) { var _this = this; var messages = []; - observable.subscribe(function (value) { - messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.nextNotification(value) }); - }, function (error) { - messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.errorNotification(error) }); - }, function () { - messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.COMPLETE_NOTIFICATION }); - }); + observable.subscribe( + function (value) { + messages.push({ + frame: _this.frame - outerFrame, + notification: + NotificationFactories_1.nextNotification(value) + }); + }, + function (error) { + messages.push({ + frame: _this.frame - outerFrame, + notification: + NotificationFactories_1.errorNotification(error) + }); + }, + function () { + messages.push({ + frame: _this.frame - outerFrame, + notification: NotificationFactories_1.COMPLETE_NOTIFICATION + }); + } + ); return messages; }; - TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) { + TestScheduler.prototype.expectObservable = function ( + observable, + subscriptionMarbles + ) { var _this = this; - if (subscriptionMarbles === void 0) { subscriptionMarbles = null; } + if (subscriptionMarbles === void 0) { + subscriptionMarbles = null; + } var actual = []; var flushTest = { actual: actual, ready: false }; - var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); - var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; + var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions( + subscriptionMarbles, + this.runMode + ); + var subscriptionFrame = + subscriptionParsed.subscribedFrame === Infinity + ? 0 + : subscriptionParsed.subscribedFrame; var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; var subscription; this.schedule(function () { - subscription = observable.subscribe(function (x) { - var value = x instanceof Observable_1.Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - actual.push({ frame: _this.frame, notification: NotificationFactories_1.nextNotification(value) }); - }, function (error) { - actual.push({ frame: _this.frame, notification: NotificationFactories_1.errorNotification(error) }); - }, function () { - actual.push({ frame: _this.frame, notification: NotificationFactories_1.COMPLETE_NOTIFICATION }); - }); + subscription = observable.subscribe( + function (x) { + var value = + x instanceof Observable_1.Observable + ? _this.materializeInnerObservable(x, _this.frame) + : x; + actual.push({ + frame: _this.frame, + notification: + NotificationFactories_1.nextNotification(value) + }); + }, + function (error) { + actual.push({ + frame: _this.frame, + notification: + NotificationFactories_1.errorNotification(error) + }); + }, + function () { + actual.push({ + frame: _this.frame, + notification: + NotificationFactories_1.COMPLETE_NOTIFICATION + }); + } + ); }, subscriptionFrame); if (unsubscriptionFrame !== Infinity) { - this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame); + this.schedule(function () { + return subscription.unsubscribe(); + }, unsubscriptionFrame); } this.flushTests.push(flushTest); var runMode = this.runMode; return { toBe: function (marbles, values, errorValue) { flushTest.ready = true; - flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); + flushTest.expected = TestScheduler.parseMarbles( + marbles, + values, + errorValue, + true, + runMode + ); }, toEqual: function (other) { flushTest.ready = true; flushTest.expected = []; _this.schedule(function () { - subscription = other.subscribe(function (x) { - var value = x instanceof Observable_1.Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.nextNotification(value) }); - }, function (error) { - flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.errorNotification(error) }); - }, function () { - flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.COMPLETE_NOTIFICATION }); - }); + subscription = other.subscribe( + function (x) { + var value = + x instanceof Observable_1.Observable + ? _this.materializeInnerObservable( + x, + _this.frame + ) + : x; + flushTest.expected.push({ + frame: _this.frame, + notification: + NotificationFactories_1.nextNotification( + value + ) + }); + }, + function (error) { + flushTest.expected.push({ + frame: _this.frame, + notification: + NotificationFactories_1.errorNotification( + error + ) + }); + }, + function () { + flushTest.expected.push({ + frame: _this.frame, + notification: + NotificationFactories_1.COMPLETE_NOTIFICATION + }); + } + ); }, subscriptionFrame); - }, + } }; }; - TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) { + TestScheduler.prototype.expectSubscriptions = function ( + actualSubscriptionLogs + ) { var flushTest = { actual: actualSubscriptionLogs, ready: false }; this.flushTests.push(flushTest); var runMode = this.runMode; return { toBe: function (marblesOrMarblesArray) { - var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; + var marblesArray = + typeof marblesOrMarblesArray === 'string' + ? [marblesOrMarblesArray] + : marblesOrMarblesArray; flushTest.ready = true; flushTest.expected = marblesArray - .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); }) - .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; }); - }, + .map(function (marbles) { + return TestScheduler.parseMarblesAsSubscriptions( + marbles, + runMode + ); + }) + .filter(function (marbles) { + return marbles.subscribedFrame !== Infinity; + }); + } }; }; TestScheduler.prototype.flush = function () { @@ -188,7 +352,9 @@ var TestScheduler = (function (_super) { }; TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) { var _this = this; - if (runMode === void 0) { runMode = false; } + if (runMode === void 0) { + runMode = false; + } if (typeof marbles !== 'string') { return new SubscriptionLog_1.SubscriptionLog(Infinity); } @@ -223,14 +389,20 @@ var TestScheduler = (function (_super) { break; case '^': if (subscriptionFrame !== Infinity) { - throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); + throw new Error( + "found a second subscription point '^' in a " + + 'subscription marble diagram. There can only be one.' + ); } subscriptionFrame = groupStart > -1 ? groupStart : frame; advanceFrameBy(1); break; case '!': if (unsubscriptionFrame !== Infinity) { - throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); + throw new Error( + "found a second unsubscription point '!' in a " + + 'subscription marble diagram. There can only be one.' + ); } unsubscriptionFrame = groupStart > -1 ? groupStart : frame; break; @@ -238,7 +410,9 @@ var TestScheduler = (function (_super) { if (runMode && c.match(/^[0-9]$/)) { if (i === 0 || characters[i - 1] === ' ') { var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + var match = buffer.match( + /^([0-9]+(?:\.[0-9]+)?)(ms|s|m) / + ); if (match) { i += match[0].length - 1; var duration = parseFloat(match[1]); @@ -257,48 +431,79 @@ var TestScheduler = (function (_super) { default: break; } - advanceFrameBy(durationInMs / this_1.frameTimeFactor); + advanceFrameBy( + durationInMs / this_1.frameTimeFactor + ); break; } } } - throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); + throw new Error( + "there can only be '^' and '!' markers in a " + + "subscription marble diagram. Found instead '" + + c + + "'." + ); } frame = nextFrame; out_i_1 = i; }; - var this_1 = this, out_i_1; + var this_1 = this, + out_i_1; for (var i = 0; i < len; i++) { _loop_1(i); i = out_i_1; } if (unsubscriptionFrame < 0) { return new SubscriptionLog_1.SubscriptionLog(subscriptionFrame); - } - else { - return new SubscriptionLog_1.SubscriptionLog(subscriptionFrame, unsubscriptionFrame); + } else { + return new SubscriptionLog_1.SubscriptionLog( + subscriptionFrame, + unsubscriptionFrame + ); } }; - TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) { + TestScheduler.parseMarbles = function ( + marbles, + values, + errorValue, + materializeInnerObservables, + runMode + ) { var _this = this; - if (materializeInnerObservables === void 0) { materializeInnerObservables = false; } - if (runMode === void 0) { runMode = false; } + if (materializeInnerObservables === void 0) { + materializeInnerObservables = false; + } + if (runMode === void 0) { + runMode = false; + } if (marbles.indexOf('!') !== -1) { - throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); + throw new Error( + 'conventional marble diagrams cannot have the ' + + 'unsubscription marker "!"' + ); } var characters = __spreadArray([], __read(marbles)); var len = characters.length; var testMessages = []; - var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); + var subIndex = runMode + ? marbles.replace(/^[ ]+/, '').indexOf('^') + : marbles.indexOf('^'); var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; - var getValue = typeof values !== 'object' - ? function (x) { return x; } - : function (x) { - if (materializeInnerObservables && values[x] instanceof ColdObservable_1.ColdObservable) { - return values[x].messages; - } - return values[x]; - }; + var getValue = + typeof values !== 'object' + ? function (x) { + return x; + } + : function (x) { + if ( + materializeInnerObservables && + values[x] instanceof ColdObservable_1.ColdObservable + ) { + return values[x].messages; + } + return values[x]; + }; var groupStart = -1; var _loop_2 = function (i) { var nextFrame = frame; @@ -325,21 +530,26 @@ var TestScheduler = (function (_super) { advanceFrameBy(1); break; case '|': - notification = NotificationFactories_1.COMPLETE_NOTIFICATION; + notification = + NotificationFactories_1.COMPLETE_NOTIFICATION; advanceFrameBy(1); break; case '^': advanceFrameBy(1); break; case '#': - notification = NotificationFactories_1.errorNotification(errorValue || 'error'); + notification = NotificationFactories_1.errorNotification( + errorValue || 'error' + ); advanceFrameBy(1); break; default: if (runMode && c.match(/^[0-9]$/)) { if (i === 0 || characters[i - 1] === ' ') { var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + var match = buffer.match( + /^([0-9]+(?:\.[0-9]+)?)(ms|s|m) / + ); if (match) { i += match[0].length - 1; var duration = parseFloat(match[1]); @@ -358,22 +568,30 @@ var TestScheduler = (function (_super) { default: break; } - advanceFrameBy(durationInMs / this_2.frameTimeFactor); + advanceFrameBy( + durationInMs / this_2.frameTimeFactor + ); break; } } } - notification = NotificationFactories_1.nextNotification(getValue(c)); + notification = NotificationFactories_1.nextNotification( + getValue(c) + ); advanceFrameBy(1); break; } if (notification) { - testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification }); + testMessages.push({ + frame: groupStart > -1 ? groupStart : frame, + notification: notification + }); } frame = nextFrame; out_i_2 = i; }; - var this_2 = this, out_i_2; + var this_2 = this, + out_i_2; for (var i = 0; i < len; i++) { _loop_2(i); i = out_i_2; @@ -401,20 +619,33 @@ var TestScheduler = (function (_super) { throw new Error('animate() was not called within run()'); } map.delete(handle); - }, + } }; var animate = function (marbles) { var e_1, _a; if (map) { - throw new Error('animate() must not be called more than once within run()'); + throw new Error( + 'animate() must not be called more than once within run()' + ); } if (/[|#]/.test(marbles)) { throw new Error('animate() must not complete or error'); } map = new Map(); - var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); + var messages = TestScheduler.parseMarbles( + marbles, + undefined, + undefined, + undefined, + true + ); try { - for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) { + for ( + var messages_1 = __values(messages), + messages_1_1 = messages_1.next(); + !messages_1_1.done; + messages_1_1 = messages_1.next() + ) { var message = messages_1_1.value; _this.schedule(function () { var e_2, _a; @@ -422,27 +653,45 @@ var TestScheduler = (function (_super) { var callbacks = Array.from(map.values()); map.clear(); try { - for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) { + for ( + var callbacks_1 = + ((e_2 = void 0), __values(callbacks)), + callbacks_1_1 = callbacks_1.next(); + !callbacks_1_1.done; + callbacks_1_1 = callbacks_1.next() + ) { var callback = callbacks_1_1.value; callback(now); } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { try { - if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1); + if ( + callbacks_1_1 && + !callbacks_1_1.done && + (_a = callbacks_1.return) + ) + _a.call(callbacks_1); + } finally { + if (e_2) throw e_2.error; } - finally { if (e_2) throw e_2.error; } } }, message.frame); } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { try { - if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1); + if ( + messages_1_1 && + !messages_1_1.done && + (_a = messages_1.return) + ) + _a.call(messages_1); + } finally { + if (e_1) throw e_1.error; } - finally { if (e_1) throw e_1.error; } } }; return { animate: animate, delegate: delegate }; @@ -463,7 +712,9 @@ var TestScheduler = (function (_super) { return type === 'immediate'; }); if (dueImmediates.length > 0) { - var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler; + var _a = dueImmediates[0], + handle = _a.handle, + handler = _a.handler; scheduleLookup.delete(handle); handler(); return; @@ -474,7 +725,8 @@ var TestScheduler = (function (_super) { }); if (dueIntervals.length > 0) { var firstDueInterval = dueIntervals[0]; - var duration = firstDueInterval.duration, handler = firstDueInterval.handler; + var duration = firstDueInterval.duration, + handler = firstDueInterval.handler; firstDueInterval.due = now + duration; firstDueInterval.subscription = _this.schedule(run, duration); handler(); @@ -485,7 +737,9 @@ var TestScheduler = (function (_super) { return type === 'timeout'; }); if (dueTimeouts.length > 0) { - var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler; + var _b = dueTimeouts[0], + handle = _b.handle, + handler = _b.handler; scheduleLookup.delete(handle); handler(); return; @@ -501,7 +755,7 @@ var TestScheduler = (function (_super) { handle: handle, handler: handler, subscription: _this.schedule(run, 0), - type: 'immediate', + type: 'immediate' }); return handle; }, @@ -511,11 +765,13 @@ var TestScheduler = (function (_super) { value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; var interval = { setInterval: function (handler, duration) { - if (duration === void 0) { duration = 0; } + if (duration === void 0) { + duration = 0; + } var handle = ++lastHandle; scheduleLookup.set(handle, { due: _this.now() + duration, @@ -523,7 +779,7 @@ var TestScheduler = (function (_super) { handle: handle, handler: handler, subscription: _this.schedule(run, duration), - type: 'interval', + type: 'interval' }); return handle; }, @@ -533,11 +789,13 @@ var TestScheduler = (function (_super) { value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; var timeout = { setTimeout: function (handler, duration) { - if (duration === void 0) { duration = 0; } + if (duration === void 0) { + duration = 0; + } var handle = ++lastHandle; scheduleLookup.set(handle, { due: _this.now() + duration, @@ -545,7 +803,7 @@ var TestScheduler = (function (_super) { handle: handle, handler: handler, subscription: _this.schedule(run, duration), - type: 'timeout', + type: 'timeout' }); return handle; }, @@ -555,7 +813,7 @@ var TestScheduler = (function (_super) { value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; return { immediate: immediate, interval: interval, timeout: timeout }; }; @@ -567,12 +825,14 @@ var TestScheduler = (function (_super) { this.runMode = true; var animator = this.createAnimator(); var delegates = this.createDelegates(); - animationFrameProvider_1.animationFrameProvider.delegate = animator.delegate; + animationFrameProvider_1.animationFrameProvider.delegate = + animator.delegate; dateTimestampProvider_1.dateTimestampProvider.delegate = this; immediateProvider_1.immediateProvider.delegate = delegates.immediate; intervalProvider_1.intervalProvider.delegate = delegates.interval; timeoutProvider_1.timeoutProvider.delegate = delegates.timeout; - performanceTimestampProvider_1.performanceTimestampProvider.delegate = this; + performanceTimestampProvider_1.performanceTimestampProvider.delegate = + this; var helpers = { cold: this.createColdObservable.bind(this), hot: this.createHotObservable.bind(this), @@ -580,27 +840,28 @@ var TestScheduler = (function (_super) { time: this.createTime.bind(this), expectObservable: this.expectObservable.bind(this), expectSubscriptions: this.expectSubscriptions.bind(this), - animate: animator.animate, + animate: animator.animate }; try { var ret = callback(helpers); this.flush(); return ret; - } - finally { + } finally { TestScheduler.frameTimeFactor = prevFrameTimeFactor; this.maxFrames = prevMaxFrames; this.runMode = false; - animationFrameProvider_1.animationFrameProvider.delegate = undefined; + animationFrameProvider_1.animationFrameProvider.delegate = + undefined; dateTimestampProvider_1.dateTimestampProvider.delegate = undefined; immediateProvider_1.immediateProvider.delegate = undefined; intervalProvider_1.intervalProvider.delegate = undefined; timeoutProvider_1.timeoutProvider.delegate = undefined; - performanceTimestampProvider_1.performanceTimestampProvider.delegate = undefined; + performanceTimestampProvider_1.performanceTimestampProvider.delegate = + undefined; } }; TestScheduler.frameTimeFactor = 10; return TestScheduler; -}(VirtualTimeScheduler_1.VirtualTimeScheduler)); +})(VirtualTimeScheduler_1.VirtualTimeScheduler); exports.TestScheduler = TestScheduler; -//# sourceMappingURL=TestScheduler.js.map \ No newline at end of file +//# sourceMappingURL=TestScheduler.js.map diff --git a/node_modules/rxjs/dist/esm/internal/Subscriber.js b/node_modules/rxjs/dist/esm/internal/Subscriber.js index 15a4a2d99..6d64fd214 100644 --- a/node_modules/rxjs/dist/esm/internal/Subscriber.js +++ b/node_modules/rxjs/dist/esm/internal/Subscriber.js @@ -3,7 +3,11 @@ import { isSubscription, Subscription } from './Subscription'; import { config } from './config'; import { reportUnhandledError } from './util/reportUnhandledError'; import { noop } from './util/noop'; -import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories'; +import { + nextNotification, + errorNotification, + COMPLETE_NOTIFICATION +} from './NotificationFactories'; import { timeoutProvider } from './scheduler/timeoutProvider'; import { captureError } from './util/errorContext'; export class Subscriber extends Subscription { @@ -15,8 +19,7 @@ export class Subscriber extends Subscription { if (isSubscription(destination)) { destination.add(this); } - } - else { + } else { this.destination = EMPTY_OBSERVER; } } @@ -26,16 +29,14 @@ export class Subscriber extends Subscription { next(value) { if (this.isStopped) { handleStoppedNotification(nextNotification(value), this); - } - else { + } else { this._next(value); } } error(err) { if (this.isStopped) { handleStoppedNotification(errorNotification(err), this); - } - else { + } else { this.isStopped = true; this._error(err); } @@ -43,8 +44,7 @@ export class Subscriber extends Subscription { complete() { if (this.isStopped) { handleStoppedNotification(COMPLETE_NOTIFICATION, this); - } - else { + } else { this.isStopped = true; this._complete(); } @@ -62,16 +62,14 @@ export class Subscriber extends Subscription { _error(err) { try { this.destination.error(err); - } - finally { + } finally { this.unsubscribe(); } } _complete() { try { this.destination.complete(); - } - finally { + } finally { this.unsubscribe(); } } @@ -82,25 +80,35 @@ export class SafeSubscriber extends Subscriber { let next; if (isFunction(observerOrNext)) { next = observerOrNext; - } - else if (observerOrNext) { + } else if (observerOrNext) { ({ next, error, complete } = observerOrNext); let context; if (this && config.useDeprecatedNextContext) { context = Object.create(observerOrNext); context.unsubscribe = () => this.unsubscribe(); - } - else { + } else { context = observerOrNext; } - next = next === null || next === void 0 ? void 0 : next.bind(context); - error = error === null || error === void 0 ? void 0 : error.bind(context); - complete = complete === null || complete === void 0 ? void 0 : complete.bind(context); + next = + next === null || next === void 0 ? void 0 : next.bind(context); + error = + error === null || error === void 0 + ? void 0 + : error.bind(context); + complete = + complete === null || complete === void 0 + ? void 0 + : complete.bind(context); } this.destination = { next: next ? wrapForErrorHandling(next, this) : noop, - error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler, this), - complete: complete ? wrapForErrorHandling(complete, this) : noop, + error: wrapForErrorHandling( + error !== null && error !== void 0 + ? error + : defaultErrorHandler, + this + ), + complete: complete ? wrapForErrorHandling(complete, this) : noop }; } } @@ -108,12 +116,10 @@ function wrapForErrorHandling(handler, instance) { return (...args) => { try { handler(...args); - } - catch (err) { + } catch (err) { if (config.useDeprecatedSynchronousErrorHandling) { captureError(err); - } - else { + } else { reportUnhandledError(err); } } @@ -124,12 +130,15 @@ function defaultErrorHandler(err) { } function handleStoppedNotification(notification, subscriber) { const { onStoppedNotification } = config; - onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber)); + onStoppedNotification && + timeoutProvider.setTimeout(() => + onStoppedNotification(notification, subscriber) + ); } export const EMPTY_OBSERVER = { closed: true, next: noop, error: defaultErrorHandler, - complete: noop, + complete: noop }; -//# sourceMappingURL=Subscriber.js.map \ No newline at end of file +//# sourceMappingURL=Subscriber.js.map diff --git a/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js b/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js index f046eb814..4a680b97d 100644 --- a/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js +++ b/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js @@ -29,20 +29,32 @@ export class ConnectableObservable extends Observable { this._refCount = 0; const { _connection } = this; this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + _connection === null || _connection === void 0 + ? void 0 + : _connection.unsubscribe(); } connect() { let connection = this._connection; if (!connection) { connection = this._connection = new Subscription(); const subject = this.getSubject(); - connection.add(this.source.subscribe(new OperatorSubscriber(subject, undefined, () => { - this._teardown(); - subject.complete(); - }, (err) => { - this._teardown(); - subject.error(err); - }, () => this._teardown()))); + connection.add( + this.source.subscribe( + new OperatorSubscriber( + subject, + undefined, + () => { + this._teardown(); + subject.complete(); + }, + (err) => { + this._teardown(); + subject.error(err); + }, + () => this._teardown() + ) + ) + ); if (connection.closed) { this._connection = null; connection = Subscription.EMPTY; @@ -54,4 +66,4 @@ export class ConnectableObservable extends Observable { return higherOrderRefCount()(this); } } -//# sourceMappingURL=ConnectableObservable.js.map \ No newline at end of file +//# sourceMappingURL=ConnectableObservable.js.map diff --git a/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js b/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js index 56d0db6ed..9e7ccd23d 100644 --- a/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js +++ b/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js @@ -14,49 +14,72 @@ export function combineLatest(...args) { if (observables.length === 0) { return from([], scheduler); } - const result = new Observable(combineLatestInit(observables, scheduler, keys - ? - (values) => createObject(keys, values) - : - identity)); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; + const result = new Observable( + combineLatestInit( + observables, + scheduler, + keys ? (values) => createObject(keys, values) : identity + ) + ); + return resultSelector + ? result.pipe(mapOneOrManyArgs(resultSelector)) + : result; } -export function combineLatestInit(observables, scheduler, valueTransform = identity) { +export function combineLatestInit( + observables, + scheduler, + valueTransform = identity +) { return (subscriber) => { - maybeSchedule(scheduler, () => { - const { length } = observables; - const values = new Array(length); - let active = length; - let remainingFirstValues = length; - for (let i = 0; i < length; i++) { - maybeSchedule(scheduler, () => { - const source = from(observables[i], scheduler); - let hasFirstValue = false; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - values[i] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, () => { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - } - }, subscriber); + maybeSchedule( + scheduler, + () => { + const { length } = observables; + const values = new Array(length); + let active = length; + let remainingFirstValues = length; + for (let i = 0; i < length; i++) { + maybeSchedule( + scheduler, + () => { + const source = from(observables[i], scheduler); + let hasFirstValue = false; + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + values[i] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next( + valueTransform(values.slice()) + ); + } + }, + () => { + if (!--active) { + subscriber.complete(); + } + } + ) + ); + }, + subscriber + ); + } + }, + subscriber + ); }; } function maybeSchedule(scheduler, execute, subscription) { if (scheduler) { executeSchedule(subscription, scheduler, execute); - } - else { + } else { execute(); } } -//# sourceMappingURL=combineLatest.js.map \ No newline at end of file +//# sourceMappingURL=combineLatest.js.map diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js b/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js index a93644875..fa5bc141d 100644 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js @@ -6,9 +6,10 @@ import { ReplaySubject } from '../../ReplaySubject'; const DEFAULT_WEBSOCKET_CONFIG = { url: '', deserializer: (e) => JSON.parse(e.data), - serializer: (value) => JSON.stringify(value), + serializer: (value) => JSON.stringify(value) }; -const WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; +const WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = + 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; export class WebSocketSubject extends AnonymousSubject { constructor(urlConfigOrSource, destination) { super(); @@ -16,14 +17,15 @@ export class WebSocketSubject extends AnonymousSubject { if (urlConfigOrSource instanceof Observable) { this.destination = destination; this.source = urlConfigOrSource; - } - else { - const config = (this._config = Object.assign({}, DEFAULT_WEBSOCKET_CONFIG)); + } else { + const config = (this._config = Object.assign( + {}, + DEFAULT_WEBSOCKET_CONFIG + )); this._output = new Subject(); if (typeof urlConfigOrSource === 'string') { config.url = urlConfigOrSource; - } - else { + } else { for (const key in urlConfigOrSource) { if (urlConfigOrSource.hasOwnProperty(key)) { config[key] = urlConfigOrSource[key]; @@ -32,8 +34,7 @@ export class WebSocketSubject extends AnonymousSubject { } if (!config.WebSocketCtor && WebSocket) { config.WebSocketCtor = WebSocket; - } - else if (!config.WebSocketCtor) { + } else if (!config.WebSocketCtor) { throw new Error('no WebSocket constructor can be found'); } this.destination = new ReplaySubject(); @@ -57,25 +58,26 @@ export class WebSocketSubject extends AnonymousSubject { return new Observable((observer) => { try { self.next(subMsg()); - } - catch (err) { + } catch (err) { observer.error(err); } - const subscription = self.subscribe((x) => { - try { - if (messageFilter(x)) { - observer.next(x); + const subscription = self.subscribe( + (x) => { + try { + if (messageFilter(x)) { + observer.next(x); + } + } catch (err) { + observer.error(err); } - } - catch (err) { - observer.error(err); - } - }, (err) => observer.error(err), () => observer.complete()); + }, + (err) => observer.error(err), + () => observer.complete() + ); return () => { try { self.next(unsubMsg()); - } - catch (err) { + } catch (err) { observer.error(err); } subscription.unsubscribe(); @@ -87,13 +89,14 @@ export class WebSocketSubject extends AnonymousSubject { const observer = this._output; let socket = null; try { - socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); + socket = protocol + ? new WebSocketCtor(url, protocol) + : new WebSocketCtor(url); this._socket = socket; if (binaryType) { this._socket.binaryType = binaryType; } - } - catch (e) { + } catch (e) { observer.error(e); return; } @@ -115,36 +118,40 @@ export class WebSocketSubject extends AnonymousSubject { openObserver.next(evt); } const queue = this.destination; - this.destination = Subscriber.create((x) => { - if (socket.readyState === 1) { - try { - const { serializer } = this._config; - socket.send(serializer(x)); + this.destination = Subscriber.create( + (x) => { + if (socket.readyState === 1) { + try { + const { serializer } = this._config; + socket.send(serializer(x)); + } catch (e) { + this.destination.error(e); + } } - catch (e) { - this.destination.error(e); + }, + (err) => { + const { closingObserver } = this._config; + if (closingObserver) { + closingObserver.next(undefined); } + if (err && err.code) { + socket.close(err.code, err.reason); + } else { + observer.error( + new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT) + ); + } + this._resetState(); + }, + () => { + const { closingObserver } = this._config; + if (closingObserver) { + closingObserver.next(undefined); + } + socket.close(); + this._resetState(); } - }, (err) => { - const { closingObserver } = this._config; - if (closingObserver) { - closingObserver.next(undefined); - } - if (err && err.code) { - socket.close(err.code, err.reason); - } - else { - observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); - } - this._resetState(); - }, () => { - const { closingObserver } = this._config; - if (closingObserver) { - closingObserver.next(undefined); - } - socket.close(); - this._resetState(); - }); + ); if (queue && queue instanceof ReplaySubject) { subscription.add(queue.subscribe(this.destination)); } @@ -163,8 +170,7 @@ export class WebSocketSubject extends AnonymousSubject { } if (e.wasClean) { observer.complete(); - } - else { + } else { observer.error(e); } }; @@ -172,8 +178,7 @@ export class WebSocketSubject extends AnonymousSubject { try { const { deserializer } = this._config; observer.next(deserializer(e)); - } - catch (err) { + } catch (err) { observer.error(err); } }; @@ -190,7 +195,10 @@ export class WebSocketSubject extends AnonymousSubject { subscriber.add(() => { const { _socket } = this; if (this._output.observers.length === 0) { - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + if ( + _socket && + (_socket.readyState === 1 || _socket.readyState === 0) + ) { _socket.close(); } this._resetState(); @@ -207,4 +215,4 @@ export class WebSocketSubject extends AnonymousSubject { super.unsubscribe(); } } -//# sourceMappingURL=WebSocketSubject.js.map \ No newline at end of file +//# sourceMappingURL=WebSocketSubject.js.map diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js b/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js index 7808c0767..2e28e4491 100644 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js @@ -1,9 +1,10 @@ -import { __rest } from "tslib"; +import { __rest } from 'tslib'; import { OperatorSubscriber } from '../../operators/OperatorSubscriber'; import { Observable } from '../../Observable'; import { innerFrom } from '../../observable/innerFrom'; export function fromFetch(input, initWithSelector = {}) { - const { selector } = initWithSelector, init = __rest(initWithSelector, ["selector"]); + const { selector } = initWithSelector, + init = __rest(initWithSelector, ['selector']); return new Observable((subscriber) => { const controller = new AbortController(); const { signal } = controller; @@ -12,36 +13,45 @@ export function fromFetch(input, initWithSelector = {}) { if (outerSignal) { if (outerSignal.aborted) { controller.abort(); - } - else { + } else { const outerSignalHandler = () => { if (!signal.aborted) { controller.abort(); } }; outerSignal.addEventListener('abort', outerSignalHandler); - subscriber.add(() => outerSignal.removeEventListener('abort', outerSignalHandler)); + subscriber.add(() => + outerSignal.removeEventListener('abort', outerSignalHandler) + ); } } - const perSubscriberInit = Object.assign(Object.assign({}, init), { signal }); + const perSubscriberInit = Object.assign(Object.assign({}, init), { + signal + }); const handleError = (err) => { abortable = false; subscriber.error(err); }; fetch(input, perSubscriberInit) .then((response) => { - if (selector) { - innerFrom(selector(response)).subscribe(new OperatorSubscriber(subscriber, undefined, () => { + if (selector) { + innerFrom(selector(response)).subscribe( + new OperatorSubscriber( + subscriber, + undefined, + () => { + abortable = false; + subscriber.complete(); + }, + handleError + ) + ); + } else { abortable = false; + subscriber.next(response); subscriber.complete(); - }, handleError)); - } - else { - abortable = false; - subscriber.next(response); - subscriber.complete(); - } - }) + } + }) .catch(handleError); return () => { if (abortable) { @@ -50,4 +60,4 @@ export function fromFetch(input, initWithSelector = {}) { }; }); } -//# sourceMappingURL=fetch.js.map \ No newline at end of file +//# sourceMappingURL=fetch.js.map diff --git a/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js b/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js index ae5964b74..04f93083c 100644 --- a/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js +++ b/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js @@ -19,22 +19,34 @@ export function forkJoin(...args) { let remainingEmissions = length; for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) { let hasValue = false; - innerFrom(sources[sourceIndex]).subscribe(new OperatorSubscriber(subscriber, (value) => { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, () => remainingCompletions--, undefined, () => { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject(keys, values) : values); + innerFrom(sources[sourceIndex]).subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, + () => remainingCompletions--, + undefined, + () => { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next( + keys ? createObject(keys, values) : values + ); + } + subscriber.complete(); + } } - subscriber.complete(); - } - })); + ) + ); } }); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; + return resultSelector + ? result.pipe(mapOneOrManyArgs(resultSelector)) + : result; } -//# sourceMappingURL=forkJoin.js.map \ No newline at end of file +//# sourceMappingURL=forkJoin.js.map diff --git a/node_modules/rxjs/dist/esm/internal/observable/race.js b/node_modules/rxjs/dist/esm/internal/observable/race.js index 5456a17e8..262d53191 100644 --- a/node_modules/rxjs/dist/esm/internal/observable/race.js +++ b/node_modules/rxjs/dist/esm/internal/observable/race.js @@ -4,22 +4,32 @@ import { argsOrArgArray } from '../util/argsOrArgArray'; import { OperatorSubscriber } from '../operators/OperatorSubscriber'; export function race(...sources) { sources = argsOrArgArray(sources); - return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); + return sources.length === 1 + ? innerFrom(sources[0]) + : new Observable(raceInit(sources)); } export function raceInit(sources) { return (subscriber) => { let subscriptions = []; - for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { - subscriptions.push(innerFrom(sources[i]).subscribe(new OperatorSubscriber(subscriber, (value) => { - if (subscriptions) { - for (let s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); + for ( + let i = 0; + subscriptions && !subscriber.closed && i < sources.length; + i++ + ) { + subscriptions.push( + innerFrom(sources[i]).subscribe( + new OperatorSubscriber(subscriber, (value) => { + if (subscriptions) { + for (let s = 0; s < subscriptions.length; s++) { + s !== i && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }) + ) + ); } }; } -//# sourceMappingURL=race.js.map \ No newline at end of file +//# sourceMappingURL=race.js.map diff --git a/node_modules/rxjs/dist/esm/internal/observable/zip.js b/node_modules/rxjs/dist/esm/internal/observable/zip.js index b964b12a8..0cb6deddf 100644 --- a/node_modules/rxjs/dist/esm/internal/observable/zip.js +++ b/node_modules/rxjs/dist/esm/internal/observable/zip.js @@ -9,30 +9,52 @@ export function zip(...args) { const sources = argsOrArgArray(args); return sources.length ? new Observable((subscriber) => { - let buffers = sources.map(() => []); - let completed = sources.map(() => false); - subscriber.add(() => { - buffers = completed = null; - }); - for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - innerFrom(sources[sourceIndex]).subscribe(new OperatorSubscriber(subscriber, (value) => { - buffers[sourceIndex].push(value); - if (buffers.every((buffer) => buffer.length)) { - const result = buffers.map((buffer) => buffer.shift()); - subscriber.next(resultSelector ? resultSelector(...result) : result); - if (buffers.some((buffer, i) => !buffer.length && completed[i])) { - subscriber.complete(); - } - } - }, () => { - completed[sourceIndex] = true; - !buffers[sourceIndex].length && subscriber.complete(); - })); - } - return () => { - buffers = completed = null; - }; - }) + let buffers = sources.map(() => []); + let completed = sources.map(() => false); + subscriber.add(() => { + buffers = completed = null; + }); + for ( + let sourceIndex = 0; + !subscriber.closed && sourceIndex < sources.length; + sourceIndex++ + ) { + innerFrom(sources[sourceIndex]).subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + buffers[sourceIndex].push(value); + if (buffers.every((buffer) => buffer.length)) { + const result = buffers.map((buffer) => + buffer.shift() + ); + subscriber.next( + resultSelector + ? resultSelector(...result) + : result + ); + if ( + buffers.some( + (buffer, i) => + !buffer.length && completed[i] + ) + ) { + subscriber.complete(); + } + } + }, + () => { + completed[sourceIndex] = true; + !buffers[sourceIndex].length && + subscriber.complete(); + } + ) + ); + } + return () => { + buffers = completed = null; + }; + }) : EMPTY; } -//# sourceMappingURL=zip.js.map \ No newline at end of file +//# sourceMappingURL=zip.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js b/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js index df57b5460..68c22fc9c 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js +++ b/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js @@ -5,46 +5,44 @@ export class OperatorSubscriber extends Subscriber { this.onFinalize = onFinalize; this._next = onNext ? function (value) { - try { - onNext(value); - } - catch (err) { - destination.error(err); - } - } + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } : super._next; this._error = onError ? function (err) { - try { - onError(err); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } + try { + onError(err); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : super._error; this._complete = onComplete ? function () { - try { - onComplete(); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } + try { + onComplete(); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : super._complete; } unsubscribe() { var _a; const { closed } = this; super.unsubscribe(); - !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + !closed && + ((_a = this.onFinalize) === null || _a === void 0 + ? void 0 + : _a.call(this)); } } -//# sourceMappingURL=OperatorSubscriber.js.map \ No newline at end of file +//# sourceMappingURL=OperatorSubscriber.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/audit.js b/node_modules/rxjs/dist/esm/internal/operators/audit.js index 5012102e8..a71d20cd8 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/audit.js +++ b/node_modules/rxjs/dist/esm/internal/operators/audit.js @@ -8,7 +8,9 @@ export function audit(durationSelector) { let durationSubscriber = null; let isComplete = false; const endDuration = () => { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); durationSubscriber = null; if (hasValue) { hasValue = false; @@ -22,16 +24,31 @@ export function audit(durationSelector) { durationSubscriber = null; isComplete && subscriber.complete(); }; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom(durationSelector(value)).subscribe((durationSubscriber = new OperatorSubscriber(subscriber, endDuration, cleanupDuration))); - } - }, () => { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom(durationSelector(value)).subscribe( + (durationSubscriber = new OperatorSubscriber( + subscriber, + endDuration, + cleanupDuration + )) + ); + } + }, + () => { + isComplete = true; + (!hasValue || + !durationSubscriber || + durationSubscriber.closed) && + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=audit.js.map \ No newline at end of file +//# sourceMappingURL=audit.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/buffer.js b/node_modules/rxjs/dist/esm/internal/operators/buffer.js index 6be7973b3..cd055372a 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/buffer.js +++ b/node_modules/rxjs/dist/esm/internal/operators/buffer.js @@ -4,18 +4,30 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function buffer(closingNotifier) { return operate((source, subscriber) => { let currentBuffer = []; - source.subscribe(new OperatorSubscriber(subscriber, (value) => currentBuffer.push(value), () => { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - closingNotifier.subscribe(new OperatorSubscriber(subscriber, () => { - const b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, noop)); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => currentBuffer.push(value), + () => { + subscriber.next(currentBuffer); + subscriber.complete(); + } + ) + ); + closingNotifier.subscribe( + new OperatorSubscriber( + subscriber, + () => { + const b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, + noop + ) + ); return () => { currentBuffer = null; }; }); } -//# sourceMappingURL=buffer.js.map \ No newline at end of file +//# sourceMappingURL=buffer.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js b/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js index de0a7962a..2d61d4f6c 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js @@ -2,36 +2,50 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; import { arrRemove } from '../util/arrRemove'; export function bufferCount(bufferSize, startBufferEvery = null) { - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + startBufferEvery = + startBufferEvery !== null && startBufferEvery !== void 0 + ? startBufferEvery + : bufferSize; return operate((source, subscriber) => { let buffers = []; let count = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - let toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - for (const buffer of buffers) { - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + let toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); + } + for (const buffer of buffers) { + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = + toEmit !== null && toEmit !== void 0 + ? toEmit + : []; + toEmit.push(buffer); + } + } + if (toEmit) { + for (const buffer of toEmit) { + arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } + }, + () => { + for (const buffer of buffers) { + subscriber.next(buffer); + } + subscriber.complete(); + }, + undefined, + () => { + buffers = null; } - } - if (toEmit) { - for (const buffer of toEmit) { - arrRemove(buffers, buffer); - subscriber.next(buffer); - } - } - }, () => { - for (const buffer of buffers) { - subscriber.next(buffer); - } - subscriber.complete(); - }, undefined, () => { - buffers = null; - })); + ) + ); }); } -//# sourceMappingURL=bufferCount.js.map \ No newline at end of file +//# sourceMappingURL=bufferCount.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js b/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js index 6627690f9..a45e095e7 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js @@ -7,8 +7,12 @@ import { popScheduler } from '../util/args'; import { executeSchedule } from '../util/executeSchedule'; export function bufferTime(bufferTimeSpan, ...otherArgs) { var _a, _b; - const scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - const bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + const scheduler = + (_a = popScheduler(otherArgs)) !== null && _a !== void 0 + ? _a + : asyncScheduler; + const bufferCreationInterval = + (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; const maxBufferSize = otherArgs[1] || Infinity; return operate((source, subscriber) => { let bufferRecords = []; @@ -27,35 +31,57 @@ export function bufferTime(bufferTimeSpan, ...otherArgs) { const buffer = []; const record = { buffer, - subs, + subs }; bufferRecords.push(record); - executeSchedule(subs, scheduler, () => emit(record), bufferTimeSpan); + executeSchedule( + subs, + scheduler, + () => emit(record), + bufferTimeSpan + ); } }; if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } - else { + executeSchedule( + subscriber, + scheduler, + startBuffer, + bufferCreationInterval, + true + ); + } else { restartOnEmit = true; } startBuffer(); - const bufferTimeSubscriber = new OperatorSubscriber(subscriber, (value) => { - const recordsCopy = bufferRecords.slice(); - for (const record of recordsCopy) { - const { buffer } = record; - buffer.push(value); - maxBufferSize <= buffer.length && emit(record); - } - }, () => { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); - } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, undefined, () => (bufferRecords = null)); + const bufferTimeSubscriber = new OperatorSubscriber( + subscriber, + (value) => { + const recordsCopy = bufferRecords.slice(); + for (const record of recordsCopy) { + const { buffer } = record; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + }, + () => { + while ( + bufferRecords === null || bufferRecords === void 0 + ? void 0 + : bufferRecords.length + ) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 + ? void 0 + : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, + undefined, + () => (bufferRecords = null) + ); source.subscribe(bufferTimeSubscriber); }); } -//# sourceMappingURL=bufferTime.js.map \ No newline at end of file +//# sourceMappingURL=bufferTime.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js b/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js index 6d295a603..15a2aad54 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js @@ -7,27 +7,43 @@ import { arrRemove } from '../util/arrRemove'; export function bufferToggle(openings, closingSelector) { return operate((source, subscriber) => { const buffers = []; - innerFrom(openings).subscribe(new OperatorSubscriber(subscriber, (openValue) => { - const buffer = []; - buffers.push(buffer); - const closingSubscription = new Subscription(); - const emitBuffer = () => { - arrRemove(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(new OperatorSubscriber(subscriber, emitBuffer, noop))); - }, noop)); - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - for (const buffer of buffers) { - buffer.push(value); - } - }, () => { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); + innerFrom(openings).subscribe( + new OperatorSubscriber( + subscriber, + (openValue) => { + const buffer = []; + buffers.push(buffer); + const closingSubscription = new Subscription(); + const emitBuffer = () => { + arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add( + innerFrom(closingSelector(openValue)).subscribe( + new OperatorSubscriber(subscriber, emitBuffer, noop) + ) + ); + }, + noop + ) + ); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + for (const buffer of buffers) { + buffer.push(value); + } + }, + () => { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=bufferToggle.js.map \ No newline at end of file +//# sourceMappingURL=bufferToggle.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js b/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js index d4b38d028..fb56f6646 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js @@ -7,17 +7,36 @@ export function bufferWhen(closingSelector) { let buffer = null; let closingSubscriber = null; const openBuffer = () => { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); const b = buffer; buffer = []; b && subscriber.next(b); - innerFrom(closingSelector()).subscribe((closingSubscriber = new OperatorSubscriber(subscriber, openBuffer, noop))); + innerFrom(closingSelector()).subscribe( + (closingSubscriber = new OperatorSubscriber( + subscriber, + openBuffer, + noop + )) + ); }; openBuffer(); - source.subscribe(new OperatorSubscriber(subscriber, (value) => buffer === null || buffer === void 0 ? void 0 : buffer.push(value), () => { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, undefined, () => (buffer = closingSubscriber = null))); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => + buffer === null || buffer === void 0 + ? void 0 + : buffer.push(value), + () => { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, + undefined, + () => (buffer = closingSubscriber = null) + ) + ); }); } -//# sourceMappingURL=bufferWhen.js.map \ No newline at end of file +//# sourceMappingURL=bufferWhen.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/catchError.js b/node_modules/rxjs/dist/esm/internal/operators/catchError.js index 3684cd9b1..8e9a1de98 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/catchError.js +++ b/node_modules/rxjs/dist/esm/internal/operators/catchError.js @@ -6,17 +6,20 @@ export function catchError(selector) { let innerSub = null; let syncUnsub = false; let handledResult; - innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, undefined, (err) => { - handledResult = innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - else { - syncUnsub = true; - } - })); + innerSub = source.subscribe( + new OperatorSubscriber(subscriber, undefined, undefined, (err) => { + handledResult = innerFrom( + selector(err, catchError(selector)(source)) + ); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } else { + syncUnsub = true; + } + }) + ); if (syncUnsub) { innerSub.unsubscribe(); innerSub = null; @@ -24,4 +27,4 @@ export function catchError(selector) { } }); } -//# sourceMappingURL=catchError.js.map \ No newline at end of file +//# sourceMappingURL=catchError.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounce.js b/node_modules/rxjs/dist/esm/internal/operators/debounce.js index dd92e82e0..b39c82cec 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/debounce.js +++ b/node_modules/rxjs/dist/esm/internal/operators/debounce.js @@ -8,7 +8,9 @@ export function debounce(durationSelector) { let lastValue = null; let durationSubscriber = null; const emit = () => { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); durationSubscriber = null; if (hasValue) { hasValue = false; @@ -17,18 +19,34 @@ export function debounce(durationSelector) { subscriber.next(value); } }; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = new OperatorSubscriber(subscriber, emit, noop); - innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, () => { - emit(); - subscriber.complete(); - }, undefined, () => { - lastValue = durationSubscriber = null; - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = new OperatorSubscriber( + subscriber, + emit, + noop + ); + innerFrom(durationSelector(value)).subscribe( + durationSubscriber + ); + }, + () => { + emit(); + subscriber.complete(); + }, + undefined, + () => { + lastValue = durationSubscriber = null; + } + ) + ); }); } -//# sourceMappingURL=debounce.js.map \ No newline at end of file +//# sourceMappingURL=debounce.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js b/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js index 088e8e172..3d5f27a49 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js +++ b/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js @@ -25,19 +25,27 @@ export function debounceTime(dueTime, scheduler = asyncScheduler) { } emit(); } - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, () => { - emit(); - subscriber.complete(); - }, undefined, () => { - lastValue = activeTask = null; - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, + () => { + emit(); + subscriber.complete(); + }, + undefined, + () => { + lastValue = activeTask = null; + } + ) + ); }); } -//# sourceMappingURL=debounceTime.js.map \ No newline at end of file +//# sourceMappingURL=debounceTime.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js b/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js index 88a078f95..f49a3c23b 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js +++ b/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js @@ -3,15 +3,21 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function defaultIfEmpty(defaultValue) { return operate((source, subscriber) => { let hasValue = false; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - hasValue = true; - subscriber.next(value); - }, () => { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + hasValue = true; + subscriber.next(value); + }, + () => { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=defaultIfEmpty.js.map \ No newline at end of file +//# sourceMappingURL=defaultIfEmpty.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js b/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js index 2072493e6..24614d004 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js +++ b/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js @@ -3,7 +3,11 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function dematerialize() { return operate((source, subscriber) => { - source.subscribe(new OperatorSubscriber(subscriber, (notification) => observeNotification(notification, subscriber))); + source.subscribe( + new OperatorSubscriber(subscriber, (notification) => + observeNotification(notification, subscriber) + ) + ); }); } -//# sourceMappingURL=dematerialize.js.map \ No newline at end of file +//# sourceMappingURL=dematerialize.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinct.js b/node_modules/rxjs/dist/esm/internal/operators/distinct.js index 20d9bae6b..989c6e001 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/distinct.js +++ b/node_modules/rxjs/dist/esm/internal/operators/distinct.js @@ -4,14 +4,24 @@ import { noop } from '../util/noop'; export function distinct(keySelector, flushes) { return operate((source, subscriber) => { const distinctKeys = new Set(); - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - const key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes === null || flushes === void 0 ? void 0 : flushes.subscribe(new OperatorSubscriber(subscriber, () => distinctKeys.clear(), noop)); + source.subscribe( + new OperatorSubscriber(subscriber, (value) => { + const key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + }) + ); + flushes === null || flushes === void 0 + ? void 0 + : flushes.subscribe( + new OperatorSubscriber( + subscriber, + () => distinctKeys.clear(), + noop + ) + ); }); } -//# sourceMappingURL=distinct.js.map \ No newline at end of file +//# sourceMappingURL=distinct.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js index 0796df3a0..d3d4efd78 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js +++ b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js @@ -2,21 +2,26 @@ import { identity } from '../util/identity'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function distinctUntilChanged(comparator, keySelector = identity) { - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + comparator = + comparator !== null && comparator !== void 0 + ? comparator + : defaultCompare; return operate((source, subscriber) => { let previousKey; let first = true; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - const currentKey = keySelector(value); - if (first || !comparator(previousKey, currentKey)) { - first = false; - previousKey = currentKey; - subscriber.next(value); - } - })); + source.subscribe( + new OperatorSubscriber(subscriber, (value) => { + const currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + }) + ); }); } function defaultCompare(a, b) { return a === b; } -//# sourceMappingURL=distinctUntilChanged.js.map \ No newline at end of file +//# sourceMappingURL=distinctUntilChanged.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/every.js b/node_modules/rxjs/dist/esm/internal/operators/every.js index b4deaab2b..ed8f6c88a 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/every.js +++ b/node_modules/rxjs/dist/esm/internal/operators/every.js @@ -3,15 +3,21 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function every(predicate, thisArg) { return operate((source, subscriber) => { let index = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, () => { - subscriber.next(true); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, + () => { + subscriber.next(true); + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=every.js.map \ No newline at end of file +//# sourceMappingURL=every.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js b/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js index fccb8856e..a8edd896b 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js +++ b/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js @@ -5,17 +5,29 @@ export function exhaustAll() { return operate((source, subscriber) => { let isComplete = false; let innerSub = null; - source.subscribe(new OperatorSubscriber(subscriber, (inner) => { - if (!innerSub) { - innerSub = innerFrom(inner).subscribe(new OperatorSubscriber(subscriber, undefined, () => { - innerSub = null; - isComplete && subscriber.complete(); - })); - } - }, () => { - isComplete = true; - !innerSub && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (inner) => { + if (!innerSub) { + innerSub = innerFrom(inner).subscribe( + new OperatorSubscriber( + subscriber, + undefined, + () => { + innerSub = null; + isComplete && subscriber.complete(); + } + ) + ); + } + }, + () => { + isComplete = true; + !innerSub && subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=exhaustAll.js.map \ No newline at end of file +//# sourceMappingURL=exhaustAll.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js b/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js index da9568c3f..5577aa2ba 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js +++ b/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js @@ -4,24 +4,43 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function exhaustMap(project, resultSelector) { if (resultSelector) { - return (source) => source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii))))); + return (source) => + source.pipe( + exhaustMap((a, i) => + innerFrom(project(a, i)).pipe( + map((b, ii) => resultSelector(a, b, i, ii)) + ) + ) + ); } return operate((source, subscriber) => { let index = 0; let innerSub = null; let isComplete = false; - source.subscribe(new OperatorSubscriber(subscriber, (outerValue) => { - if (!innerSub) { - innerSub = new OperatorSubscriber(subscriber, undefined, () => { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, () => { - isComplete = true; - !innerSub && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (outerValue) => { + if (!innerSub) { + innerSub = new OperatorSubscriber( + subscriber, + undefined, + () => { + innerSub = null; + isComplete && subscriber.complete(); + } + ); + innerFrom(project(outerValue, index++)).subscribe( + innerSub + ); + } + }, + () => { + isComplete = true; + !innerSub && subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=exhaustMap.js.map \ No newline at end of file +//# sourceMappingURL=exhaustMap.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/filter.js b/node_modules/rxjs/dist/esm/internal/operators/filter.js index 2e705ebdc..5cfb913ef 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/filter.js +++ b/node_modules/rxjs/dist/esm/internal/operators/filter.js @@ -3,7 +3,14 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function filter(predicate, thisArg) { return operate((source, subscriber) => { let index = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value))); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => + predicate.call(thisArg, value, index++) && + subscriber.next(value) + ) + ); }); } -//# sourceMappingURL=filter.js.map \ No newline at end of file +//# sourceMappingURL=filter.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/find.js b/node_modules/rxjs/dist/esm/internal/operators/find.js index 428eedc6d..86712dccd 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/find.js +++ b/node_modules/rxjs/dist/esm/internal/operators/find.js @@ -7,16 +7,22 @@ export function createFind(predicate, thisArg, emit) { const findIndex = emit === 'index'; return (source, subscriber) => { let index = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - const i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, () => { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + const i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, + () => { + subscriber.next(findIndex ? -1 : undefined); + subscriber.complete(); + } + ) + ); }; } -//# sourceMappingURL=find.js.map \ No newline at end of file +//# sourceMappingURL=find.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/groupBy.js b/node_modules/rxjs/dist/esm/internal/operators/groupBy.js index 75f7b31f1..c69d78266 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/groupBy.js +++ b/node_modules/rxjs/dist/esm/internal/operators/groupBy.js @@ -8,8 +8,7 @@ export function groupBy(keySelector, elementOrOptions, duration, connector) { let element; if (!elementOrOptions || typeof elementOrOptions === 'function') { element = elementOrOptions; - } - else { + } else { ({ duration, element, connector } = elementOrOptions); } const groups = new Map(); @@ -18,28 +17,49 @@ export function groupBy(keySelector, elementOrOptions, duration, connector) { cb(subscriber); }; const handleError = (err) => notify((consumer) => consumer.error(err)); - const groupBySourceSubscriber = new GroupBySubscriber(subscriber, (value) => { - try { - const key = keySelector(value); - let group = groups.get(key); - if (!group) { - groups.set(key, (group = connector ? connector() : new Subject())); - const grouped = createGroupedObservable(key, group); - subscriber.next(grouped); - if (duration) { - const durationSubscriber = new OperatorSubscriber(group, () => { - group.complete(); - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - }, undefined, undefined, () => groups.delete(key)); - groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber)); + const groupBySourceSubscriber = new GroupBySubscriber( + subscriber, + (value) => { + try { + const key = keySelector(value); + let group = groups.get(key); + if (!group) { + groups.set( + key, + (group = connector ? connector() : new Subject()) + ); + const grouped = createGroupedObservable(key, group); + subscriber.next(grouped); + if (duration) { + const durationSubscriber = new OperatorSubscriber( + group, + () => { + group.complete(); + durationSubscriber === null || + durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); + }, + undefined, + undefined, + () => groups.delete(key) + ); + groupBySourceSubscriber.add( + innerFrom(duration(grouped)).subscribe( + durationSubscriber + ) + ); + } } + group.next(element ? element(value) : value); + } catch (err) { + handleError(err); } - group.next(element ? element(value) : value); - } - catch (err) { - handleError(err); - } - }, () => notify((consumer) => consumer.complete()), handleError, () => groups.clear()); + }, + () => notify((consumer) => consumer.complete()), + handleError, + () => groups.clear() + ); source.subscribe(groupBySourceSubscriber); function createGroupedObservable(key, groupSubject) { const result = new Observable((groupSubscriber) => { @@ -68,4 +88,4 @@ class GroupBySubscriber extends OperatorSubscriber { this.activeGroups === 0 && super.unsubscribe(); } } -//# sourceMappingURL=groupBy.js.map \ No newline at end of file +//# sourceMappingURL=groupBy.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js b/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js index 4464cbb35..0b706950a 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js +++ b/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js @@ -6,4 +6,4 @@ export function ignoreElements() { source.subscribe(new OperatorSubscriber(subscriber, noop)); }); } -//# sourceMappingURL=ignoreElements.js.map \ No newline at end of file +//# sourceMappingURL=ignoreElements.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js b/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js index a30083b36..5770f2b74 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js +++ b/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js @@ -2,13 +2,19 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function isEmpty() { return operate((source, subscriber) => { - source.subscribe(new OperatorSubscriber(subscriber, () => { - subscriber.next(false); - subscriber.complete(); - }, () => { - subscriber.next(true); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + () => { + subscriber.next(false); + subscriber.complete(); + }, + () => { + subscriber.next(true); + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=isEmpty.js.map \ No newline at end of file +//# sourceMappingURL=isEmpty.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/map.js b/node_modules/rxjs/dist/esm/internal/operators/map.js index 1acdba345..3aea739e1 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/map.js +++ b/node_modules/rxjs/dist/esm/internal/operators/map.js @@ -3,9 +3,11 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function map(project, thisArg) { return operate((source, subscriber) => { let index = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - subscriber.next(project.call(thisArg, value, index++)); - })); + source.subscribe( + new OperatorSubscriber(subscriber, (value) => { + subscriber.next(project.call(thisArg, value, index++)); + }) + ); }); } -//# sourceMappingURL=map.js.map \ No newline at end of file +//# sourceMappingURL=map.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/materialize.js b/node_modules/rxjs/dist/esm/internal/operators/materialize.js index 092883949..fd298e7cc 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/materialize.js +++ b/node_modules/rxjs/dist/esm/internal/operators/materialize.js @@ -3,15 +3,22 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function materialize() { return operate((source, subscriber) => { - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - subscriber.next(Notification.createNext(value)); - }, () => { - subscriber.next(Notification.createComplete()); - subscriber.complete(); - }, (err) => { - subscriber.next(Notification.createError(err)); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + subscriber.next(Notification.createNext(value)); + }, + () => { + subscriber.next(Notification.createComplete()); + subscriber.complete(); + }, + (err) => { + subscriber.next(Notification.createError(err)); + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=materialize.js.map \ No newline at end of file +//# sourceMappingURL=materialize.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js b/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js index 347951d97..3c0d04abf 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js @@ -1,7 +1,16 @@ import { innerFrom } from '../observable/innerFrom'; import { executeSchedule } from '../util/executeSchedule'; import { OperatorSubscriber } from './OperatorSubscriber'; -export function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalTeardown) { +export function mergeInternals( + source, + subscriber, + project, + concurrent, + onBeforeNext, + expand, + innerSubScheduler, + additionalTeardown +) { const buffer = []; let active = 0; let index = 0; @@ -11,48 +20,64 @@ export function mergeInternals(source, subscriber, project, concurrent, onBefore subscriber.complete(); } }; - const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value)); + const outerNext = (value) => + active < concurrent ? doInnerSub(value) : buffer.push(value); const doInnerSub = (value) => { expand && subscriber.next(value); active++; let innerComplete = false; - innerFrom(project(value, index++)).subscribe(new OperatorSubscriber(subscriber, (innerValue) => { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } - else { - subscriber.next(innerValue); - } - }, () => { - innerComplete = true; - }, undefined, () => { - if (innerComplete) { - try { - active--; - while (buffer.length && active < concurrent) { - const bufferedValue = buffer.shift(); - if (innerSubScheduler) { - executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue)); - } - else { - doInnerSub(bufferedValue); + innerFrom(project(value, index++)).subscribe( + new OperatorSubscriber( + subscriber, + (innerValue) => { + onBeforeNext === null || onBeforeNext === void 0 + ? void 0 + : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } else { + subscriber.next(innerValue); + } + }, + () => { + innerComplete = true; + }, + undefined, + () => { + if (innerComplete) { + try { + active--; + while (buffer.length && active < concurrent) { + const bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule( + subscriber, + innerSubScheduler, + () => doInnerSub(bufferedValue) + ); + } else { + doInnerSub(bufferedValue); + } + } + checkComplete(); + } catch (err) { + subscriber.error(err); } } - checkComplete(); - } - catch (err) { - subscriber.error(err); } - } - })); + ) + ); }; - source.subscribe(new OperatorSubscriber(subscriber, outerNext, () => { - isComplete = true; - checkComplete(); - })); + source.subscribe( + new OperatorSubscriber(subscriber, outerNext, () => { + isComplete = true; + checkComplete(); + }) + ); return () => { - additionalTeardown === null || additionalTeardown === void 0 ? void 0 : additionalTeardown(); + additionalTeardown === null || additionalTeardown === void 0 + ? void 0 + : additionalTeardown(); }; } -//# sourceMappingURL=mergeInternals.js.map \ No newline at end of file +//# sourceMappingURL=mergeInternals.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/observeOn.js b/node_modules/rxjs/dist/esm/internal/operators/observeOn.js index a7a8d4ab9..4ddde0864 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/observeOn.js +++ b/node_modules/rxjs/dist/esm/internal/operators/observeOn.js @@ -3,7 +3,32 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function observeOn(scheduler, delay = 0) { return operate((source, subscriber) => { - source.subscribe(new OperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay))); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => + executeSchedule( + subscriber, + scheduler, + () => subscriber.next(value), + delay + ), + () => + executeSchedule( + subscriber, + scheduler, + () => subscriber.complete(), + delay + ), + (err) => + executeSchedule( + subscriber, + scheduler, + () => subscriber.error(err), + delay + ) + ) + ); }); } -//# sourceMappingURL=observeOn.js.map \ No newline at end of file +//# sourceMappingURL=observeOn.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNext.js b/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNext.js index 565e4a55e..e99723a1f 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNext.js +++ b/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNext.js @@ -13,16 +13,19 @@ export function onErrorResumeNext(...sources) { let nextSource; try { nextSource = innerFrom(remaining.shift()); - } - catch (err) { + } catch (err) { subscribeNext(); return; } - const innerSub = new OperatorSubscriber(subscriber, undefined, noop, noop); + const innerSub = new OperatorSubscriber( + subscriber, + undefined, + noop, + noop + ); subscriber.add(nextSource.subscribe(innerSub)); innerSub.add(subscribeNext); - } - else { + } else { subscriber.complete(); } } @@ -30,4 +33,4 @@ export function onErrorResumeNext(...sources) { subscribeNext(); }); } -//# sourceMappingURL=onErrorResumeNext.js.map \ No newline at end of file +//# sourceMappingURL=onErrorResumeNext.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/pairwise.js b/node_modules/rxjs/dist/esm/internal/operators/pairwise.js index aa18a29e8..6d91e6e7a 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/pairwise.js +++ b/node_modules/rxjs/dist/esm/internal/operators/pairwise.js @@ -4,12 +4,14 @@ export function pairwise() { return operate((source, subscriber) => { let prev; let hasPrev = false; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - const p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); + source.subscribe( + new OperatorSubscriber(subscriber, (value) => { + const p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + }) + ); }); } -//# sourceMappingURL=pairwise.js.map \ No newline at end of file +//# sourceMappingURL=pairwise.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/refCount.js b/node_modules/rxjs/dist/esm/internal/operators/refCount.js index e7c9eeb3e..cda6968d4 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/refCount.js +++ b/node_modules/rxjs/dist/esm/internal/operators/refCount.js @@ -4,23 +4,33 @@ export function refCount() { return operate((source, subscriber) => { let connection = null; source._refCount++; - const refCounter = new OperatorSubscriber(subscriber, undefined, undefined, undefined, () => { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { + const refCounter = new OperatorSubscriber( + subscriber, + undefined, + undefined, + undefined, + () => { + if ( + !source || + source._refCount <= 0 || + 0 < --source._refCount + ) { + connection = null; + return; + } + const sharedConnection = source._connection; + const conn = connection; connection = null; - return; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); } - const sharedConnection = source._connection; - const conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - subscriber.unsubscribe(); - }); + ); source.subscribe(refCounter); if (!refCounter.closed) { connection = source.connect(); } }); } -//# sourceMappingURL=refCount.js.map \ No newline at end of file +//# sourceMappingURL=refCount.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeat.js b/node_modules/rxjs/dist/esm/internal/operators/repeat.js index b72319711..f1f59add0 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/repeat.js +++ b/node_modules/rxjs/dist/esm/internal/operators/repeat.js @@ -9,51 +9,57 @@ export function repeat(countOrConfig) { if (countOrConfig != null) { if (typeof countOrConfig === 'object') { ({ count = Infinity, delay } = countOrConfig); - } - else { + } else { count = countOrConfig; } } return count <= 0 ? () => EMPTY : operate((source, subscriber) => { - let soFar = 0; - let sourceSub; - const resubscribe = () => { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay != null) { - const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); - const notifierSubscriber = new OperatorSubscriber(subscriber, () => { - notifierSubscriber.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber); - } - else { - subscribeToSource(); - } - }; - const subscribeToSource = () => { - let syncUnsub = false; - sourceSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, () => { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } - else { - syncUnsub = true; - } - } - else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); + let soFar = 0; + let sourceSub; + const resubscribe = () => { + sourceSub === null || sourceSub === void 0 + ? void 0 + : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + const notifier = + typeof delay === 'number' + ? timer(delay) + : innerFrom(delay(soFar)); + const notifierSubscriber = new OperatorSubscriber( + subscriber, + () => { + notifierSubscriber.unsubscribe(); + subscribeToSource(); + } + ); + notifier.subscribe(notifierSubscriber); + } else { + subscribeToSource(); + } + }; + const subscribeToSource = () => { + let syncUnsub = false; + sourceSub = source.subscribe( + new OperatorSubscriber(subscriber, undefined, () => { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } else { + syncUnsub = true; + } + } else { + subscriber.complete(); + } + }) + ); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); } -//# sourceMappingURL=repeat.js.map \ No newline at end of file +//# sourceMappingURL=repeat.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js b/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js index 3808b06d9..e8f35b33b 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js +++ b/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js @@ -8,30 +8,40 @@ export function repeatWhen(notifier) { let completions$; let isNotifierComplete = false; let isMainComplete = false; - const checkComplete = () => isMainComplete && isNotifierComplete && (subscriber.complete(), true); + const checkComplete = () => + isMainComplete && + isNotifierComplete && + (subscriber.complete(), true); const getCompletionSubject = () => { if (!completions$) { completions$ = new Subject(); - notifier(completions$).subscribe(new OperatorSubscriber(subscriber, () => { - if (innerSub) { - subscribeForRepeatWhen(); - } - else { - syncResub = true; - } - }, () => { - isNotifierComplete = true; - checkComplete(); - })); + notifier(completions$).subscribe( + new OperatorSubscriber( + subscriber, + () => { + if (innerSub) { + subscribeForRepeatWhen(); + } else { + syncResub = true; + } + }, + () => { + isNotifierComplete = true; + checkComplete(); + } + ) + ); } return completions$; }; const subscribeForRepeatWhen = () => { isMainComplete = false; - innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, () => { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); + innerSub = source.subscribe( + new OperatorSubscriber(subscriber, undefined, () => { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + }) + ); if (syncResub) { innerSub.unsubscribe(); innerSub = null; @@ -42,4 +52,4 @@ export function repeatWhen(notifier) { subscribeForRepeatWhen(); }); } -//# sourceMappingURL=repeatWhen.js.map \ No newline at end of file +//# sourceMappingURL=repeatWhen.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/retry.js b/node_modules/rxjs/dist/esm/internal/operators/retry.js index fa7b983ec..cf203f030 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/retry.js +++ b/node_modules/rxjs/dist/esm/internal/operators/retry.js @@ -7,62 +7,77 @@ export function retry(configOrCount = Infinity) { let config; if (configOrCount && typeof configOrCount === 'object') { config = configOrCount; - } - else { + } else { config = { - count: configOrCount, + count: configOrCount }; } - const { count = Infinity, delay, resetOnSuccess: resetOnSuccess = false } = config; + const { + count = Infinity, + delay, + resetOnSuccess: resetOnSuccess = false + } = config; return count <= 0 ? identity : operate((source, subscriber) => { - let soFar = 0; - let innerSub; - const subscribeForRetry = () => { - let syncUnsub = false; - innerSub = source.subscribe(new OperatorSubscriber(subscriber, (value) => { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, undefined, (err) => { - if (soFar++ < count) { - const resub = () => { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - else { - syncUnsub = true; - } - }; - if (delay != null) { - const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); - const notifierSubscriber = new OperatorSubscriber(subscriber, () => { - notifierSubscriber.unsubscribe(); - resub(); - }, () => { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber); - } - else { - resub(); - } - } - else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); + let soFar = 0; + let innerSub; + const subscribeForRetry = () => { + let syncUnsub = false; + innerSub = source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, + undefined, + (err) => { + if (soFar++ < count) { + const resub = () => { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } else { + syncUnsub = true; + } + }; + if (delay != null) { + const notifier = + typeof delay === 'number' + ? timer(delay) + : innerFrom(delay(err, soFar)); + const notifierSubscriber = + new OperatorSubscriber( + subscriber, + () => { + notifierSubscriber.unsubscribe(); + resub(); + }, + () => { + subscriber.complete(); + } + ); + notifier.subscribe(notifierSubscriber); + } else { + resub(); + } + } else { + subscriber.error(err); + } + } + ) + ); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); } -//# sourceMappingURL=retry.js.map \ No newline at end of file +//# sourceMappingURL=retry.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js b/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js index 8b514c6a2..78b802740 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js +++ b/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js @@ -7,15 +7,28 @@ export function retryWhen(notifier) { let syncResub = false; let errors$; const subscribeForRetryWhen = () => { - innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, undefined, (err) => { - if (!errors$) { - errors$ = new Subject(); - notifier(errors$).subscribe(new OperatorSubscriber(subscriber, () => innerSub ? subscribeForRetryWhen() : (syncResub = true))); - } - if (errors$) { - errors$.next(err); - } - })); + innerSub = source.subscribe( + new OperatorSubscriber( + subscriber, + undefined, + undefined, + (err) => { + if (!errors$) { + errors$ = new Subject(); + notifier(errors$).subscribe( + new OperatorSubscriber(subscriber, () => + innerSub + ? subscribeForRetryWhen() + : (syncResub = true) + ) + ); + } + if (errors$) { + errors$.next(err); + } + } + ) + ); if (syncResub) { innerSub.unsubscribe(); innerSub = null; @@ -26,4 +39,4 @@ export function retryWhen(notifier) { subscribeForRetryWhen(); }); } -//# sourceMappingURL=retryWhen.js.map \ No newline at end of file +//# sourceMappingURL=retryWhen.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/sample.js b/node_modules/rxjs/dist/esm/internal/operators/sample.js index f9a32610c..12d679908 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/sample.js +++ b/node_modules/rxjs/dist/esm/internal/operators/sample.js @@ -5,10 +5,12 @@ export function sample(notifier) { return operate((source, subscriber) => { let hasValue = false; let lastValue = null; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - hasValue = true; - lastValue = value; - })); + source.subscribe( + new OperatorSubscriber(subscriber, (value) => { + hasValue = true; + lastValue = value; + }) + ); const emit = () => { if (hasValue) { hasValue = false; @@ -20,4 +22,4 @@ export function sample(notifier) { notifier.subscribe(new OperatorSubscriber(subscriber, emit, noop)); }); } -//# sourceMappingURL=sample.js.map \ No newline at end of file +//# sourceMappingURL=sample.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js b/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js index 53cae617a..e83572049 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js +++ b/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js @@ -1,22 +1,32 @@ import { OperatorSubscriber } from './OperatorSubscriber'; -export function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { +export function scanInternals( + accumulator, + seed, + hasSeed, + emitOnNext, + emitBeforeComplete +) { return (source, subscriber) => { let hasState = hasSeed; let state = seed; let index = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - const i = index++; - state = hasState - ? - accumulator(state, value, i) - : - ((hasState = true), value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && - (() => { - hasState && subscriber.next(state); - subscriber.complete(); - }))); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + const i = index++; + state = hasState + ? accumulator(state, value, i) + : ((hasState = true), value); + emitOnNext && subscriber.next(state); + }, + emitBeforeComplete && + (() => { + hasState && subscriber.next(state); + subscriber.complete(); + }) + ) + ); }; } -//# sourceMappingURL=scanInternals.js.map \ No newline at end of file +//# sourceMappingURL=scanInternals.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js b/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js index 0b366dc00..cf990b05c 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js +++ b/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js @@ -9,20 +9,26 @@ export function sequenceEqual(compareTo, comparator = (a, b) => a === b) { subscriber.complete(); }; const createSubscriber = (selfState, otherState) => { - const sequenceEqualSubscriber = new OperatorSubscriber(subscriber, (a) => { - const { buffer, complete } = otherState; - if (buffer.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); + const sequenceEqualSubscriber = new OperatorSubscriber( + subscriber, + (a) => { + const { buffer, complete } = otherState; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } else { + !comparator(a, buffer.shift()) && emit(false); + } + }, + () => { + selfState.complete = true; + const { complete, buffer } = otherState; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || + sequenceEqualSubscriber === void 0 + ? void 0 + : sequenceEqualSubscriber.unsubscribe(); } - else { - !comparator(a, buffer.shift()) && emit(false); - } - }, () => { - selfState.complete = true; - const { complete, buffer } = otherState; - complete && emit(buffer.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); + ); return sequenceEqualSubscriber; }; source.subscribe(createSubscriber(aState, bState)); @@ -32,7 +38,7 @@ export function sequenceEqual(compareTo, comparator = (a, b) => a === b) { function createState() { return { buffer: [], - complete: false, + complete: false }; } -//# sourceMappingURL=sequenceEqual.js.map \ No newline at end of file +//# sourceMappingURL=sequenceEqual.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/single.js b/node_modules/rxjs/dist/esm/internal/operators/single.js index 6e9003558..319bd1e33 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/single.js +++ b/node_modules/rxjs/dist/esm/internal/operators/single.js @@ -9,22 +9,34 @@ export function single(predicate) { let singleValue; let seenValue = false; let index = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, () => { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } - else { - subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); - } - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && + subscriber.error( + new SequenceError('Too many matching values') + ); + hasValue = true; + singleValue = value; + } + }, + () => { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } else { + subscriber.error( + seenValue + ? new NotFoundError('No matching values') + : new EmptyError() + ); + } + } + ) + ); }); } -//# sourceMappingURL=single.js.map \ No newline at end of file +//# sourceMappingURL=single.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipLast.js b/node_modules/rxjs/dist/esm/internal/operators/skipLast.js index 263a028d4..a9eb35e14 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/skipLast.js +++ b/node_modules/rxjs/dist/esm/internal/operators/skipLast.js @@ -3,26 +3,26 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function skipLast(skipCount) { return skipCount <= 0 - ? - identity + ? identity : operate((source, subscriber) => { - let ring = new Array(skipCount); - let seen = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - const valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } - else { - const index = valueIndex % skipCount; - const oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return () => { - ring = null; - }; - }); + let ring = new Array(skipCount); + let seen = 0; + source.subscribe( + new OperatorSubscriber(subscriber, (value) => { + const valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } else { + const index = valueIndex % skipCount; + const oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + }) + ); + return () => { + ring = null; + }; + }); } -//# sourceMappingURL=skipLast.js.map \ No newline at end of file +//# sourceMappingURL=skipLast.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js b/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js index 92601b2a9..1aac5159b 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js +++ b/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js @@ -5,12 +5,23 @@ import { noop } from '../util/noop'; export function skipUntil(notifier) { return operate((source, subscriber) => { let taking = false; - const skipSubscriber = new OperatorSubscriber(subscriber, () => { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, noop); + const skipSubscriber = new OperatorSubscriber( + subscriber, + () => { + skipSubscriber === null || skipSubscriber === void 0 + ? void 0 + : skipSubscriber.unsubscribe(); + taking = true; + }, + noop + ); innerFrom(notifier).subscribe(skipSubscriber); - source.subscribe(new OperatorSubscriber(subscriber, (value) => taking && subscriber.next(value))); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => taking && subscriber.next(value) + ) + ); }); } -//# sourceMappingURL=skipUntil.js.map \ No newline at end of file +//# sourceMappingURL=skipUntil.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js b/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js index fc974da6c..05689419d 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js +++ b/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js @@ -4,7 +4,14 @@ export function skipWhile(predicate) { return operate((source, subscriber) => { let taking = false; let index = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => (taking || (taking = !predicate(value, index++))) && subscriber.next(value))); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => + (taking || (taking = !predicate(value, index++))) && + subscriber.next(value) + ) + ); }); } -//# sourceMappingURL=skipWhile.js.map \ No newline at end of file +//# sourceMappingURL=skipWhile.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchMap.js b/node_modules/rxjs/dist/esm/internal/operators/switchMap.js index 361c669af..af0bc4e91 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/switchMap.js +++ b/node_modules/rxjs/dist/esm/internal/operators/switchMap.js @@ -6,19 +6,44 @@ export function switchMap(project, resultSelector) { let innerSubscriber = null; let index = 0; let isComplete = false; - const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete(); - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - let innerIndex = 0; - const outerIndex = index++; - innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = new OperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => { - innerSubscriber = null; - checkComplete(); - }))); - }, () => { - isComplete = true; - checkComplete(); - })); + const checkComplete = () => + isComplete && !innerSubscriber && subscriber.complete(); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + innerSubscriber === null || innerSubscriber === void 0 + ? void 0 + : innerSubscriber.unsubscribe(); + let innerIndex = 0; + const outerIndex = index++; + innerFrom(project(value, outerIndex)).subscribe( + (innerSubscriber = new OperatorSubscriber( + subscriber, + (innerValue) => + subscriber.next( + resultSelector + ? resultSelector( + value, + innerValue, + outerIndex, + innerIndex++ + ) + : innerValue + ), + () => { + innerSubscriber = null; + checkComplete(); + } + )) + ); + }, + () => { + isComplete = true; + checkComplete(); + } + ) + ); }); } -//# sourceMappingURL=switchMap.js.map \ No newline at end of file +//# sourceMappingURL=switchMap.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/take.js b/node_modules/rxjs/dist/esm/internal/operators/take.js index 2fa7ccf80..7de709b7d 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/take.js +++ b/node_modules/rxjs/dist/esm/internal/operators/take.js @@ -3,18 +3,19 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function take(count) { return count <= 0 - ? - () => EMPTY + ? () => EMPTY : operate((source, subscriber) => { - let seen = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); + let seen = 0; + source.subscribe( + new OperatorSubscriber(subscriber, (value) => { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + }) + ); + }); } -//# sourceMappingURL=take.js.map \ No newline at end of file +//# sourceMappingURL=take.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeLast.js b/node_modules/rxjs/dist/esm/internal/operators/takeLast.js index b4b7a9e4e..a6484f9ce 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/takeLast.js +++ b/node_modules/rxjs/dist/esm/internal/operators/takeLast.js @@ -5,18 +5,26 @@ export function takeLast(count) { return count <= 0 ? () => EMPTY : operate((source, subscriber) => { - let buffer = []; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - buffer.push(value); - count < buffer.length && buffer.shift(); - }, () => { - for (const value of buffer) { - subscriber.next(value); - } - subscriber.complete(); - }, undefined, () => { - buffer = null; - })); - }); + let buffer = []; + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, + () => { + for (const value of buffer) { + subscriber.next(value); + } + subscriber.complete(); + }, + undefined, + () => { + buffer = null; + } + ) + ); + }); } -//# sourceMappingURL=takeLast.js.map \ No newline at end of file +//# sourceMappingURL=takeLast.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js b/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js index 397349201..8c4eb274a 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js +++ b/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js @@ -4,8 +4,14 @@ import { innerFrom } from '../observable/innerFrom'; import { noop } from '../util/noop'; export function takeUntil(notifier) { return operate((source, subscriber) => { - innerFrom(notifier).subscribe(new OperatorSubscriber(subscriber, () => subscriber.complete(), noop)); + innerFrom(notifier).subscribe( + new OperatorSubscriber( + subscriber, + () => subscriber.complete(), + noop + ) + ); !subscriber.closed && source.subscribe(subscriber); }); } -//# sourceMappingURL=takeUntil.js.map \ No newline at end of file +//# sourceMappingURL=takeUntil.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js b/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js index aacdbac8d..51322de86 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js +++ b/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js @@ -3,11 +3,13 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function takeWhile(predicate, inclusive = false) { return operate((source, subscriber) => { let index = 0; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - const result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber(subscriber, (value) => { + const result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + }) + ); }); } -//# sourceMappingURL=takeWhile.js.map \ No newline at end of file +//# sourceMappingURL=takeWhile.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/tap.js b/node_modules/rxjs/dist/esm/internal/operators/tap.js index 940b88855..e3fb5b98a 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/tap.js +++ b/node_modules/rxjs/dist/esm/internal/operators/tap.js @@ -3,38 +3,58 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; import { identity } from '../util/identity'; export function tap(observerOrNext, error, complete) { - const tapObserver = isFunction(observerOrNext) || error || complete - ? - { next: observerOrNext, error, complete } - : observerOrNext; + const tapObserver = + isFunction(observerOrNext) || error || complete + ? { next: observerOrNext, error, complete } + : observerOrNext; return tapObserver ? operate((source, subscriber) => { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - let isUnsub = true; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - var _a; - (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); - subscriber.next(value); - }, () => { - var _a; - isUnsub = false; - (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - subscriber.complete(); - }, (err) => { - var _a; - isUnsub = false; - (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); - subscriber.error(err); - }, () => { - var _a, _b; - if (isUnsub) { - (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) - : - identity; + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver); + let isUnsub = true; + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + var _a; + (_a = tapObserver.next) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver, value); + subscriber.next(value); + }, + () => { + var _a; + isUnsub = false; + (_a = tapObserver.complete) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver); + subscriber.complete(); + }, + (err) => { + var _a; + isUnsub = false; + (_a = tapObserver.error) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver, err); + subscriber.error(err); + }, + () => { + var _a, _b; + if (isUnsub) { + (_a = tapObserver.unsubscribe) === null || + _a === void 0 + ? void 0 + : _a.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 + ? void 0 + : _b.call(tapObserver); + } + ) + ); + }) + : identity; } -//# sourceMappingURL=tap.js.map \ No newline at end of file +//# sourceMappingURL=tap.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/throttle.js b/node_modules/rxjs/dist/esm/internal/operators/throttle.js index 7521a8bc4..9489cebbb 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/throttle.js +++ b/node_modules/rxjs/dist/esm/internal/operators/throttle.js @@ -3,7 +3,7 @@ import { OperatorSubscriber } from './OperatorSubscriber'; import { innerFrom } from '../observable/innerFrom'; export const defaultThrottleConfig = { leading: true, - trailing: false, + trailing: false }; export function throttle(durationSelector, config = defaultThrottleConfig) { return operate((source, subscriber) => { @@ -13,7 +13,9 @@ export function throttle(durationSelector, config = defaultThrottleConfig) { let throttled = null; let isComplete = false; const endThrottling = () => { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled === null || throttled === void 0 + ? void 0 + : throttled.unsubscribe(); throttled = null; if (trailing) { send(); @@ -24,7 +26,14 @@ export function throttle(durationSelector, config = defaultThrottleConfig) { throttled = null; isComplete && subscriber.complete(); }; - const startThrottle = (value) => (throttled = innerFrom(durationSelector(value)).subscribe(new OperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + const startThrottle = (value) => + (throttled = innerFrom(durationSelector(value)).subscribe( + new OperatorSubscriber( + subscriber, + endThrottling, + cleanupThrottling + ) + )); const send = () => { if (hasValue) { hasValue = false; @@ -34,14 +43,22 @@ export function throttle(durationSelector, config = defaultThrottleConfig) { !isComplete && startThrottle(value); } }; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, () => { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && + (leading ? send() : startThrottle(value)); + }, + () => { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=throttle.js.map \ No newline at end of file +//# sourceMappingURL=throttle.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js b/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js index bc03974ef..0e7e11634 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js +++ b/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js @@ -4,13 +4,22 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function throwIfEmpty(errorFactory = defaultErrorFactory) { return operate((source, subscriber) => { let hasValue = false; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - hasValue = true; - subscriber.next(value); - }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory())))); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + hasValue = true; + subscriber.next(value); + }, + () => + hasValue + ? subscriber.complete() + : subscriber.error(errorFactory()) + ) + ); }); } function defaultErrorFactory() { return new EmptyError(); } -//# sourceMappingURL=throwIfEmpty.js.map \ No newline at end of file +//# sourceMappingURL=throwIfEmpty.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js b/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js index 566091dd4..82e9280e7 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js +++ b/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js @@ -3,13 +3,27 @@ import { scan } from './scan'; import { defer } from '../observable/defer'; import { map } from './map'; export function timeInterval(scheduler = asyncScheduler) { - return (source) => defer(() => { - return source.pipe(scan(({ current }, value) => ({ value, current: scheduler.now(), last: current }), { - current: scheduler.now(), - value: undefined, - last: undefined, - }), map(({ current, last, value }) => new TimeInterval(value, current - last))); - }); + return (source) => + defer(() => { + return source.pipe( + scan( + ({ current }, value) => ({ + value, + current: scheduler.now(), + last: current + }), + { + current: scheduler.now(), + value: undefined, + last: undefined + } + ), + map( + ({ current, last, value }) => + new TimeInterval(value, current - last) + ) + ); + }); } export class TimeInterval { constructor(value, interval) { @@ -17,4 +31,4 @@ export class TimeInterval { this.interval = interval; } } -//# sourceMappingURL=timeInterval.js.map \ No newline at end of file +//# sourceMappingURL=timeInterval.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeout.js b/node_modules/rxjs/dist/esm/internal/operators/timeout.js index eb35cceb9..59e28c22b 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/timeout.js +++ b/node_modules/rxjs/dist/esm/internal/operators/timeout.js @@ -5,18 +5,29 @@ import { innerFrom } from '../observable/innerFrom'; import { createErrorClass } from '../util/createErrorClass'; import { OperatorSubscriber } from './OperatorSubscriber'; import { executeSchedule } from '../util/executeSchedule'; -export const TimeoutError = createErrorClass((_super) => function TimeoutErrorImpl(info = null) { - _super(this); - this.message = 'Timeout has occurred'; - this.name = 'TimeoutError'; - this.info = info; -}); +export const TimeoutError = createErrorClass( + (_super) => + function TimeoutErrorImpl(info = null) { + _super(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + this.info = info; + } +); export function timeout(config, schedulerArg) { - const { first, each, with: _with = timeoutErrorFactory, scheduler = schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler, meta = null } = (isValidDate(config) + const { + first, + each, + with: _with = timeoutErrorFactory, + scheduler = schedulerArg !== null && schedulerArg !== void 0 + ? schedulerArg + : asyncScheduler, + meta = null + } = isValidDate(config) ? { first: config } : typeof config === 'number' - ? { each: config } - : config); + ? { each: config } + : config; if (first == null && each == null) { throw new TypeError('No timeout provided.'); } @@ -26,35 +37,65 @@ export function timeout(config, schedulerArg) { let lastValue = null; let seen = 0; const startTimer = (delay) => { - timerSubscription = executeSchedule(subscriber, scheduler, () => { - try { - originalSourceSubscription.unsubscribe(); - innerFrom(_with({ - meta, - lastValue, - seen, - })).subscribe(subscriber); - } - catch (err) { - subscriber.error(err); - } - }, delay); + timerSubscription = executeSchedule( + subscriber, + scheduler, + () => { + try { + originalSourceSubscription.unsubscribe(); + innerFrom( + _with({ + meta, + lastValue, + seen + }) + ).subscribe(subscriber); + } catch (err) { + subscriber.error(err); + } + }, + delay + ); }; - originalSourceSubscription = source.subscribe(new OperatorSubscriber(subscriber, (value) => { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next((lastValue = value)); - each > 0 && startTimer(each); - }, undefined, undefined, () => { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); + originalSourceSubscription = source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + timerSubscription === null || timerSubscription === void 0 + ? void 0 + : timerSubscription.unsubscribe(); + seen++; + subscriber.next((lastValue = value)); + each > 0 && startTimer(each); + }, + undefined, + undefined, + () => { + if ( + !(timerSubscription === null || + timerSubscription === void 0 + ? void 0 + : timerSubscription.closed) + ) { + timerSubscription === null || + timerSubscription === void 0 + ? void 0 + : timerSubscription.unsubscribe(); + } + lastValue = null; + } + ) + ); + startTimer( + first != null + ? typeof first === 'number' + ? first + : +first - scheduler.now() + : each + ); }); } function timeoutErrorFactory(info) { throw new TimeoutError(info); } -//# sourceMappingURL=timeout.js.map \ No newline at end of file +//# sourceMappingURL=timeout.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/window.js b/node_modules/rxjs/dist/esm/internal/operators/window.js index 89a40dbb9..8a22d63e3 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/window.js +++ b/node_modules/rxjs/dist/esm/internal/operators/window.js @@ -10,18 +10,37 @@ export function window(windowBoundaries) { windowSubject.error(err); subscriber.error(err); }; - source.subscribe(new OperatorSubscriber(subscriber, (value) => windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value), () => { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - windowBoundaries.subscribe(new OperatorSubscriber(subscriber, () => { - windowSubject.complete(); - subscriber.next((windowSubject = new Subject())); - }, noop, errorHandler)); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => + windowSubject === null || windowSubject === void 0 + ? void 0 + : windowSubject.next(value), + () => { + windowSubject.complete(); + subscriber.complete(); + }, + errorHandler + ) + ); + windowBoundaries.subscribe( + new OperatorSubscriber( + subscriber, + () => { + windowSubject.complete(); + subscriber.next((windowSubject = new Subject())); + }, + noop, + errorHandler + ) + ); return () => { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject === null || windowSubject === void 0 + ? void 0 + : windowSubject.unsubscribe(); windowSubject = null; }; }); } -//# sourceMappingURL=window.js.map \ No newline at end of file +//# sourceMappingURL=window.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowCount.js b/node_modules/rxjs/dist/esm/internal/operators/windowCount.js index e0da2519c..8b5ba0105 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/windowCount.js +++ b/node_modules/rxjs/dist/esm/internal/operators/windowCount.js @@ -8,33 +8,41 @@ export function windowCount(windowSize, startWindowEvery = 0) { let starts = []; let count = 0; subscriber.next(windows[0].asObservable()); - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - for (const window of windows) { - window.next(value); - } - const c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count % startEvery === 0) { - const window = new Subject(); - windows.push(window); - subscriber.next(window.asObservable()); - } - }, () => { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, (err) => { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, () => { - starts = null; - windows = null; - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + for (const window of windows) { + window.next(value); + } + const c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + const window = new Subject(); + windows.push(window); + subscriber.next(window.asObservable()); + } + }, + () => { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, + (err) => { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, + () => { + starts = null; + windows = null; + } + ) + ); }); } -//# sourceMappingURL=windowCount.js.map \ No newline at end of file +//# sourceMappingURL=windowCount.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowTime.js b/node_modules/rxjs/dist/esm/internal/operators/windowTime.js index e0fe5a40a..7a613808c 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/windowTime.js +++ b/node_modules/rxjs/dist/esm/internal/operators/windowTime.js @@ -8,8 +8,12 @@ import { popScheduler } from '../util/args'; import { executeSchedule } from '../util/executeSchedule'; export function windowTime(windowTimeSpan, ...otherArgs) { var _a, _b; - const scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - const windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + const scheduler = + (_a = popScheduler(otherArgs)) !== null && _a !== void 0 + ? _a + : asyncScheduler; + const windowCreationInterval = + (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; const maxWindowSize = otherArgs[1] || Infinity; return operate((source, subscriber) => { let windowRecords = []; @@ -29,17 +33,27 @@ export function windowTime(windowTimeSpan, ...otherArgs) { const record = { window, subs, - seen: 0, + seen: 0 }; windowRecords.push(record); subscriber.next(window.asObservable()); - executeSchedule(subs, scheduler, () => closeWindow(record), windowTimeSpan); + executeSchedule( + subs, + scheduler, + () => closeWindow(record), + windowTimeSpan + ); } }; if (windowCreationInterval !== null && windowCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } - else { + executeSchedule( + subscriber, + scheduler, + startWindow, + windowCreationInterval, + true + ); + } else { restartOnClose = true; } startWindow(); @@ -49,15 +63,22 @@ export function windowTime(windowTimeSpan, ...otherArgs) { cb(subscriber); subscriber.unsubscribe(); }; - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - loop((record) => { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, () => terminate((consumer) => consumer.complete()), (err) => terminate((consumer) => consumer.error(err)))); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + loop((record) => { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, + () => terminate((consumer) => consumer.complete()), + (err) => terminate((consumer) => consumer.error(err)) + ) + ); return () => { windowRecords = null; }; }); } -//# sourceMappingURL=windowTime.js.map \ No newline at end of file +//# sourceMappingURL=windowTime.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js b/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js index bfe0ad1fc..aa88c2fd1 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js +++ b/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js @@ -14,41 +14,63 @@ export function windowToggle(openings, closingSelector) { } subscriber.error(err); }; - innerFrom(openings).subscribe(new OperatorSubscriber(subscriber, (openValue) => { - const window = new Subject(); - windows.push(window); - const closingSubscription = new Subscription(); - const closeWindow = () => { - arrRemove(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - let closingNotifier; - try { - closingNotifier = innerFrom(closingSelector(openValue)); - } - catch (err) { - handleError(err); - return; - } - subscriber.next(window.asObservable()); - closingSubscription.add(closingNotifier.subscribe(new OperatorSubscriber(subscriber, closeWindow, noop, handleError))); - }, noop)); - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - const windowsCopy = windows.slice(); - for (const window of windowsCopy) { - window.next(value); - } - }, () => { - while (0 < windows.length) { - windows.shift().complete(); - } - subscriber.complete(); - }, handleError, () => { - while (0 < windows.length) { - windows.shift().unsubscribe(); - } - })); + innerFrom(openings).subscribe( + new OperatorSubscriber( + subscriber, + (openValue) => { + const window = new Subject(); + windows.push(window); + const closingSubscription = new Subscription(); + const closeWindow = () => { + arrRemove(windows, window); + window.complete(); + closingSubscription.unsubscribe(); + }; + let closingNotifier; + try { + closingNotifier = innerFrom(closingSelector(openValue)); + } catch (err) { + handleError(err); + return; + } + subscriber.next(window.asObservable()); + closingSubscription.add( + closingNotifier.subscribe( + new OperatorSubscriber( + subscriber, + closeWindow, + noop, + handleError + ) + ) + ); + }, + noop + ) + ); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + const windowsCopy = windows.slice(); + for (const window of windowsCopy) { + window.next(value); + } + }, + () => { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, + handleError, + () => { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } + } + ) + ); }); } -//# sourceMappingURL=windowToggle.js.map \ No newline at end of file +//# sourceMappingURL=windowToggle.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js b/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js index d0b5c4fda..90f8f716b 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js +++ b/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js @@ -11,28 +11,46 @@ export function windowWhen(closingSelector) { subscriber.error(err); }; const openWindow = () => { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); window === null || window === void 0 ? void 0 : window.complete(); window = new Subject(); subscriber.next(window.asObservable()); let closingNotifier; try { closingNotifier = innerFrom(closingSelector()); - } - catch (err) { + } catch (err) { handleError(err); return; } - closingNotifier.subscribe((closingSubscriber = new OperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + closingNotifier.subscribe( + (closingSubscriber = new OperatorSubscriber( + subscriber, + openWindow, + openWindow, + handleError + )) + ); }; openWindow(); - source.subscribe(new OperatorSubscriber(subscriber, (value) => window.next(value), () => { - window.complete(); - subscriber.complete(); - }, handleError, () => { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window = null; - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + (value) => window.next(value), + () => { + window.complete(); + subscriber.complete(); + }, + handleError, + () => { + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); + window = null; + } + ) + ); }); } -//# sourceMappingURL=windowWhen.js.map \ No newline at end of file +//# sourceMappingURL=windowWhen.js.map diff --git a/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js b/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js index b9c6c0349..0bea728f0 100644 --- a/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js +++ b/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js @@ -12,20 +12,29 @@ export function withLatestFrom(...inputs) { let hasValue = inputs.map(() => false); let ready = false; for (let i = 0; i < len; i++) { - innerFrom(inputs[i]).subscribe(new OperatorSubscriber(subscriber, (value) => { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - hasValue[i] = true; - (ready = hasValue.every(identity)) && (hasValue = null); - } - }, noop)); + innerFrom(inputs[i]).subscribe( + new OperatorSubscriber( + subscriber, + (value) => { + otherValues[i] = value; + if (!ready && !hasValue[i]) { + hasValue[i] = true; + (ready = hasValue.every(identity)) && + (hasValue = null); + } + }, + noop + ) + ); } - source.subscribe(new OperatorSubscriber(subscriber, (value) => { - if (ready) { - const values = [value, ...otherValues]; - subscriber.next(project ? project(...values) : values); - } - })); + source.subscribe( + new OperatorSubscriber(subscriber, (value) => { + if (ready) { + const values = [value, ...otherValues]; + subscriber.next(project ? project(...values) : values); + } + }) + ); }); } -//# sourceMappingURL=withLatestFrom.js.map \ No newline at end of file +//# sourceMappingURL=withLatestFrom.js.map diff --git a/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js b/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js index 547fd1b93..31e21894a 100644 --- a/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js +++ b/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js @@ -2,8 +2,15 @@ import { Observable } from '../Observable'; import { ColdObservable } from './ColdObservable'; import { HotObservable } from './HotObservable'; import { SubscriptionLog } from './SubscriptionLog'; -import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler'; -import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories'; +import { + VirtualTimeScheduler, + VirtualAction +} from '../scheduler/VirtualTimeScheduler'; +import { + COMPLETE_NOTIFICATION, + errorNotification, + nextNotification +} from '../NotificationFactories'; import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; import { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider'; import { animationFrameProvider } from '../scheduler/animationFrameProvider'; @@ -21,85 +28,170 @@ export class TestScheduler extends VirtualTimeScheduler { this.runMode = false; } createTime(marbles) { - const indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); + const indexOf = this.runMode + ? marbles.trim().indexOf('|') + : marbles.indexOf('|'); if (indexOf === -1) { - throw new Error('marble diagram for time should have a completion marker "|"'); + throw new Error( + 'marble diagram for time should have a completion marker "|"' + ); } return indexOf * TestScheduler.frameTimeFactor; } createColdObservable(marbles, values, error) { if (marbles.indexOf('^') !== -1) { - throw new Error('cold observable cannot have subscription offset "^"'); + throw new Error( + 'cold observable cannot have subscription offset "^"' + ); } if (marbles.indexOf('!') !== -1) { - throw new Error('cold observable cannot have unsubscription marker "!"'); + throw new Error( + 'cold observable cannot have unsubscription marker "!"' + ); } - const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + const messages = TestScheduler.parseMarbles( + marbles, + values, + error, + undefined, + this.runMode + ); const cold = new ColdObservable(messages, this); this.coldObservables.push(cold); return cold; } createHotObservable(marbles, values, error) { if (marbles.indexOf('!') !== -1) { - throw new Error('hot observable cannot have unsubscription marker "!"'); + throw new Error( + 'hot observable cannot have unsubscription marker "!"' + ); } - const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + const messages = TestScheduler.parseMarbles( + marbles, + values, + error, + undefined, + this.runMode + ); const subject = new HotObservable(messages, this); this.hotObservables.push(subject); return subject; } materializeInnerObservable(observable, outerFrame) { const messages = []; - observable.subscribe((value) => { - messages.push({ frame: this.frame - outerFrame, notification: nextNotification(value) }); - }, (error) => { - messages.push({ frame: this.frame - outerFrame, notification: errorNotification(error) }); - }, () => { - messages.push({ frame: this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); - }); + observable.subscribe( + (value) => { + messages.push({ + frame: this.frame - outerFrame, + notification: nextNotification(value) + }); + }, + (error) => { + messages.push({ + frame: this.frame - outerFrame, + notification: errorNotification(error) + }); + }, + () => { + messages.push({ + frame: this.frame - outerFrame, + notification: COMPLETE_NOTIFICATION + }); + } + ); return messages; } expectObservable(observable, subscriptionMarbles = null) { const actual = []; const flushTest = { actual, ready: false }; - const subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); - const subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; + const subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions( + subscriptionMarbles, + this.runMode + ); + const subscriptionFrame = + subscriptionParsed.subscribedFrame === Infinity + ? 0 + : subscriptionParsed.subscribedFrame; const unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; let subscription; this.schedule(() => { - subscription = observable.subscribe((x) => { - const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; - actual.push({ frame: this.frame, notification: nextNotification(value) }); - }, (error) => { - actual.push({ frame: this.frame, notification: errorNotification(error) }); - }, () => { - actual.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); - }); + subscription = observable.subscribe( + (x) => { + const value = + x instanceof Observable + ? this.materializeInnerObservable(x, this.frame) + : x; + actual.push({ + frame: this.frame, + notification: nextNotification(value) + }); + }, + (error) => { + actual.push({ + frame: this.frame, + notification: errorNotification(error) + }); + }, + () => { + actual.push({ + frame: this.frame, + notification: COMPLETE_NOTIFICATION + }); + } + ); }, subscriptionFrame); if (unsubscriptionFrame !== Infinity) { - this.schedule(() => subscription.unsubscribe(), unsubscriptionFrame); + this.schedule( + () => subscription.unsubscribe(), + unsubscriptionFrame + ); } this.flushTests.push(flushTest); const { runMode } = this; return { toBe(marbles, values, errorValue) { flushTest.ready = true; - flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); + flushTest.expected = TestScheduler.parseMarbles( + marbles, + values, + errorValue, + true, + runMode + ); }, toEqual: (other) => { flushTest.ready = true; flushTest.expected = []; this.schedule(() => { - subscription = other.subscribe((x) => { - const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; - flushTest.expected.push({ frame: this.frame, notification: nextNotification(value) }); - }, (error) => { - flushTest.expected.push({ frame: this.frame, notification: errorNotification(error) }); - }, () => { - flushTest.expected.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); - }); + subscription = other.subscribe( + (x) => { + const value = + x instanceof Observable + ? this.materializeInnerObservable( + x, + this.frame + ) + : x; + flushTest.expected.push({ + frame: this.frame, + notification: nextNotification(value) + }); + }, + (error) => { + flushTest.expected.push({ + frame: this.frame, + notification: errorNotification(error) + }); + }, + () => { + flushTest.expected.push({ + frame: this.frame, + notification: COMPLETE_NOTIFICATION + }); + } + ); }, subscriptionFrame); - }, + } }; } expectSubscriptions(actualSubscriptionLogs) { @@ -108,12 +200,20 @@ export class TestScheduler extends VirtualTimeScheduler { const { runMode } = this; return { toBe(marblesOrMarblesArray) { - const marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; + const marblesArray = + typeof marblesOrMarblesArray === 'string' + ? [marblesOrMarblesArray] + : marblesOrMarblesArray; flushTest.ready = true; flushTest.expected = marblesArray - .map((marbles) => TestScheduler.parseMarblesAsSubscriptions(marbles, runMode)) + .map((marbles) => + TestScheduler.parseMarblesAsSubscriptions( + marbles, + runMode + ) + ) .filter((marbles) => marbles.subscribedFrame !== Infinity); - }, + } }; } flush() { @@ -165,14 +265,20 @@ export class TestScheduler extends VirtualTimeScheduler { break; case '^': if (subscriptionFrame !== Infinity) { - throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); + throw new Error( + "found a second subscription point '^' in a " + + 'subscription marble diagram. There can only be one.' + ); } subscriptionFrame = groupStart > -1 ? groupStart : frame; advanceFrameBy(1); break; case '!': if (unsubscriptionFrame !== Infinity) { - throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); + throw new Error( + "found a second unsubscription point '!' in a " + + 'subscription marble diagram. There can only be one.' + ); } unsubscriptionFrame = groupStart > -1 ? groupStart : frame; break; @@ -180,7 +286,9 @@ export class TestScheduler extends VirtualTimeScheduler { if (runMode && c.match(/^[0-9]$/)) { if (i === 0 || characters[i - 1] === ' ') { const buffer = characters.slice(i).join(''); - const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + const match = buffer.match( + /^([0-9]+(?:\.[0-9]+)?)(ms|s|m) / + ); if (match) { i += match[0].length - 1; const duration = parseFloat(match[1]); @@ -199,39 +307,60 @@ export class TestScheduler extends VirtualTimeScheduler { default: break; } - advanceFrameBy(durationInMs / this.frameTimeFactor); + advanceFrameBy( + durationInMs / this.frameTimeFactor + ); break; } } } - throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); + throw new Error( + "there can only be '^' and '!' markers in a " + + "subscription marble diagram. Found instead '" + + c + + "'." + ); } frame = nextFrame; } if (unsubscriptionFrame < 0) { return new SubscriptionLog(subscriptionFrame); - } - else { + } else { return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); } } - static parseMarbles(marbles, values, errorValue, materializeInnerObservables = false, runMode = false) { + static parseMarbles( + marbles, + values, + errorValue, + materializeInnerObservables = false, + runMode = false + ) { if (marbles.indexOf('!') !== -1) { - throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); + throw new Error( + 'conventional marble diagrams cannot have the ' + + 'unsubscription marker "!"' + ); } const characters = [...marbles]; const len = characters.length; const testMessages = []; - const subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); + const subIndex = runMode + ? marbles.replace(/^[ ]+/, '').indexOf('^') + : marbles.indexOf('^'); let frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; - const getValue = typeof values !== 'object' - ? (x) => x - : (x) => { - if (materializeInnerObservables && values[x] instanceof ColdObservable) { - return values[x].messages; - } - return values[x]; - }; + const getValue = + typeof values !== 'object' + ? (x) => x + : (x) => { + if ( + materializeInnerObservables && + values[x] instanceof ColdObservable + ) { + return values[x].messages; + } + return values[x]; + }; let groupStart = -1; for (let i = 0; i < len; i++) { let nextFrame = frame; @@ -272,7 +401,9 @@ export class TestScheduler extends VirtualTimeScheduler { if (runMode && c.match(/^[0-9]$/)) { if (i === 0 || characters[i - 1] === ' ') { const buffer = characters.slice(i).join(''); - const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + const match = buffer.match( + /^([0-9]+(?:\.[0-9]+)?)(ms|s|m) / + ); if (match) { i += match[0].length - 1; const duration = parseFloat(match[1]); @@ -291,7 +422,9 @@ export class TestScheduler extends VirtualTimeScheduler { default: break; } - advanceFrameBy(durationInMs / this.frameTimeFactor); + advanceFrameBy( + durationInMs / this.frameTimeFactor + ); break; } } @@ -301,7 +434,10 @@ export class TestScheduler extends VirtualTimeScheduler { break; } if (notification) { - testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification }); + testMessages.push({ + frame: groupStart > -1 ? groupStart : frame, + notification + }); } frame = nextFrame; } @@ -327,17 +463,25 @@ export class TestScheduler extends VirtualTimeScheduler { throw new Error('animate() was not called within run()'); } map.delete(handle); - }, + } }; const animate = (marbles) => { if (map) { - throw new Error('animate() must not be called more than once within run()'); + throw new Error( + 'animate() must not be called more than once within run()' + ); } if (/[|#]/.test(marbles)) { throw new Error('animate() must not complete or error'); } map = new Map(); - const messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); + const messages = TestScheduler.parseMarbles( + marbles, + undefined, + undefined, + undefined, + true + ); for (const message of messages) { this.schedule(() => { const now = this.now(); @@ -357,15 +501,21 @@ export class TestScheduler extends VirtualTimeScheduler { const run = () => { const now = this.now(); const scheduledRecords = Array.from(scheduleLookup.values()); - const scheduledRecordsDue = scheduledRecords.filter(({ due }) => due <= now); - const dueImmediates = scheduledRecordsDue.filter(({ type }) => type === 'immediate'); + const scheduledRecordsDue = scheduledRecords.filter( + ({ due }) => due <= now + ); + const dueImmediates = scheduledRecordsDue.filter( + ({ type }) => type === 'immediate' + ); if (dueImmediates.length > 0) { const { handle, handler } = dueImmediates[0]; scheduleLookup.delete(handle); handler(); return; } - const dueIntervals = scheduledRecordsDue.filter(({ type }) => type === 'interval'); + const dueIntervals = scheduledRecordsDue.filter( + ({ type }) => type === 'interval' + ); if (dueIntervals.length > 0) { const firstDueInterval = dueIntervals[0]; const { duration, handler } = firstDueInterval; @@ -374,7 +524,9 @@ export class TestScheduler extends VirtualTimeScheduler { handler(); return; } - const dueTimeouts = scheduledRecordsDue.filter(({ type }) => type === 'timeout'); + const dueTimeouts = scheduledRecordsDue.filter( + ({ type }) => type === 'timeout' + ); if (dueTimeouts.length > 0) { const { handle, handler } = dueTimeouts[0]; scheduleLookup.delete(handle); @@ -392,7 +544,7 @@ export class TestScheduler extends VirtualTimeScheduler { handle, handler, subscription: this.schedule(run, 0), - type: 'immediate', + type: 'immediate' }); return handle; }, @@ -402,7 +554,7 @@ export class TestScheduler extends VirtualTimeScheduler { value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; const interval = { setInterval: (handler, duration = 0) => { @@ -413,7 +565,7 @@ export class TestScheduler extends VirtualTimeScheduler { handle, handler, subscription: this.schedule(run, duration), - type: 'interval', + type: 'interval' }); return handle; }, @@ -423,7 +575,7 @@ export class TestScheduler extends VirtualTimeScheduler { value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; const timeout = { setTimeout: (handler, duration = 0) => { @@ -434,7 +586,7 @@ export class TestScheduler extends VirtualTimeScheduler { handle, handler, subscription: this.schedule(run, duration), - type: 'timeout', + type: 'timeout' }); return handle; }, @@ -444,7 +596,7 @@ export class TestScheduler extends VirtualTimeScheduler { value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; return { immediate, interval, timeout }; } @@ -469,14 +621,13 @@ export class TestScheduler extends VirtualTimeScheduler { time: this.createTime.bind(this), expectObservable: this.expectObservable.bind(this), expectSubscriptions: this.expectSubscriptions.bind(this), - animate: animator.animate, + animate: animator.animate }; try { const ret = callback(helpers); this.flush(); return ret; - } - finally { + } finally { TestScheduler.frameTimeFactor = prevFrameTimeFactor; this.maxFrames = prevMaxFrames; this.runMode = false; @@ -490,4 +641,4 @@ export class TestScheduler extends VirtualTimeScheduler { } } TestScheduler.frameTimeFactor = 10; -//# sourceMappingURL=TestScheduler.js.map \ No newline at end of file +//# sourceMappingURL=TestScheduler.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/Subscriber.js b/node_modules/rxjs/dist/esm5/internal/Subscriber.js index 3311a50eb..1f4162bd2 100644 --- a/node_modules/rxjs/dist/esm5/internal/Subscriber.js +++ b/node_modules/rxjs/dist/esm5/internal/Subscriber.js @@ -1,10 +1,14 @@ -import { __extends, __read, __spreadArray } from "tslib"; +import { __extends, __read, __spreadArray } from 'tslib'; import { isFunction } from './util/isFunction'; import { isSubscription, Subscription } from './Subscription'; import { config } from './config'; import { reportUnhandledError } from './util/reportUnhandledError'; import { noop } from './util/noop'; -import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories'; +import { + nextNotification, + errorNotification, + COMPLETE_NOTIFICATION +} from './NotificationFactories'; import { timeoutProvider } from './scheduler/timeoutProvider'; import { captureError } from './util/errorContext'; var Subscriber = (function (_super) { @@ -17,8 +21,7 @@ var Subscriber = (function (_super) { if (isSubscription(destination)) { destination.add(_this); } - } - else { + } else { _this.destination = EMPTY_OBSERVER; } return _this; @@ -29,16 +32,14 @@ var Subscriber = (function (_super) { Subscriber.prototype.next = function (value) { if (this.isStopped) { handleStoppedNotification(nextNotification(value), this); - } - else { + } else { this._next(value); } }; Subscriber.prototype.error = function (err) { if (this.isStopped) { handleStoppedNotification(errorNotification(err), this); - } - else { + } else { this.isStopped = true; this._error(err); } @@ -46,8 +47,7 @@ var Subscriber = (function (_super) { Subscriber.prototype.complete = function () { if (this.isStopped) { handleStoppedNotification(COMPLETE_NOTIFICATION, this); - } - else { + } else { this.isStopped = true; this._complete(); } @@ -65,21 +65,19 @@ var Subscriber = (function (_super) { Subscriber.prototype._error = function (err) { try { this.destination.error(err); - } - finally { + } finally { this.unsubscribe(); } }; Subscriber.prototype._complete = function () { try { this.destination.complete(); - } - finally { + } finally { this.unsubscribe(); } }; return Subscriber; -}(Subscription)); +})(Subscription); export { Subscriber }; var SafeSubscriber = (function (_super) { __extends(SafeSubscriber, _super); @@ -88,30 +86,46 @@ var SafeSubscriber = (function (_super) { var next; if (isFunction(observerOrNext)) { next = observerOrNext; - } - else if (observerOrNext) { - (next = observerOrNext.next, error = observerOrNext.error, complete = observerOrNext.complete); + } else if (observerOrNext) { + (next = observerOrNext.next), + (error = observerOrNext.error), + (complete = observerOrNext.complete); var context_1; if (_this && config.useDeprecatedNextContext) { context_1 = Object.create(observerOrNext); - context_1.unsubscribe = function () { return _this.unsubscribe(); }; - } - else { + context_1.unsubscribe = function () { + return _this.unsubscribe(); + }; + } else { context_1 = observerOrNext; } - next = next === null || next === void 0 ? void 0 : next.bind(context_1); - error = error === null || error === void 0 ? void 0 : error.bind(context_1); - complete = complete === null || complete === void 0 ? void 0 : complete.bind(context_1); + next = + next === null || next === void 0 + ? void 0 + : next.bind(context_1); + error = + error === null || error === void 0 + ? void 0 + : error.bind(context_1); + complete = + complete === null || complete === void 0 + ? void 0 + : complete.bind(context_1); } _this.destination = { next: next ? wrapForErrorHandling(next, _this) : noop, - error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler, _this), - complete: complete ? wrapForErrorHandling(complete, _this) : noop, + error: wrapForErrorHandling( + error !== null && error !== void 0 + ? error + : defaultErrorHandler, + _this + ), + complete: complete ? wrapForErrorHandling(complete, _this) : noop }; return _this; } return SafeSubscriber; -}(Subscriber)); +})(Subscriber); export { SafeSubscriber }; function wrapForErrorHandling(handler, instance) { return function () { @@ -121,12 +135,10 @@ function wrapForErrorHandling(handler, instance) { } try { handler.apply(void 0, __spreadArray([], __read(args))); - } - catch (err) { + } catch (err) { if (config.useDeprecatedSynchronousErrorHandling) { captureError(err); - } - else { + } else { reportUnhandledError(err); } } @@ -137,12 +149,15 @@ function defaultErrorHandler(err) { } function handleStoppedNotification(notification, subscriber) { var onStoppedNotification = config.onStoppedNotification; - onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); }); + onStoppedNotification && + timeoutProvider.setTimeout(function () { + return onStoppedNotification(notification, subscriber); + }); } export var EMPTY_OBSERVER = { closed: true, next: noop, error: defaultErrorHandler, - complete: noop, + complete: noop }; -//# sourceMappingURL=Subscriber.js.map \ No newline at end of file +//# sourceMappingURL=Subscriber.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js b/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js index 9bbb9109f..eff83ded3 100644 --- a/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js +++ b/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js @@ -1,4 +1,4 @@ -import { __extends } from "tslib"; +import { __extends } from 'tslib'; import { Observable } from '../Observable'; import { Subscription } from '../Subscription'; import { refCount as higherOrderRefCount } from '../operators/refCount'; @@ -32,7 +32,9 @@ var ConnectableObservable = (function (_super) { this._refCount = 0; var _connection = this._connection; this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + _connection === null || _connection === void 0 + ? void 0 + : _connection.unsubscribe(); }; ConnectableObservable.prototype.connect = function () { var _this = this; @@ -40,13 +42,25 @@ var ConnectableObservable = (function (_super) { if (!connection) { connection = this._connection = new Subscription(); var subject_1 = this.getSubject(); - connection.add(this.source.subscribe(new OperatorSubscriber(subject_1, undefined, function () { - _this._teardown(); - subject_1.complete(); - }, function (err) { - _this._teardown(); - subject_1.error(err); - }, function () { return _this._teardown(); }))); + connection.add( + this.source.subscribe( + new OperatorSubscriber( + subject_1, + undefined, + function () { + _this._teardown(); + subject_1.complete(); + }, + function (err) { + _this._teardown(); + subject_1.error(err); + }, + function () { + return _this._teardown(); + } + ) + ) + ); if (connection.closed) { this._connection = null; connection = Subscription.EMPTY; @@ -58,6 +72,6 @@ var ConnectableObservable = (function (_super) { return higherOrderRefCount()(this); }; return ConnectableObservable; -}(Observable)); +})(Observable); export { ConnectableObservable }; -//# sourceMappingURL=ConnectableObservable.js.map \ No newline at end of file +//# sourceMappingURL=ConnectableObservable.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js b/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js index 4773af032..fd3f0abcf 100644 --- a/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js +++ b/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js @@ -14,57 +14,84 @@ export function combineLatest() { } var scheduler = popScheduler(args); var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; + var _a = argsArgArrayOrObject(args), + observables = _a.args, + keys = _a.keys; if (observables.length === 0) { return from([], scheduler); } - var result = new Observable(combineLatestInit(observables, scheduler, keys - ? - function (values) { return createObject(keys, values); } - : - identity)); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; + var result = new Observable( + combineLatestInit( + observables, + scheduler, + keys + ? function (values) { + return createObject(keys, values); + } + : identity + ) + ); + return resultSelector + ? result.pipe(mapOneOrManyArgs(resultSelector)) + : result; } export function combineLatestInit(observables, scheduler, valueTransform) { - if (valueTransform === void 0) { valueTransform = identity; } + if (valueTransform === void 0) { + valueTransform = identity; + } return function (subscriber) { - maybeSchedule(scheduler, function () { - var length = observables.length; - var values = new Array(length); - var active = length; - var remainingFirstValues = length; - var _loop_1 = function (i) { - maybeSchedule(scheduler, function () { - var source = from(observables[i], scheduler); - var hasFirstValue = false; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - values[i] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, function () { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - }; - for (var i = 0; i < length; i++) { - _loop_1(i); - } - }, subscriber); + maybeSchedule( + scheduler, + function () { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function (i) { + maybeSchedule( + scheduler, + function () { + var source = from(observables[i], scheduler); + var hasFirstValue = false; + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + values[i] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next( + valueTransform(values.slice()) + ); + } + }, + function () { + if (!--active) { + subscriber.complete(); + } + } + ) + ); + }, + subscriber + ); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, + subscriber + ); }; } function maybeSchedule(scheduler, execute, subscription) { if (scheduler) { executeSchedule(subscription, scheduler, execute); - } - else { + } else { execute(); } } -//# sourceMappingURL=combineLatest.js.map \ No newline at end of file +//# sourceMappingURL=combineLatest.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js index 333cc32f5..fea8aa044 100644 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js @@ -1,4 +1,4 @@ -import { __assign, __extends } from "tslib"; +import { __assign, __extends } from 'tslib'; import { Subject, AnonymousSubject } from '../../Subject'; import { Subscriber } from '../../Subscriber'; import { Observable } from '../../Observable'; @@ -6,10 +6,15 @@ import { Subscription } from '../../Subscription'; import { ReplaySubject } from '../../ReplaySubject'; var DEFAULT_WEBSOCKET_CONFIG = { url: '', - deserializer: function (e) { return JSON.parse(e.data); }, - serializer: function (value) { return JSON.stringify(value); }, + deserializer: function (e) { + return JSON.parse(e.data); + }, + serializer: function (value) { + return JSON.stringify(value); + } }; -var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; +var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = + 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; var WebSocketSubject = (function (_super) { __extends(WebSocketSubject, _super); function WebSocketSubject(urlConfigOrSource, destination) { @@ -18,14 +23,15 @@ var WebSocketSubject = (function (_super) { if (urlConfigOrSource instanceof Observable) { _this.destination = destination; _this.source = urlConfigOrSource; - } - else { - var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG)); + } else { + var config = (_this._config = __assign( + {}, + DEFAULT_WEBSOCKET_CONFIG + )); _this._output = new Subject(); if (typeof urlConfigOrSource === 'string') { config.url = urlConfigOrSource; - } - else { + } else { for (var key in urlConfigOrSource) { if (urlConfigOrSource.hasOwnProperty(key)) { config[key] = urlConfigOrSource[key]; @@ -34,8 +40,7 @@ var WebSocketSubject = (function (_super) { } if (!config.WebSocketCtor && WebSocket) { config.WebSocketCtor = WebSocket; - } - else if (!config.WebSocketCtor) { + } else if (!config.WebSocketCtor) { throw new Error('no WebSocket constructor can be found'); } _this.destination = new ReplaySubject(); @@ -55,30 +60,39 @@ var WebSocketSubject = (function (_super) { } this._output = new Subject(); }; - WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) { + WebSocketSubject.prototype.multiplex = function ( + subMsg, + unsubMsg, + messageFilter + ) { var self = this; return new Observable(function (observer) { try { self.next(subMsg()); - } - catch (err) { + } catch (err) { observer.error(err); } - var subscription = self.subscribe(function (x) { - try { - if (messageFilter(x)) { - observer.next(x); + var subscription = self.subscribe( + function (x) { + try { + if (messageFilter(x)) { + observer.next(x); + } + } catch (err) { + observer.error(err); } + }, + function (err) { + return observer.error(err); + }, + function () { + return observer.complete(); } - catch (err) { - observer.error(err); - } - }, function (err) { return observer.error(err); }, function () { return observer.complete(); }); + ); return function () { try { self.next(unsubMsg()); - } - catch (err) { + } catch (err) { observer.error(err); } subscription.unsubscribe(); @@ -87,17 +101,22 @@ var WebSocketSubject = (function (_super) { }; WebSocketSubject.prototype._connectSocket = function () { var _this = this; - var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType; + var _a = this._config, + WebSocketCtor = _a.WebSocketCtor, + protocol = _a.protocol, + url = _a.url, + binaryType = _a.binaryType; var observer = this._output; var socket = null; try { - socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); + socket = protocol + ? new WebSocketCtor(url, protocol) + : new WebSocketCtor(url); this._socket = socket; if (binaryType) { this._socket.binaryType = binaryType; } - } - catch (e) { + } catch (e) { observer.error(e); return; } @@ -119,36 +138,40 @@ var WebSocketSubject = (function (_super) { openObserver.next(evt); } var queue = _this.destination; - _this.destination = Subscriber.create(function (x) { - if (socket.readyState === 1) { - try { - var serializer = _this._config.serializer; - socket.send(serializer(x)); + _this.destination = Subscriber.create( + function (x) { + if (socket.readyState === 1) { + try { + var serializer = _this._config.serializer; + socket.send(serializer(x)); + } catch (e) { + _this.destination.error(e); + } } - catch (e) { - _this.destination.error(e); + }, + function (err) { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); } + if (err && err.code) { + socket.close(err.code, err.reason); + } else { + observer.error( + new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT) + ); + } + _this._resetState(); + }, + function () { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); + } + socket.close(); + _this._resetState(); } - }, function (err) { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - if (err && err.code) { - socket.close(err.code, err.reason); - } - else { - observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); - } - _this._resetState(); - }, function () { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - socket.close(); - _this._resetState(); - }); + ); if (queue && queue instanceof ReplaySubject) { subscription.add(queue.subscribe(_this.destination)); } @@ -167,8 +190,7 @@ var WebSocketSubject = (function (_super) { } if (e.wasClean) { observer.complete(); - } - else { + } else { observer.error(e); } }; @@ -176,8 +198,7 @@ var WebSocketSubject = (function (_super) { try { var deserializer = _this._config.deserializer; observer.next(deserializer(e)); - } - catch (err) { + } catch (err) { observer.error(err); } }; @@ -195,7 +216,10 @@ var WebSocketSubject = (function (_super) { subscriber.add(function () { var _socket = _this._socket; if (_this._output.observers.length === 0) { - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + if ( + _socket && + (_socket.readyState === 1 || _socket.readyState === 0) + ) { _socket.close(); } _this._resetState(); @@ -212,6 +236,6 @@ var WebSocketSubject = (function (_super) { _super.prototype.unsubscribe.call(this); }; return WebSocketSubject; -}(AnonymousSubject)); +})(AnonymousSubject); export { WebSocketSubject }; -//# sourceMappingURL=WebSocketSubject.js.map \ No newline at end of file +//# sourceMappingURL=WebSocketSubject.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js index 99f2c65ed..258750a1e 100644 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js @@ -1,10 +1,13 @@ -import { __assign, __rest } from "tslib"; +import { __assign, __rest } from 'tslib'; import { OperatorSubscriber } from '../../operators/OperatorSubscriber'; import { Observable } from '../../Observable'; import { innerFrom } from '../../observable/innerFrom'; export function fromFetch(input, initWithSelector) { - if (initWithSelector === void 0) { initWithSelector = {}; } - var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]); + if (initWithSelector === void 0) { + initWithSelector = {}; + } + var selector = initWithSelector.selector, + init = __rest(initWithSelector, ['selector']); return new Observable(function (subscriber) { var controller = new AbortController(); var signal = controller.signal; @@ -13,36 +16,48 @@ export function fromFetch(input, initWithSelector) { if (outerSignal) { if (outerSignal.aborted) { controller.abort(); - } - else { + } else { var outerSignalHandler_1 = function () { if (!signal.aborted) { controller.abort(); } }; outerSignal.addEventListener('abort', outerSignalHandler_1); - subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); }); + subscriber.add(function () { + return outerSignal.removeEventListener( + 'abort', + outerSignalHandler_1 + ); + }); } } - var perSubscriberInit = __assign(__assign({}, init), { signal: signal }); + var perSubscriberInit = __assign(__assign({}, init), { + signal: signal + }); var handleError = function (err) { abortable = false; subscriber.error(err); }; fetch(input, perSubscriberInit) .then(function (response) { - if (selector) { - innerFrom(selector(response)).subscribe(new OperatorSubscriber(subscriber, undefined, function () { + if (selector) { + innerFrom(selector(response)).subscribe( + new OperatorSubscriber( + subscriber, + undefined, + function () { + abortable = false; + subscriber.complete(); + }, + handleError + ) + ); + } else { abortable = false; + subscriber.next(response); subscriber.complete(); - }, handleError)); - } - else { - abortable = false; - subscriber.next(response); - subscriber.complete(); - } - }) + } + }) .catch(handleError); return function () { if (abortable) { @@ -51,4 +66,4 @@ export function fromFetch(input, initWithSelector) { }; }); } -//# sourceMappingURL=fetch.js.map \ No newline at end of file +//# sourceMappingURL=fetch.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js b/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js index d2eb6f00f..e2d6a8d82 100644 --- a/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js +++ b/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js @@ -11,7 +11,9 @@ export function forkJoin() { args[_i] = arguments[_i]; } var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; + var _a = argsArgArrayOrObject(args), + sources = _a.args, + keys = _a.keys; var result = new Observable(function (subscriber) { var length = sources.length; if (!length) { @@ -23,25 +25,39 @@ export function forkJoin() { var remainingEmissions = length; var _loop_1 = function (sourceIndex) { var hasValue = false; - innerFrom(sources[sourceIndex]).subscribe(new OperatorSubscriber(subscriber, function (value) { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, function () { return remainingCompletions--; }, undefined, function () { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject(keys, values) : values); + innerFrom(sources[sourceIndex]).subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, + function () { + return remainingCompletions--; + }, + undefined, + function () { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next( + keys ? createObject(keys, values) : values + ); + } + subscriber.complete(); + } } - subscriber.complete(); - } - })); + ) + ); }; for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { _loop_1(sourceIndex); } }); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; + return resultSelector + ? result.pipe(mapOneOrManyArgs(resultSelector)) + : result; } -//# sourceMappingURL=forkJoin.js.map \ No newline at end of file +//# sourceMappingURL=forkJoin.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/observable/race.js b/node_modules/rxjs/dist/esm5/internal/observable/race.js index f1c9a3e9c..d30c07b75 100644 --- a/node_modules/rxjs/dist/esm5/internal/observable/race.js +++ b/node_modules/rxjs/dist/esm5/internal/observable/race.js @@ -8,25 +8,35 @@ export function race() { sources[_i] = arguments[_i]; } sources = argsOrArgArray(sources); - return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); + return sources.length === 1 + ? innerFrom(sources[0]) + : new Observable(raceInit(sources)); } export function raceInit(sources) { return function (subscriber) { var subscriptions = []; var _loop_1 = function (i) { - subscriptions.push(innerFrom(sources[i]).subscribe(new OperatorSubscriber(subscriber, function (value) { - if (subscriptions) { - for (var s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); + subscriptions.push( + innerFrom(sources[i]).subscribe( + new OperatorSubscriber(subscriber, function (value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }) + ) + ); }; - for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + for ( + var i = 0; + subscriptions && !subscriber.closed && i < sources.length; + i++ + ) { _loop_1(i); } }; } -//# sourceMappingURL=race.js.map \ No newline at end of file +//# sourceMappingURL=race.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/observable/zip.js b/node_modules/rxjs/dist/esm5/internal/observable/zip.js index db4a86e95..aa8cdd05e 100644 --- a/node_modules/rxjs/dist/esm5/internal/observable/zip.js +++ b/node_modules/rxjs/dist/esm5/internal/observable/zip.js @@ -1,4 +1,4 @@ -import { __read, __spreadArray } from "tslib"; +import { __read, __spreadArray } from 'tslib'; import { Observable } from '../Observable'; import { innerFrom } from './innerFrom'; import { argsOrArgArray } from '../util/argsOrArgArray'; @@ -14,33 +14,68 @@ export function zip() { var sources = argsOrArgArray(args); return sources.length ? new Observable(function (subscriber) { - var buffers = sources.map(function () { return []; }); - var completed = sources.map(function () { return false; }); - subscriber.add(function () { - buffers = completed = null; - }); - var _loop_1 = function (sourceIndex) { - innerFrom(sources[sourceIndex]).subscribe(new OperatorSubscriber(subscriber, function (value) { - buffers[sourceIndex].push(value); - if (buffers.every(function (buffer) { return buffer.length; })) { - var result = buffers.map(function (buffer) { return buffer.shift(); }); - subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); - if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { - subscriber.complete(); - } - } - }, function () { - completed[sourceIndex] = true; - !buffers[sourceIndex].length && subscriber.complete(); - })); - }; - for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - _loop_1(sourceIndex); - } - return function () { - buffers = completed = null; - }; - }) + var buffers = sources.map(function () { + return []; + }); + var completed = sources.map(function () { + return false; + }); + subscriber.add(function () { + buffers = completed = null; + }); + var _loop_1 = function (sourceIndex) { + innerFrom(sources[sourceIndex]).subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + buffers[sourceIndex].push(value); + if ( + buffers.every(function (buffer) { + return buffer.length; + }) + ) { + var result = buffers.map(function (buffer) { + return buffer.shift(); + }); + subscriber.next( + resultSelector + ? resultSelector.apply( + void 0, + __spreadArray( + [], + __read(result) + ) + ) + : result + ); + if ( + buffers.some(function (buffer, i) { + return !buffer.length && completed[i]; + }) + ) { + subscriber.complete(); + } + } + }, + function () { + completed[sourceIndex] = true; + !buffers[sourceIndex].length && + subscriber.complete(); + } + ) + ); + }; + for ( + var sourceIndex = 0; + !subscriber.closed && sourceIndex < sources.length; + sourceIndex++ + ) { + _loop_1(sourceIndex); + } + return function () { + buffers = completed = null; + }; + }) : EMPTY; } -//# sourceMappingURL=zip.js.map \ No newline at end of file +//# sourceMappingURL=zip.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js b/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js index e76df33df..757019d30 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js @@ -1,45 +1,46 @@ -import { __extends } from "tslib"; +import { __extends } from 'tslib'; import { Subscriber } from '../Subscriber'; var OperatorSubscriber = (function (_super) { __extends(OperatorSubscriber, _super); - function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + function OperatorSubscriber( + destination, + onNext, + onComplete, + onError, + onFinalize + ) { var _this = _super.call(this, destination) || this; _this.onFinalize = onFinalize; _this._next = onNext ? function (value) { - try { - onNext(value); - } - catch (err) { - destination.error(err); - } - } + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } : _super.prototype._next; _this._error = onError ? function (err) { - try { - onError(err); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } + try { + onError(err); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._error; _this._complete = onComplete ? function () { - try { - onComplete(); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } + try { + onComplete(); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._complete; return _this; } @@ -47,9 +48,12 @@ var OperatorSubscriber = (function (_super) { var _a; var closed = this.closed; _super.prototype.unsubscribe.call(this); - !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + !closed && + ((_a = this.onFinalize) === null || _a === void 0 + ? void 0 + : _a.call(this)); }; return OperatorSubscriber; -}(Subscriber)); +})(Subscriber); export { OperatorSubscriber }; -//# sourceMappingURL=OperatorSubscriber.js.map \ No newline at end of file +//# sourceMappingURL=OperatorSubscriber.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/audit.js b/node_modules/rxjs/dist/esm5/internal/operators/audit.js index 5270e4d52..09f9f8da6 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/audit.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/audit.js @@ -8,7 +8,9 @@ export function audit(durationSelector) { var durationSubscriber = null; var isComplete = false; var endDuration = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); durationSubscriber = null; if (hasValue) { hasValue = false; @@ -22,16 +24,31 @@ export function audit(durationSelector) { durationSubscriber = null; isComplete && subscriber.complete(); }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom(durationSelector(value)).subscribe((durationSubscriber = new OperatorSubscriber(subscriber, endDuration, cleanupDuration))); - } - }, function () { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom(durationSelector(value)).subscribe( + (durationSubscriber = new OperatorSubscriber( + subscriber, + endDuration, + cleanupDuration + )) + ); + } + }, + function () { + isComplete = true; + (!hasValue || + !durationSubscriber || + durationSubscriber.closed) && + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=audit.js.map \ No newline at end of file +//# sourceMappingURL=audit.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/buffer.js b/node_modules/rxjs/dist/esm5/internal/operators/buffer.js index 184ccadb1..930e6cb05 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/buffer.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/buffer.js @@ -4,18 +4,32 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function buffer(closingNotifier) { return operate(function (source, subscriber) { var currentBuffer = []; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - closingNotifier.subscribe(new OperatorSubscriber(subscriber, function () { - var b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, noop)); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + return currentBuffer.push(value); + }, + function () { + subscriber.next(currentBuffer); + subscriber.complete(); + } + ) + ); + closingNotifier.subscribe( + new OperatorSubscriber( + subscriber, + function () { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, + noop + ) + ); return function () { currentBuffer = null; }; }); } -//# sourceMappingURL=buffer.js.map \ No newline at end of file +//# sourceMappingURL=buffer.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js index cd1115d74..71be7ffd0 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js @@ -1,71 +1,120 @@ -import { __values } from "tslib"; +import { __values } from 'tslib'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; import { arrRemove } from '../util/arrRemove'; export function bufferCount(bufferSize, startBufferEvery) { - if (startBufferEvery === void 0) { startBufferEvery = null; } - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + if (startBufferEvery === void 0) { + startBufferEvery = null; + } + startBufferEvery = + startBufferEvery !== null && startBufferEvery !== void 0 + ? startBufferEvery + : bufferSize; return operate(function (source, subscriber) { var buffers = []; var count = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var e_1, _a, e_2, _b; - var toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a, e_2, _b; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - if (toEmit) { - try { - for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { - var buffer = toEmit_1_1.value; - arrRemove(buffers, buffer); - subscriber.next(buffer); + try { + for ( + var buffers_1 = __values(buffers), + buffers_1_1 = buffers_1.next(); + !buffers_1_1.done; + buffers_1_1 = buffers_1.next() + ) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = + toEmit !== null && toEmit !== void 0 + ? toEmit + : []; + toEmit.push(buffer); + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + buffers_1_1 && + !buffers_1_1.done && + (_a = buffers_1.return) + ) + _a.call(buffers_1); + } finally { + if (e_1) throw e_1.error; + } } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { + if (toEmit) { + try { + for ( + var toEmit_1 = __values(toEmit), + toEmit_1_1 = toEmit_1.next(); + !toEmit_1_1.done; + toEmit_1_1 = toEmit_1.next() + ) { + var buffer = toEmit_1_1.value; + arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if ( + toEmit_1_1 && + !toEmit_1_1.done && + (_b = toEmit_1.return) + ) + _b.call(toEmit_1); + } finally { + if (e_2) throw e_2.error; + } + } + } + }, + function () { + var e_3, _a; try { - if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); + for ( + var buffers_2 = __values(buffers), + buffers_2_1 = buffers_2.next(); + !buffers_2_1.done; + buffers_2_1 = buffers_2.next() + ) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } catch (e_3_1) { + e_3 = { error: e_3_1 }; + } finally { + try { + if ( + buffers_2_1 && + !buffers_2_1.done && + (_a = buffers_2.return) + ) + _a.call(buffers_2); + } finally { + if (e_3) throw e_3.error; + } } - finally { if (e_2) throw e_2.error; } - } - } - }, function () { - var e_3, _a; - try { - for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { - var buffer = buffers_2_1.value; - subscriber.next(buffer); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); + subscriber.complete(); + }, + undefined, + function () { + buffers = null; } - finally { if (e_3) throw e_3.error; } - } - subscriber.complete(); - }, undefined, function () { - buffers = null; - })); + ) + ); }); } -//# sourceMappingURL=bufferCount.js.map \ No newline at end of file +//# sourceMappingURL=bufferCount.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js index 52000552c..77b625aa7 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js @@ -1,4 +1,4 @@ -import { __values } from "tslib"; +import { __values } from 'tslib'; import { Subscription } from '../Subscription'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; @@ -12,14 +12,19 @@ export function bufferTime(bufferTimeSpan) { for (var _i = 1; _i < arguments.length; _i++) { otherArgs[_i - 1] = arguments[_i]; } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var scheduler = + (_a = popScheduler(otherArgs)) !== null && _a !== void 0 + ? _a + : asyncScheduler; + var bufferCreationInterval = + (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; var maxBufferSize = otherArgs[1] || Infinity; return operate(function (source, subscriber) { var bufferRecords = []; var restartOnEmit = false; var emit = function (record) { - var buffer = record.buffer, subs = record.subs; + var buffer = record.buffer, + subs = record.subs; subs.unsubscribe(); arrRemove(bufferRecords, record); subscriber.next(buffer); @@ -32,46 +37,83 @@ export function bufferTime(bufferTimeSpan) { var buffer = []; var record_1 = { buffer: buffer, - subs: subs, + subs: subs }; bufferRecords.push(record_1); - executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); + executeSchedule( + subs, + scheduler, + function () { + return emit(record_1); + }, + bufferTimeSpan + ); } }; if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } - else { + executeSchedule( + subscriber, + scheduler, + startBuffer, + bufferCreationInterval, + true + ); + } else { restartOnEmit = true; } startBuffer(); - var bufferTimeSubscriber = new OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var recordsCopy = bufferRecords.slice(); - try { - for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { - var record = recordsCopy_1_1.value; - var buffer = record.buffer; - buffer.push(value); - maxBufferSize <= buffer.length && emit(record); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + var bufferTimeSubscriber = new OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + var recordsCopy = bufferRecords.slice(); try { - if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); + for ( + var recordsCopy_1 = __values(recordsCopy), + recordsCopy_1_1 = recordsCopy_1.next(); + !recordsCopy_1_1.done; + recordsCopy_1_1 = recordsCopy_1.next() + ) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + recordsCopy_1_1 && + !recordsCopy_1_1.done && + (_a = recordsCopy_1.return) + ) + _a.call(recordsCopy_1); + } finally { + if (e_1) throw e_1.error; + } } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); + }, + function () { + while ( + bufferRecords === null || bufferRecords === void 0 + ? void 0 + : bufferRecords.length + ) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 + ? void 0 + : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, + undefined, + function () { + return (bufferRecords = null); } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, undefined, function () { return (bufferRecords = null); }); + ); source.subscribe(bufferTimeSubscriber); }); } -//# sourceMappingURL=bufferTime.js.map \ No newline at end of file +//# sourceMappingURL=bufferTime.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js index dfebb41cb..25856f6f2 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js @@ -1,4 +1,4 @@ -import { __values } from "tslib"; +import { __values } from 'tslib'; import { Subscription } from '../Subscription'; import { operate } from '../util/lift'; import { innerFrom } from '../observable/innerFrom'; @@ -8,38 +8,65 @@ import { arrRemove } from '../util/arrRemove'; export function bufferToggle(openings, closingSelector) { return operate(function (source, subscriber) { var buffers = []; - innerFrom(openings).subscribe(new OperatorSubscriber(subscriber, function (openValue) { - var buffer = []; - buffers.push(buffer); - var closingSubscription = new Subscription(); - var emitBuffer = function () { - arrRemove(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(new OperatorSubscriber(subscriber, emitBuffer, noop))); - }, noop)); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); + innerFrom(openings).subscribe( + new OperatorSubscriber( + subscriber, + function (openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription(); + var emitBuffer = function () { + arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add( + innerFrom(closingSelector(openValue)).subscribe( + new OperatorSubscriber(subscriber, emitBuffer, noop) + ) + ); + }, + noop + ) + ); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + try { + for ( + var buffers_1 = __values(buffers), + buffers_1_1 = buffers_1.next(); + !buffers_1_1.done; + buffers_1_1 = buffers_1.next() + ) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + buffers_1_1 && + !buffers_1_1.done && + (_a = buffers_1.return) + ) + _a.call(buffers_1); + } finally { + if (e_1) throw e_1.error; + } + } + }, + function () { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); + ) + ); }); } -//# sourceMappingURL=bufferToggle.js.map \ No newline at end of file +//# sourceMappingURL=bufferToggle.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js index f4d7cae27..95d2d8fc0 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js @@ -7,17 +7,39 @@ export function bufferWhen(closingSelector) { var buffer = null; var closingSubscriber = null; var openBuffer = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); var b = buffer; buffer = []; b && subscriber.next(b); - innerFrom(closingSelector()).subscribe((closingSubscriber = new OperatorSubscriber(subscriber, openBuffer, noop))); + innerFrom(closingSelector()).subscribe( + (closingSubscriber = new OperatorSubscriber( + subscriber, + openBuffer, + noop + )) + ); }; openBuffer(); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, undefined, function () { return (buffer = closingSubscriber = null); })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + return buffer === null || buffer === void 0 + ? void 0 + : buffer.push(value); + }, + function () { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, + undefined, + function () { + return (buffer = closingSubscriber = null); + } + ) + ); }); } -//# sourceMappingURL=bufferWhen.js.map \ No newline at end of file +//# sourceMappingURL=bufferWhen.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/catchError.js b/node_modules/rxjs/dist/esm5/internal/operators/catchError.js index 92b886346..e8df0b546 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/catchError.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/catchError.js @@ -6,17 +6,22 @@ export function catchError(selector) { var innerSub = null; var syncUnsub = false; var handledResult; - innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, undefined, function (err) { - handledResult = innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - else { - syncUnsub = true; - } - })); + innerSub = source.subscribe( + new OperatorSubscriber(subscriber, undefined, undefined, function ( + err + ) { + handledResult = innerFrom( + selector(err, catchError(selector)(source)) + ); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } else { + syncUnsub = true; + } + }) + ); if (syncUnsub) { innerSub.unsubscribe(); innerSub = null; @@ -24,4 +29,4 @@ export function catchError(selector) { } }); } -//# sourceMappingURL=catchError.js.map \ No newline at end of file +//# sourceMappingURL=catchError.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounce.js b/node_modules/rxjs/dist/esm5/internal/operators/debounce.js index 4d5320a77..cfda28482 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/debounce.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/debounce.js @@ -8,7 +8,9 @@ export function debounce(durationSelector) { var lastValue = null; var durationSubscriber = null; var emit = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); durationSubscriber = null; if (hasValue) { hasValue = false; @@ -17,18 +19,34 @@ export function debounce(durationSelector) { subscriber.next(value); } }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = new OperatorSubscriber(subscriber, emit, noop); - innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = durationSubscriber = null; - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + durationSubscriber === null || durationSubscriber === void 0 + ? void 0 + : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = new OperatorSubscriber( + subscriber, + emit, + noop + ); + innerFrom(durationSelector(value)).subscribe( + durationSubscriber + ); + }, + function () { + emit(); + subscriber.complete(); + }, + undefined, + function () { + lastValue = durationSubscriber = null; + } + ) + ); }); } -//# sourceMappingURL=debounce.js.map \ No newline at end of file +//# sourceMappingURL=debounce.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js b/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js index 56332e826..6d496c041 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js @@ -2,7 +2,9 @@ import { asyncScheduler } from '../scheduler/async'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function debounceTime(dueTime, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } + if (scheduler === void 0) { + scheduler = asyncScheduler; + } return operate(function (source, subscriber) { var activeTask = null; var lastValue = null; @@ -26,19 +28,27 @@ export function debounceTime(dueTime, scheduler) { } emit(); } - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = activeTask = null; - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, + function () { + emit(); + subscriber.complete(); + }, + undefined, + function () { + lastValue = activeTask = null; + } + ) + ); }); } -//# sourceMappingURL=debounceTime.js.map \ No newline at end of file +//# sourceMappingURL=debounceTime.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js b/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js index 5475644ca..4cd50c0ed 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js @@ -3,15 +3,21 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function defaultIfEmpty(defaultValue) { return operate(function (source, subscriber) { var hasValue = false; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + subscriber.next(value); + }, + function () { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=defaultIfEmpty.js.map \ No newline at end of file +//# sourceMappingURL=defaultIfEmpty.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js b/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js index c42e0fc11..067663688 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js @@ -3,7 +3,11 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function dematerialize() { return operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber(subscriber, function (notification) { return observeNotification(notification, subscriber); })); + source.subscribe( + new OperatorSubscriber(subscriber, function (notification) { + return observeNotification(notification, subscriber); + }) + ); }); } -//# sourceMappingURL=dematerialize.js.map \ No newline at end of file +//# sourceMappingURL=dematerialize.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinct.js b/node_modules/rxjs/dist/esm5/internal/operators/distinct.js index 446fab716..59537310a 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/distinct.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/distinct.js @@ -4,14 +4,26 @@ import { noop } from '../util/noop'; export function distinct(keySelector, flushes) { return operate(function (source, subscriber) { var distinctKeys = new Set(); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes === null || flushes === void 0 ? void 0 : flushes.subscribe(new OperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop)); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + }) + ); + flushes === null || flushes === void 0 + ? void 0 + : flushes.subscribe( + new OperatorSubscriber( + subscriber, + function () { + return distinctKeys.clear(); + }, + noop + ) + ); }); } -//# sourceMappingURL=distinct.js.map \ No newline at end of file +//# sourceMappingURL=distinct.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js index 7e9bd33b3..2069ee76e 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js @@ -2,22 +2,29 @@ import { identity } from '../util/identity'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function distinctUntilChanged(comparator, keySelector) { - if (keySelector === void 0) { keySelector = identity; } - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + if (keySelector === void 0) { + keySelector = identity; + } + comparator = + comparator !== null && comparator !== void 0 + ? comparator + : defaultCompare; return operate(function (source, subscriber) { var previousKey; var first = true; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var currentKey = keySelector(value); - if (first || !comparator(previousKey, currentKey)) { - first = false; - previousKey = currentKey; - subscriber.next(value); - } - })); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + }) + ); }); } function defaultCompare(a, b) { return a === b; } -//# sourceMappingURL=distinctUntilChanged.js.map \ No newline at end of file +//# sourceMappingURL=distinctUntilChanged.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/every.js b/node_modules/rxjs/dist/esm5/internal/operators/every.js index 15c26fa33..c30052283 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/every.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/every.js @@ -3,15 +3,21 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function every(predicate, thisArg) { return operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, function () { - subscriber.next(true); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, + function () { + subscriber.next(true); + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=every.js.map \ No newline at end of file +//# sourceMappingURL=every.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js b/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js index 00b26b5ab..117158075 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js @@ -5,17 +5,29 @@ export function exhaustAll() { return operate(function (source, subscriber) { var isComplete = false; var innerSub = null; - source.subscribe(new OperatorSubscriber(subscriber, function (inner) { - if (!innerSub) { - innerSub = innerFrom(inner).subscribe(new OperatorSubscriber(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - })); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (inner) { + if (!innerSub) { + innerSub = innerFrom(inner).subscribe( + new OperatorSubscriber( + subscriber, + undefined, + function () { + innerSub = null; + isComplete && subscriber.complete(); + } + ) + ); + } + }, + function () { + isComplete = true; + !innerSub && subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=exhaustAll.js.map \ No newline at end of file +//# sourceMappingURL=exhaustAll.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js b/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js index 7689e7c93..b11821232 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js @@ -5,25 +5,45 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function exhaustMap(project, resultSelector) { if (resultSelector) { return function (source) { - return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); + return source.pipe( + exhaustMap(function (a, i) { + return innerFrom(project(a, i)).pipe( + map(function (b, ii) { + return resultSelector(a, b, i, ii); + }) + ); + }) + ); }; } return operate(function (source, subscriber) { var index = 0; var innerSub = null; var isComplete = false; - source.subscribe(new OperatorSubscriber(subscriber, function (outerValue) { - if (!innerSub) { - innerSub = new OperatorSubscriber(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (outerValue) { + if (!innerSub) { + innerSub = new OperatorSubscriber( + subscriber, + undefined, + function () { + innerSub = null; + isComplete && subscriber.complete(); + } + ); + innerFrom(project(outerValue, index++)).subscribe( + innerSub + ); + } + }, + function () { + isComplete = true; + !innerSub && subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=exhaustMap.js.map \ No newline at end of file +//# sourceMappingURL=exhaustMap.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/filter.js b/node_modules/rxjs/dist/esm5/internal/operators/filter.js index 38cf4cb8c..25c01ff91 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/filter.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/filter.js @@ -3,7 +3,14 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function filter(predicate, thisArg) { return operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + return ( + predicate.call(thisArg, value, index++) && + subscriber.next(value) + ); + }) + ); }); } -//# sourceMappingURL=filter.js.map \ No newline at end of file +//# sourceMappingURL=filter.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/find.js b/node_modules/rxjs/dist/esm5/internal/operators/find.js index 415c20e79..5d5df8f94 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/find.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/find.js @@ -7,16 +7,22 @@ export function createFind(predicate, thisArg, emit) { var findIndex = emit === 'index'; return function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, function () { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, + function () { + subscriber.next(findIndex ? -1 : undefined); + subscriber.complete(); + } + ) + ); }; } -//# sourceMappingURL=find.js.map \ No newline at end of file +//# sourceMappingURL=find.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js b/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js index ab55b8e08..6603321d7 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js @@ -1,4 +1,4 @@ -import { __extends } from "tslib"; +import { __extends } from 'tslib'; import { Observable } from '../Observable'; import { innerFrom } from '../observable/innerFrom'; import { Subject } from '../Subject'; @@ -9,38 +9,72 @@ export function groupBy(keySelector, elementOrOptions, duration, connector) { var element; if (!elementOrOptions || typeof elementOrOptions === 'function') { element = elementOrOptions; - } - else { - (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); + } else { + (duration = elementOrOptions.duration), + (element = elementOrOptions.element), + (connector = elementOrOptions.connector); } var groups = new Map(); var notify = function (cb) { groups.forEach(cb); cb(subscriber); }; - var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; - var groupBySourceSubscriber = new GroupBySubscriber(subscriber, function (value) { - try { - var key_1 = keySelector(value); - var group_1 = groups.get(key_1); - if (!group_1) { - groups.set(key_1, (group_1 = connector ? connector() : new Subject())); - var grouped = createGroupedObservable(key_1, group_1); - subscriber.next(grouped); - if (duration) { - var durationSubscriber_1 = new OperatorSubscriber(group_1, function () { - group_1.complete(); - durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); - }, undefined, undefined, function () { return groups.delete(key_1); }); - groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + var handleError = function (err) { + return notify(function (consumer) { + return consumer.error(err); + }); + }; + var groupBySourceSubscriber = new GroupBySubscriber( + subscriber, + function (value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set( + key_1, + (group_1 = connector ? connector() : new Subject()) + ); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = new OperatorSubscriber( + group_1, + function () { + group_1.complete(); + durationSubscriber_1 === null || + durationSubscriber_1 === void 0 + ? void 0 + : durationSubscriber_1.unsubscribe(); + }, + undefined, + undefined, + function () { + return groups.delete(key_1); + } + ); + groupBySourceSubscriber.add( + innerFrom(duration(grouped)).subscribe( + durationSubscriber_1 + ) + ); + } } + group_1.next(element ? element(value) : value); + } catch (err) { + handleError(err); } - group_1.next(element ? element(value) : value); - } - catch (err) { - handleError(err); + }, + function () { + return notify(function (consumer) { + return consumer.complete(); + }); + }, + handleError, + function () { + return groups.clear(); } - }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }); + ); source.subscribe(groupBySourceSubscriber); function createGroupedObservable(key, groupSubject) { var result = new Observable(function (groupSubscriber) { @@ -61,7 +95,7 @@ export function groupBy(keySelector, elementOrOptions, duration, connector) { var GroupBySubscriber = (function (_super) { __extends(GroupBySubscriber, _super); function GroupBySubscriber() { - var _this = _super !== null && _super.apply(this, arguments) || this; + var _this = (_super !== null && _super.apply(this, arguments)) || this; _this.activeGroups = 0; _this.teardownAttempted = false; return _this; @@ -71,5 +105,5 @@ var GroupBySubscriber = (function (_super) { this.activeGroups === 0 && _super.prototype.unsubscribe.call(this); }; return GroupBySubscriber; -}(OperatorSubscriber)); -//# sourceMappingURL=groupBy.js.map \ No newline at end of file +})(OperatorSubscriber); +//# sourceMappingURL=groupBy.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js b/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js index 430fb6016..7aeaca817 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js @@ -6,4 +6,4 @@ export function ignoreElements() { source.subscribe(new OperatorSubscriber(subscriber, noop)); }); } -//# sourceMappingURL=ignoreElements.js.map \ No newline at end of file +//# sourceMappingURL=ignoreElements.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js b/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js index 3c3fbb8de..8c3ee68a5 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js @@ -2,13 +2,19 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function isEmpty() { return operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber(subscriber, function () { - subscriber.next(false); - subscriber.complete(); - }, function () { - subscriber.next(true); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function () { + subscriber.next(false); + subscriber.complete(); + }, + function () { + subscriber.next(true); + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=isEmpty.js.map \ No newline at end of file +//# sourceMappingURL=isEmpty.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/map.js b/node_modules/rxjs/dist/esm5/internal/operators/map.js index 82ef9b705..c9bfdd4ca 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/map.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/map.js @@ -3,9 +3,11 @@ import { OperatorSubscriber } from './OperatorSubscriber'; export function map(project, thisArg) { return operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - subscriber.next(project.call(thisArg, value, index++)); - })); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + subscriber.next(project.call(thisArg, value, index++)); + }) + ); }); } -//# sourceMappingURL=map.js.map \ No newline at end of file +//# sourceMappingURL=map.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/materialize.js b/node_modules/rxjs/dist/esm5/internal/operators/materialize.js index 176f67928..a1cd2dc24 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/materialize.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/materialize.js @@ -3,15 +3,22 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function materialize() { return operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - subscriber.next(Notification.createNext(value)); - }, function () { - subscriber.next(Notification.createComplete()); - subscriber.complete(); - }, function (err) { - subscriber.next(Notification.createError(err)); - subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + subscriber.next(Notification.createNext(value)); + }, + function () { + subscriber.next(Notification.createComplete()); + subscriber.complete(); + }, + function (err) { + subscriber.next(Notification.createError(err)); + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=materialize.js.map \ No newline at end of file +//# sourceMappingURL=materialize.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js index 416fd659e..f8a08ff22 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js @@ -1,7 +1,16 @@ import { innerFrom } from '../observable/innerFrom'; import { executeSchedule } from '../util/executeSchedule'; import { OperatorSubscriber } from './OperatorSubscriber'; -export function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalTeardown) { +export function mergeInternals( + source, + subscriber, + project, + concurrent, + onBeforeNext, + expand, + innerSubScheduler, + additionalTeardown +) { var buffer = []; var active = 0; var index = 0; @@ -11,51 +20,70 @@ export function mergeInternals(source, subscriber, project, concurrent, onBefore subscriber.complete(); } }; - var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; + var outerNext = function (value) { + return active < concurrent ? doInnerSub(value) : buffer.push(value); + }; var doInnerSub = function (value) { expand && subscriber.next(value); active++; var innerComplete = false; - innerFrom(project(value, index++)).subscribe(new OperatorSubscriber(subscriber, function (innerValue) { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } - else { - subscriber.next(innerValue); - } - }, function () { - innerComplete = true; - }, undefined, function () { - if (innerComplete) { - try { - active--; - var _loop_1 = function () { - var bufferedValue = buffer.shift(); - if (innerSubScheduler) { - executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); - } - else { - doInnerSub(bufferedValue); + innerFrom(project(value, index++)).subscribe( + new OperatorSubscriber( + subscriber, + function (innerValue) { + onBeforeNext === null || onBeforeNext === void 0 + ? void 0 + : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } else { + subscriber.next(innerValue); + } + }, + function () { + innerComplete = true; + }, + undefined, + function () { + if (innerComplete) { + try { + active--; + var _loop_1 = function () { + var bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule( + subscriber, + innerSubScheduler, + function () { + return doInnerSub(bufferedValue); + } + ); + } else { + doInnerSub(bufferedValue); + } + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } catch (err) { + subscriber.error(err); } - }; - while (buffer.length && active < concurrent) { - _loop_1(); } - checkComplete(); - } - catch (err) { - subscriber.error(err); } - } - })); + ) + ); }; - source.subscribe(new OperatorSubscriber(subscriber, outerNext, function () { - isComplete = true; - checkComplete(); - })); + source.subscribe( + new OperatorSubscriber(subscriber, outerNext, function () { + isComplete = true; + checkComplete(); + }) + ); return function () { - additionalTeardown === null || additionalTeardown === void 0 ? void 0 : additionalTeardown(); + additionalTeardown === null || additionalTeardown === void 0 + ? void 0 + : additionalTeardown(); }; } -//# sourceMappingURL=mergeInternals.js.map \ No newline at end of file +//# sourceMappingURL=mergeInternals.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js b/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js index bca26bedb..b76dead81 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js @@ -2,9 +2,45 @@ import { executeSchedule } from '../util/executeSchedule'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function observeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } + if (delay === void 0) { + delay = 0; + } return operate(function (source, subscriber) { - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + return executeSchedule( + subscriber, + scheduler, + function () { + return subscriber.next(value); + }, + delay + ); + }, + function () { + return executeSchedule( + subscriber, + scheduler, + function () { + return subscriber.complete(); + }, + delay + ); + }, + function (err) { + return executeSchedule( + subscriber, + scheduler, + function () { + return subscriber.error(err); + }, + delay + ); + } + ) + ); }); } -//# sourceMappingURL=observeOn.js.map \ No newline at end of file +//# sourceMappingURL=observeOn.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNext.js b/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNext.js index 5faa71b20..90ae50af7 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNext.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNext.js @@ -1,4 +1,4 @@ -import { __read, __spreadArray } from "tslib"; +import { __read, __spreadArray } from 'tslib'; import { operate } from '../util/lift'; import { innerFrom } from '../observable/innerFrom'; import { argsOrArgArray } from '../util/argsOrArgArray'; @@ -18,16 +18,19 @@ export function onErrorResumeNext() { var nextSource = void 0; try { nextSource = innerFrom(remaining.shift()); - } - catch (err) { + } catch (err) { subscribeNext(); return; } - var innerSub = new OperatorSubscriber(subscriber, undefined, noop, noop); + var innerSub = new OperatorSubscriber( + subscriber, + undefined, + noop, + noop + ); subscriber.add(nextSource.subscribe(innerSub)); innerSub.add(subscribeNext); - } - else { + } else { subscriber.complete(); } } @@ -35,4 +38,4 @@ export function onErrorResumeNext() { subscribeNext(); }); } -//# sourceMappingURL=onErrorResumeNext.js.map \ No newline at end of file +//# sourceMappingURL=onErrorResumeNext.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js b/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js index b3821d249..084833306 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js @@ -4,12 +4,14 @@ export function pairwise() { return operate(function (source, subscriber) { var prev; var hasPrev = false; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + }) + ); }); } -//# sourceMappingURL=pairwise.js.map \ No newline at end of file +//# sourceMappingURL=pairwise.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/refCount.js b/node_modules/rxjs/dist/esm5/internal/operators/refCount.js index 0a69fc070..6e4debc5f 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/refCount.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/refCount.js @@ -4,23 +4,33 @@ export function refCount() { return operate(function (source, subscriber) { var connection = null; source._refCount++; - var refCounter = new OperatorSubscriber(subscriber, undefined, undefined, undefined, function () { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { + var refCounter = new OperatorSubscriber( + subscriber, + undefined, + undefined, + undefined, + function () { + if ( + !source || + source._refCount <= 0 || + 0 < --source._refCount + ) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; connection = null; - return; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); } - var sharedConnection = source._connection; - var conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - subscriber.unsubscribe(); - }); + ); source.subscribe(refCounter); if (!refCounter.closed) { connection = source.connect(); } }); } -//# sourceMappingURL=refCount.js.map \ No newline at end of file +//# sourceMappingURL=refCount.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeat.js b/node_modules/rxjs/dist/esm5/internal/operators/repeat.js index d06d2a0ae..34be45ab0 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/repeat.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/repeat.js @@ -9,52 +9,66 @@ export function repeat(countOrConfig) { var delay; if (countOrConfig != null) { if (typeof countOrConfig === 'object') { - (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); - } - else { + (_a = countOrConfig.count), + (count = _a === void 0 ? Infinity : _a), + (delay = countOrConfig.delay); + } else { count = countOrConfig; } } return count <= 0 - ? function () { return EMPTY; } + ? function () { + return EMPTY; + } : operate(function (source, subscriber) { - var soFar = 0; - var sourceSub; - var resubscribe = function () { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); - var notifierSubscriber_1 = new OperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - subscribeToSource(); - } - }; - var subscribeToSource = function () { - var syncUnsub = false; - sourceSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, function () { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } - else { - syncUnsub = true; - } - } - else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); + var soFar = 0; + var sourceSub; + var resubscribe = function () { + sourceSub === null || sourceSub === void 0 + ? void 0 + : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + var notifier = + typeof delay === 'number' + ? timer(delay) + : innerFrom(delay(soFar)); + var notifierSubscriber_1 = new OperatorSubscriber( + subscriber, + function () { + notifierSubscriber_1.unsubscribe(); + subscribeToSource(); + } + ); + notifier.subscribe(notifierSubscriber_1); + } else { + subscribeToSource(); + } + }; + var subscribeToSource = function () { + var syncUnsub = false; + sourceSub = source.subscribe( + new OperatorSubscriber( + subscriber, + undefined, + function () { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } else { + syncUnsub = true; + } + } else { + subscriber.complete(); + } + } + ) + ); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); } -//# sourceMappingURL=repeat.js.map \ No newline at end of file +//# sourceMappingURL=repeat.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js index 3f0ec5ee4..b69de98c6 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js @@ -8,30 +8,43 @@ export function repeatWhen(notifier) { var completions$; var isNotifierComplete = false; var isMainComplete = false; - var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; + var checkComplete = function () { + return ( + isMainComplete && + isNotifierComplete && + (subscriber.complete(), true) + ); + }; var getCompletionSubject = function () { if (!completions$) { completions$ = new Subject(); - notifier(completions$).subscribe(new OperatorSubscriber(subscriber, function () { - if (innerSub) { - subscribeForRepeatWhen(); - } - else { - syncResub = true; - } - }, function () { - isNotifierComplete = true; - checkComplete(); - })); + notifier(completions$).subscribe( + new OperatorSubscriber( + subscriber, + function () { + if (innerSub) { + subscribeForRepeatWhen(); + } else { + syncResub = true; + } + }, + function () { + isNotifierComplete = true; + checkComplete(); + } + ) + ); } return completions$; }; var subscribeForRepeatWhen = function () { isMainComplete = false; - innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, function () { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); + innerSub = source.subscribe( + new OperatorSubscriber(subscriber, undefined, function () { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + }) + ); if (syncResub) { innerSub.unsubscribe(); innerSub = null; @@ -42,4 +55,4 @@ export function repeatWhen(notifier) { subscribeForRepeatWhen(); }); } -//# sourceMappingURL=repeatWhen.js.map \ No newline at end of file +//# sourceMappingURL=repeatWhen.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retry.js b/node_modules/rxjs/dist/esm5/internal/operators/retry.js index b368d2a4f..16460ccf0 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/retry.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/retry.js @@ -4,66 +4,83 @@ import { identity } from '../util/identity'; import { timer } from '../observable/timer'; import { innerFrom } from '../observable/innerFrom'; export function retry(configOrCount) { - if (configOrCount === void 0) { configOrCount = Infinity; } + if (configOrCount === void 0) { + configOrCount = Infinity; + } var config; if (configOrCount && typeof configOrCount === 'object') { config = configOrCount; - } - else { + } else { config = { - count: configOrCount, + count: configOrCount }; } - var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; + var _a = config.count, + count = _a === void 0 ? Infinity : _a, + delay = config.delay, + _b = config.resetOnSuccess, + resetOnSuccess = _b === void 0 ? false : _b; return count <= 0 ? identity : operate(function (source, subscriber) { - var soFar = 0; - var innerSub; - var subscribeForRetry = function () { - var syncUnsub = false; - innerSub = source.subscribe(new OperatorSubscriber(subscriber, function (value) { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, undefined, function (err) { - if (soFar++ < count) { - var resub_1 = function () { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - else { - syncUnsub = true; - } - }; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); - var notifierSubscriber_1 = new OperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - resub_1(); - }, function () { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - resub_1(); - } - } - else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); + var soFar = 0; + var innerSub; + var subscribeForRetry = function () { + var syncUnsub = false; + innerSub = source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, + undefined, + function (err) { + if (soFar++ < count) { + var resub_1 = function () { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = + typeof delay === 'number' + ? timer(delay) + : innerFrom(delay(err, soFar)); + var notifierSubscriber_1 = + new OperatorSubscriber( + subscriber, + function () { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, + function () { + subscriber.complete(); + } + ); + notifier.subscribe(notifierSubscriber_1); + } else { + resub_1(); + } + } else { + subscriber.error(err); + } + } + ) + ); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); } -//# sourceMappingURL=retry.js.map \ No newline at end of file +//# sourceMappingURL=retry.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js index 508b9d7e9..29f560bd0 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js @@ -7,17 +7,28 @@ export function retryWhen(notifier) { var syncResub = false; var errors$; var subscribeForRetryWhen = function () { - innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, undefined, function (err) { - if (!errors$) { - errors$ = new Subject(); - notifier(errors$).subscribe(new OperatorSubscriber(subscriber, function () { - return innerSub ? subscribeForRetryWhen() : (syncResub = true); - })); - } - if (errors$) { - errors$.next(err); - } - })); + innerSub = source.subscribe( + new OperatorSubscriber( + subscriber, + undefined, + undefined, + function (err) { + if (!errors$) { + errors$ = new Subject(); + notifier(errors$).subscribe( + new OperatorSubscriber(subscriber, function () { + return innerSub + ? subscribeForRetryWhen() + : (syncResub = true); + }) + ); + } + if (errors$) { + errors$.next(err); + } + } + ) + ); if (syncResub) { innerSub.unsubscribe(); innerSub = null; @@ -28,4 +39,4 @@ export function retryWhen(notifier) { subscribeForRetryWhen(); }); } -//# sourceMappingURL=retryWhen.js.map \ No newline at end of file +//# sourceMappingURL=retryWhen.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sample.js b/node_modules/rxjs/dist/esm5/internal/operators/sample.js index 033230f1e..42165ca0d 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/sample.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/sample.js @@ -5,10 +5,12 @@ export function sample(notifier) { return operate(function (source, subscriber) { var hasValue = false; var lastValue = null; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - })); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + }) + ); var emit = function () { if (hasValue) { hasValue = false; @@ -20,4 +22,4 @@ export function sample(notifier) { notifier.subscribe(new OperatorSubscriber(subscriber, emit, noop)); }); } -//# sourceMappingURL=sample.js.map \ No newline at end of file +//# sourceMappingURL=sample.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js b/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js index c8ba5c629..b14e73ef3 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js @@ -1,22 +1,32 @@ import { OperatorSubscriber } from './OperatorSubscriber'; -export function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { +export function scanInternals( + accumulator, + seed, + hasSeed, + emitOnNext, + emitBeforeComplete +) { return function (source, subscriber) { var hasState = hasSeed; var state = seed; var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var i = index++; - state = hasState - ? - accumulator(state, value, i) - : - ((hasState = true), value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && - (function () { - hasState && subscriber.next(state); - subscriber.complete(); - }))); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + var i = index++; + state = hasState + ? accumulator(state, value, i) + : ((hasState = true), value); + emitOnNext && subscriber.next(state); + }, + emitBeforeComplete && + function () { + hasState && subscriber.next(state); + subscriber.complete(); + } + ) + ); }; } -//# sourceMappingURL=scanInternals.js.map \ No newline at end of file +//# sourceMappingURL=scanInternals.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js b/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js index 0f0d70332..40b1c2e98 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js @@ -1,7 +1,11 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function sequenceEqual(compareTo, comparator) { - if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } + if (comparator === void 0) { + comparator = function (a, b) { + return a === b; + }; + } return operate(function (source, subscriber) { var aState = createState(); var bState = createState(); @@ -10,20 +14,28 @@ export function sequenceEqual(compareTo, comparator) { subscriber.complete(); }; var createSubscriber = function (selfState, otherState) { - var sequenceEqualSubscriber = new OperatorSubscriber(subscriber, function (a) { - var buffer = otherState.buffer, complete = otherState.complete; - if (buffer.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); - } - else { - !comparator(a, buffer.shift()) && emit(false); + var sequenceEqualSubscriber = new OperatorSubscriber( + subscriber, + function (a) { + var buffer = otherState.buffer, + complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } else { + !comparator(a, buffer.shift()) && emit(false); + } + }, + function () { + selfState.complete = true; + var complete = otherState.complete, + buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || + sequenceEqualSubscriber === void 0 + ? void 0 + : sequenceEqualSubscriber.unsubscribe(); } - }, function () { - selfState.complete = true; - var complete = otherState.complete, buffer = otherState.buffer; - complete && emit(buffer.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); + ); return sequenceEqualSubscriber; }; source.subscribe(createSubscriber(aState, bState)); @@ -33,7 +45,7 @@ export function sequenceEqual(compareTo, comparator) { function createState() { return { buffer: [], - complete: false, + complete: false }; } -//# sourceMappingURL=sequenceEqual.js.map \ No newline at end of file +//# sourceMappingURL=sequenceEqual.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/single.js b/node_modules/rxjs/dist/esm5/internal/operators/single.js index 3a8789917..dafce3831 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/single.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/single.js @@ -9,22 +9,34 @@ export function single(predicate) { var singleValue; var seenValue = false; var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, function () { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } - else { - subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); - } - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && + subscriber.error( + new SequenceError('Too many matching values') + ); + hasValue = true; + singleValue = value; + } + }, + function () { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } else { + subscriber.error( + seenValue + ? new NotFoundError('No matching values') + : new EmptyError() + ); + } + } + ) + ); }); } -//# sourceMappingURL=single.js.map \ No newline at end of file +//# sourceMappingURL=single.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js b/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js index f7872394b..22f8530d2 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js @@ -3,26 +3,26 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function skipLast(skipCount) { return skipCount <= 0 - ? - identity + ? identity : operate(function (source, subscriber) { - var ring = new Array(skipCount); - var seen = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } - else { - var index = valueIndex % skipCount; - var oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return function () { - ring = null; - }; - }); + var ring = new Array(skipCount); + var seen = 0; + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + }) + ); + return function () { + ring = null; + }; + }); } -//# sourceMappingURL=skipLast.js.map \ No newline at end of file +//# sourceMappingURL=skipLast.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js b/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js index 41281c178..e409526d8 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js @@ -5,12 +5,22 @@ import { noop } from '../util/noop'; export function skipUntil(notifier) { return operate(function (source, subscriber) { var taking = false; - var skipSubscriber = new OperatorSubscriber(subscriber, function () { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, noop); + var skipSubscriber = new OperatorSubscriber( + subscriber, + function () { + skipSubscriber === null || skipSubscriber === void 0 + ? void 0 + : skipSubscriber.unsubscribe(); + taking = true; + }, + noop + ); innerFrom(notifier).subscribe(skipSubscriber); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + return taking && subscriber.next(value); + }) + ); }); } -//# sourceMappingURL=skipUntil.js.map \ No newline at end of file +//# sourceMappingURL=skipUntil.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js b/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js index 4d15a7848..994309814 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js @@ -4,7 +4,14 @@ export function skipWhile(predicate) { return operate(function (source, subscriber) { var taking = false; var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + return ( + (taking || (taking = !predicate(value, index++))) && + subscriber.next(value) + ); + }) + ); }); } -//# sourceMappingURL=skipWhile.js.map \ No newline at end of file +//# sourceMappingURL=skipWhile.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js b/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js index eaf68cd1d..e6303f05e 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js @@ -6,19 +6,46 @@ export function switchMap(project, resultSelector) { var innerSubscriber = null; var index = 0; var isComplete = false; - var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = new OperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { - innerSubscriber = null; - checkComplete(); - }))); - }, function () { - isComplete = true; - checkComplete(); - })); + var checkComplete = function () { + return isComplete && !innerSubscriber && subscriber.complete(); + }; + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + innerSubscriber === null || innerSubscriber === void 0 + ? void 0 + : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + innerFrom(project(value, outerIndex)).subscribe( + (innerSubscriber = new OperatorSubscriber( + subscriber, + function (innerValue) { + return subscriber.next( + resultSelector + ? resultSelector( + value, + innerValue, + outerIndex, + innerIndex++ + ) + : innerValue + ); + }, + function () { + innerSubscriber = null; + checkComplete(); + } + )) + ); + }, + function () { + isComplete = true; + checkComplete(); + } + ) + ); }); } -//# sourceMappingURL=switchMap.js.map \ No newline at end of file +//# sourceMappingURL=switchMap.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/take.js b/node_modules/rxjs/dist/esm5/internal/operators/take.js index a37a889da..90ab8e2ab 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/take.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/take.js @@ -3,18 +3,21 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function take(count) { return count <= 0 - ? - function () { return EMPTY; } + ? function () { + return EMPTY; + } : operate(function (source, subscriber) { - var seen = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); + var seen = 0; + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + }) + ); + }); } -//# sourceMappingURL=take.js.map \ No newline at end of file +//# sourceMappingURL=take.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js b/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js index 4c2be64f1..f2b48b5f4 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js @@ -1,34 +1,55 @@ -import { __values } from "tslib"; +import { __values } from 'tslib'; import { EMPTY } from '../observable/empty'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function takeLast(count) { return count <= 0 - ? function () { return EMPTY; } + ? function () { + return EMPTY; + } : operate(function (source, subscriber) { - var buffer = []; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - buffer.push(value); - count < buffer.length && buffer.shift(); - }, function () { - var e_1, _a; - try { - for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { - var value = buffer_1_1.value; - subscriber.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }, undefined, function () { - buffer = null; - })); - }); + var buffer = []; + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, + function () { + var e_1, _a; + try { + for ( + var buffer_1 = __values(buffer), + buffer_1_1 = buffer_1.next(); + !buffer_1_1.done; + buffer_1_1 = buffer_1.next() + ) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + buffer_1_1 && + !buffer_1_1.done && + (_a = buffer_1.return) + ) + _a.call(buffer_1); + } finally { + if (e_1) throw e_1.error; + } + } + subscriber.complete(); + }, + undefined, + function () { + buffer = null; + } + ) + ); + }); } -//# sourceMappingURL=takeLast.js.map \ No newline at end of file +//# sourceMappingURL=takeLast.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js b/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js index 61da109f3..cc7d2ee24 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js @@ -4,8 +4,16 @@ import { innerFrom } from '../observable/innerFrom'; import { noop } from '../util/noop'; export function takeUntil(notifier) { return operate(function (source, subscriber) { - innerFrom(notifier).subscribe(new OperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop)); + innerFrom(notifier).subscribe( + new OperatorSubscriber( + subscriber, + function () { + return subscriber.complete(); + }, + noop + ) + ); !subscriber.closed && source.subscribe(subscriber); }); } -//# sourceMappingURL=takeUntil.js.map \ No newline at end of file +//# sourceMappingURL=takeUntil.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js b/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js index f81027455..bfd0d491b 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js @@ -1,14 +1,18 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function takeWhile(predicate, inclusive) { - if (inclusive === void 0) { inclusive = false; } + if (inclusive === void 0) { + inclusive = false; + } return operate(function (source, subscriber) { var index = 0; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + }) + ); }); } -//# sourceMappingURL=takeWhile.js.map \ No newline at end of file +//# sourceMappingURL=takeWhile.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/tap.js b/node_modules/rxjs/dist/esm5/internal/operators/tap.js index 8d5947139..63838fbf8 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/tap.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/tap.js @@ -3,38 +3,58 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; import { identity } from '../util/identity'; export function tap(observerOrNext, error, complete) { - var tapObserver = isFunction(observerOrNext) || error || complete - ? - { next: observerOrNext, error: error, complete: complete } - : observerOrNext; + var tapObserver = + isFunction(observerOrNext) || error || complete + ? { next: observerOrNext, error: error, complete: complete } + : observerOrNext; return tapObserver ? operate(function (source, subscriber) { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - var isUnsub = true; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var _a; - (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); - subscriber.next(value); - }, function () { - var _a; - isUnsub = false; - (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - subscriber.complete(); - }, function (err) { - var _a; - isUnsub = false; - (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); - subscriber.error(err); - }, function () { - var _a, _b; - if (isUnsub) { - (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) - : - identity; + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver); + var isUnsub = true; + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + var _a; + (_a = tapObserver.next) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver, value); + subscriber.next(value); + }, + function () { + var _a; + isUnsub = false; + (_a = tapObserver.complete) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver); + subscriber.complete(); + }, + function (err) { + var _a; + isUnsub = false; + (_a = tapObserver.error) === null || _a === void 0 + ? void 0 + : _a.call(tapObserver, err); + subscriber.error(err); + }, + function () { + var _a, _b; + if (isUnsub) { + (_a = tapObserver.unsubscribe) === null || + _a === void 0 + ? void 0 + : _a.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 + ? void 0 + : _b.call(tapObserver); + } + ) + ); + }) + : identity; } -//# sourceMappingURL=tap.js.map \ No newline at end of file +//# sourceMappingURL=tap.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throttle.js b/node_modules/rxjs/dist/esm5/internal/operators/throttle.js index 158df39b9..079be7709 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/throttle.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/throttle.js @@ -3,18 +3,23 @@ import { OperatorSubscriber } from './OperatorSubscriber'; import { innerFrom } from '../observable/innerFrom'; export var defaultThrottleConfig = { leading: true, - trailing: false, + trailing: false }; export function throttle(durationSelector, config) { - if (config === void 0) { config = defaultThrottleConfig; } + if (config === void 0) { + config = defaultThrottleConfig; + } return operate(function (source, subscriber) { - var leading = config.leading, trailing = config.trailing; + var leading = config.leading, + trailing = config.trailing; var hasValue = false; var sendValue = null; var throttled = null; var isComplete = false; var endThrottling = function () { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled === null || throttled === void 0 + ? void 0 + : throttled.unsubscribe(); throttled = null; if (trailing) { send(); @@ -26,7 +31,13 @@ export function throttle(durationSelector, config) { isComplete && subscriber.complete(); }; var startThrottle = function (value) { - return (throttled = innerFrom(durationSelector(value)).subscribe(new OperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + return (throttled = innerFrom(durationSelector(value)).subscribe( + new OperatorSubscriber( + subscriber, + endThrottling, + cleanupThrottling + ) + )); }; var send = function () { if (hasValue) { @@ -37,14 +48,22 @@ export function throttle(durationSelector, config) { !isComplete && startThrottle(value); } }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, function () { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && + (leading ? send() : startThrottle(value)); + }, + function () { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && + subscriber.complete(); + } + ) + ); }); } -//# sourceMappingURL=throttle.js.map \ No newline at end of file +//# sourceMappingURL=throttle.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js b/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js index fd8aba5fa..8fa00193f 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js @@ -2,16 +2,28 @@ import { EmptyError } from '../util/EmptyError'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function throwIfEmpty(errorFactory) { - if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } + if (errorFactory === void 0) { + errorFactory = defaultErrorFactory; + } return operate(function (source, subscriber) { var hasValue = false; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + hasValue = true; + subscriber.next(value); + }, + function () { + return hasValue + ? subscriber.complete() + : subscriber.error(errorFactory()); + } + ) + ); }); } function defaultErrorFactory() { return new EmptyError(); } -//# sourceMappingURL=throwIfEmpty.js.map \ No newline at end of file +//# sourceMappingURL=throwIfEmpty.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js b/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js index 91c392cbf..87b5ecf44 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js @@ -3,20 +3,34 @@ import { scan } from './scan'; import { defer } from '../observable/defer'; import { map } from './map'; export function timeInterval(scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } + if (scheduler === void 0) { + scheduler = asyncScheduler; + } return function (source) { return defer(function () { - return source.pipe(scan(function (_a, value) { - var current = _a.current; - return ({ value: value, current: scheduler.now(), last: current }); - }, { - current: scheduler.now(), - value: undefined, - last: undefined, - }), map(function (_a) { - var current = _a.current, last = _a.last, value = _a.value; - return new TimeInterval(value, current - last); - })); + return source.pipe( + scan( + function (_a, value) { + var current = _a.current; + return { + value: value, + current: scheduler.now(), + last: current + }; + }, + { + current: scheduler.now(), + value: undefined, + last: undefined + } + ), + map(function (_a) { + var current = _a.current, + last = _a.last, + value = _a.value; + return new TimeInterval(value, current - last); + }) + ); }); }; } @@ -26,6 +40,6 @@ var TimeInterval = (function () { this.interval = interval; } return TimeInterval; -}()); +})(); export { TimeInterval }; -//# sourceMappingURL=timeInterval.js.map \ No newline at end of file +//# sourceMappingURL=timeInterval.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeout.js b/node_modules/rxjs/dist/esm5/internal/operators/timeout.js index 852b6eb31..90f1a2cff 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/timeout.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/timeout.js @@ -7,7 +7,9 @@ import { OperatorSubscriber } from './OperatorSubscriber'; import { executeSchedule } from '../util/executeSchedule'; export var TimeoutError = createErrorClass(function (_super) { return function TimeoutErrorImpl(info) { - if (info === void 0) { info = null; } + if (info === void 0) { + info = null; + } _super(this); this.message = 'Timeout has occurred'; this.name = 'TimeoutError'; @@ -15,11 +17,24 @@ export var TimeoutError = createErrorClass(function (_super) { }; }); export function timeout(config, schedulerArg) { - var _a = (isValidDate(config) - ? { first: config } - : typeof config === 'number' + var _a = isValidDate(config) + ? { first: config } + : typeof config === 'number' ? { each: config } - : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; + : config, + first = _a.first, + each = _a.each, + _b = _a.with, + _with = _b === void 0 ? timeoutErrorFactory : _b, + _c = _a.scheduler, + scheduler = + _c === void 0 + ? schedulerArg !== null && schedulerArg !== void 0 + ? schedulerArg + : asyncScheduler + : _c, + _d = _a.meta, + meta = _d === void 0 ? null : _d; if (first == null && each == null) { throw new TypeError('No timeout provided.'); } @@ -29,35 +44,65 @@ export function timeout(config, schedulerArg) { var lastValue = null; var seen = 0; var startTimer = function (delay) { - timerSubscription = executeSchedule(subscriber, scheduler, function () { - try { - originalSourceSubscription.unsubscribe(); - innerFrom(_with({ - meta: meta, - lastValue: lastValue, - seen: seen, - })).subscribe(subscriber); - } - catch (err) { - subscriber.error(err); - } - }, delay); + timerSubscription = executeSchedule( + subscriber, + scheduler, + function () { + try { + originalSourceSubscription.unsubscribe(); + innerFrom( + _with({ + meta: meta, + lastValue: lastValue, + seen: seen + }) + ).subscribe(subscriber); + } catch (err) { + subscriber.error(err); + } + }, + delay + ); }; - originalSourceSubscription = source.subscribe(new OperatorSubscriber(subscriber, function (value) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next((lastValue = value)); - each > 0 && startTimer(each); - }, undefined, undefined, function () { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); + originalSourceSubscription = source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + timerSubscription === null || timerSubscription === void 0 + ? void 0 + : timerSubscription.unsubscribe(); + seen++; + subscriber.next((lastValue = value)); + each > 0 && startTimer(each); + }, + undefined, + undefined, + function () { + if ( + !(timerSubscription === null || + timerSubscription === void 0 + ? void 0 + : timerSubscription.closed) + ) { + timerSubscription === null || + timerSubscription === void 0 + ? void 0 + : timerSubscription.unsubscribe(); + } + lastValue = null; + } + ) + ); + startTimer( + first != null + ? typeof first === 'number' + ? first + : +first - scheduler.now() + : each + ); }); } function timeoutErrorFactory(info) { throw new TimeoutError(info); } -//# sourceMappingURL=timeout.js.map \ No newline at end of file +//# sourceMappingURL=timeout.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/window.js b/node_modules/rxjs/dist/esm5/internal/operators/window.js index fd40422ed..c25a24a55 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/window.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/window.js @@ -10,18 +10,38 @@ export function window(windowBoundaries) { windowSubject.error(err); subscriber.error(err); }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - windowBoundaries.subscribe(new OperatorSubscriber(subscriber, function () { - windowSubject.complete(); - subscriber.next((windowSubject = new Subject())); - }, noop, errorHandler)); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + return windowSubject === null || windowSubject === void 0 + ? void 0 + : windowSubject.next(value); + }, + function () { + windowSubject.complete(); + subscriber.complete(); + }, + errorHandler + ) + ); + windowBoundaries.subscribe( + new OperatorSubscriber( + subscriber, + function () { + windowSubject.complete(); + subscriber.next((windowSubject = new Subject())); + }, + noop, + errorHandler + ) + ); return function () { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject === null || windowSubject === void 0 + ? void 0 + : windowSubject.unsubscribe(); windowSubject = null; }; }); } -//# sourceMappingURL=window.js.map \ No newline at end of file +//# sourceMappingURL=window.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js b/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js index 6c2585d43..2db84b0b4 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js @@ -1,53 +1,74 @@ -import { __values } from "tslib"; +import { __values } from 'tslib'; import { Subject } from '../Subject'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function windowCount(windowSize, startWindowEvery) { - if (startWindowEvery === void 0) { startWindowEvery = 0; } + if (startWindowEvery === void 0) { + startWindowEvery = 0; + } var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; return operate(function (source, subscriber) { var windows = [new Subject()]; var starts = []; var count = 0; subscriber.next(windows[0].asObservable()); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { - var window_1 = windows_1_1.value; - window_1.next(value); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + try { + for ( + var windows_1 = __values(windows), + windows_1_1 = windows_1.next(); + !windows_1_1.done; + windows_1_1 = windows_1.next() + ) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + windows_1_1 && + !windows_1_1.done && + (_a = windows_1.return) + ) + _a.call(windows_1); + } finally { + if (e_1) throw e_1.error; + } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, + function () { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, + function (err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, + function () { + starts = null; + windows = null; } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); - } - finally { if (e_1) throw e_1.error; } - } - var c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count % startEvery === 0) { - var window_2 = new Subject(); - windows.push(window_2); - subscriber.next(window_2.asObservable()); - } - }, function () { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, function (err) { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, function () { - starts = null; - windows = null; - })); + ) + ); }); } -//# sourceMappingURL=windowCount.js.map \ No newline at end of file +//# sourceMappingURL=windowCount.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js b/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js index 93bb1a213..2f88d1322 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js @@ -12,14 +12,19 @@ export function windowTime(windowTimeSpan) { for (var _i = 1; _i < arguments.length; _i++) { otherArgs[_i - 1] = arguments[_i]; } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var scheduler = + (_a = popScheduler(otherArgs)) !== null && _a !== void 0 + ? _a + : asyncScheduler; + var windowCreationInterval = + (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; var maxWindowSize = otherArgs[1] || Infinity; return operate(function (source, subscriber) { var windowRecords = []; var restartOnClose = false; var closeWindow = function (record) { - var window = record.window, subs = record.subs; + var window = record.window, + subs = record.subs; window.complete(); subs.unsubscribe(); arrRemove(windowRecords, record); @@ -33,21 +38,35 @@ export function windowTime(windowTimeSpan) { var record_1 = { window: window_1, subs: subs, - seen: 0, + seen: 0 }; windowRecords.push(record_1); subscriber.next(window_1.asObservable()); - executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); + executeSchedule( + subs, + scheduler, + function () { + return closeWindow(record_1); + }, + windowTimeSpan + ); } }; if (windowCreationInterval !== null && windowCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } - else { + executeSchedule( + subscriber, + scheduler, + startWindow, + windowCreationInterval, + true + ); + } else { restartOnClose = true; } startWindow(); - var loop = function (cb) { return windowRecords.slice().forEach(cb); }; + var loop = function (cb) { + return windowRecords.slice().forEach(cb); + }; var terminate = function (cb) { loop(function (_a) { var window = _a.window; @@ -56,15 +75,30 @@ export function windowTime(windowTimeSpan) { cb(subscriber); subscriber.unsubscribe(); }; - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - loop(function (record) { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + loop(function (record) { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, + function () { + return terminate(function (consumer) { + return consumer.complete(); + }); + }, + function (err) { + return terminate(function (consumer) { + return consumer.error(err); + }); + } + ) + ); return function () { windowRecords = null; }; }); } -//# sourceMappingURL=windowTime.js.map \ No newline at end of file +//# sourceMappingURL=windowTime.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js b/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js index d37eac103..41504a703 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js @@ -1,4 +1,4 @@ -import { __values } from "tslib"; +import { __values } from 'tslib'; import { Subject } from '../Subject'; import { Subscription } from '../Subscription'; import { operate } from '../util/lift'; @@ -15,52 +15,85 @@ export function windowToggle(openings, closingSelector) { } subscriber.error(err); }; - innerFrom(openings).subscribe(new OperatorSubscriber(subscriber, function (openValue) { - var window = new Subject(); - windows.push(window); - var closingSubscription = new Subscription(); - var closeWindow = function () { - arrRemove(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - var closingNotifier; - try { - closingNotifier = innerFrom(closingSelector(openValue)); - } - catch (err) { - handleError(err); - return; - } - subscriber.next(window.asObservable()); - closingSubscription.add(closingNotifier.subscribe(new OperatorSubscriber(subscriber, closeWindow, noop, handleError))); - }, noop)); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var windowsCopy = windows.slice(); - try { - for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { - var window_1 = windowsCopy_1_1.value; - window_1.next(value); + innerFrom(openings).subscribe( + new OperatorSubscriber( + subscriber, + function (openValue) { + var window = new Subject(); + windows.push(window); + var closingSubscription = new Subscription(); + var closeWindow = function () { + arrRemove(windows, window); + window.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = innerFrom(closingSelector(openValue)); + } catch (err) { + handleError(err); + return; + } + subscriber.next(window.asObservable()); + closingSubscription.add( + closingNotifier.subscribe( + new OperatorSubscriber( + subscriber, + closeWindow, + noop, + handleError + ) + ) + ); + }, + noop + ) + ); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + var e_1, _a; + var windowsCopy = windows.slice(); + try { + for ( + var windowsCopy_1 = __values(windowsCopy), + windowsCopy_1_1 = windowsCopy_1.next(); + !windowsCopy_1_1.done; + windowsCopy_1_1 = windowsCopy_1.next() + ) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if ( + windowsCopy_1_1 && + !windowsCopy_1_1.done && + (_a = windowsCopy_1.return) + ) + _a.call(windowsCopy_1); + } finally { + if (e_1) throw e_1.error; + } + } + }, + function () { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, + handleError, + function () { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (0 < windows.length) { - windows.shift().complete(); - } - subscriber.complete(); - }, handleError, function () { - while (0 < windows.length) { - windows.shift().unsubscribe(); - } - })); + ) + ); }); } -//# sourceMappingURL=windowToggle.js.map \ No newline at end of file +//# sourceMappingURL=windowToggle.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js index 5ad02a1c0..810cb8828 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js @@ -11,28 +11,48 @@ export function windowWhen(closingSelector) { subscriber.error(err); }; var openWindow = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); window === null || window === void 0 ? void 0 : window.complete(); window = new Subject(); subscriber.next(window.asObservable()); var closingNotifier; try { closingNotifier = innerFrom(closingSelector()); - } - catch (err) { + } catch (err) { handleError(err); return; } - closingNotifier.subscribe((closingSubscriber = new OperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + closingNotifier.subscribe( + (closingSubscriber = new OperatorSubscriber( + subscriber, + openWindow, + openWindow, + handleError + )) + ); }; openWindow(); - source.subscribe(new OperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () { - window.complete(); - subscriber.complete(); - }, handleError, function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window = null; - })); + source.subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + return window.next(value); + }, + function () { + window.complete(); + subscriber.complete(); + }, + handleError, + function () { + closingSubscriber === null || closingSubscriber === void 0 + ? void 0 + : closingSubscriber.unsubscribe(); + window = null; + } + ) + ); }); } -//# sourceMappingURL=windowWhen.js.map \ No newline at end of file +//# sourceMappingURL=windowWhen.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js b/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js index f9367f702..ec64f3d9a 100644 --- a/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js +++ b/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js @@ -1,4 +1,4 @@ -import { __read, __spreadArray } from "tslib"; +import { __read, __spreadArray } from 'tslib'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; import { innerFrom } from '../observable/innerFrom'; @@ -14,26 +14,44 @@ export function withLatestFrom() { return operate(function (source, subscriber) { var len = inputs.length; var otherValues = new Array(len); - var hasValue = inputs.map(function () { return false; }); + var hasValue = inputs.map(function () { + return false; + }); var ready = false; var _loop_1 = function (i) { - innerFrom(inputs[i]).subscribe(new OperatorSubscriber(subscriber, function (value) { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - hasValue[i] = true; - (ready = hasValue.every(identity)) && (hasValue = null); - } - }, noop)); + innerFrom(inputs[i]).subscribe( + new OperatorSubscriber( + subscriber, + function (value) { + otherValues[i] = value; + if (!ready && !hasValue[i]) { + hasValue[i] = true; + (ready = hasValue.every(identity)) && + (hasValue = null); + } + }, + noop + ) + ); }; for (var i = 0; i < len; i++) { _loop_1(i); } - source.subscribe(new OperatorSubscriber(subscriber, function (value) { - if (ready) { - var values = __spreadArray([value], __read(otherValues)); - subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); - } - })); + source.subscribe( + new OperatorSubscriber(subscriber, function (value) { + if (ready) { + var values = __spreadArray([value], __read(otherValues)); + subscriber.next( + project + ? project.apply( + void 0, + __spreadArray([], __read(values)) + ) + : values + ); + } + }) + ); }); } -//# sourceMappingURL=withLatestFrom.js.map \ No newline at end of file +//# sourceMappingURL=withLatestFrom.js.map diff --git a/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js b/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js index 14fd4dad8..6b22925ba 100644 --- a/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js +++ b/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js @@ -1,10 +1,17 @@ -import { __extends, __read, __spreadArray, __values } from "tslib"; +import { __extends, __read, __spreadArray, __values } from 'tslib'; import { Observable } from '../Observable'; import { ColdObservable } from './ColdObservable'; import { HotObservable } from './HotObservable'; import { SubscriptionLog } from './SubscriptionLog'; -import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler'; -import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories'; +import { + VirtualTimeScheduler, + VirtualAction +} from '../scheduler/VirtualTimeScheduler'; +import { + COMPLETE_NOTIFICATION, + errorNotification, + nextNotification +} from '../NotificationFactories'; import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; import { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider'; import { animationFrameProvider } from '../scheduler/animationFrameProvider'; @@ -24,102 +31,214 @@ var TestScheduler = (function (_super) { return _this; } TestScheduler.prototype.createTime = function (marbles) { - var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); + var indexOf = this.runMode + ? marbles.trim().indexOf('|') + : marbles.indexOf('|'); if (indexOf === -1) { - throw new Error('marble diagram for time should have a completion marker "|"'); + throw new Error( + 'marble diagram for time should have a completion marker "|"' + ); } return indexOf * TestScheduler.frameTimeFactor; }; - TestScheduler.prototype.createColdObservable = function (marbles, values, error) { + TestScheduler.prototype.createColdObservable = function ( + marbles, + values, + error + ) { if (marbles.indexOf('^') !== -1) { - throw new Error('cold observable cannot have subscription offset "^"'); + throw new Error( + 'cold observable cannot have subscription offset "^"' + ); } if (marbles.indexOf('!') !== -1) { - throw new Error('cold observable cannot have unsubscription marker "!"'); + throw new Error( + 'cold observable cannot have unsubscription marker "!"' + ); } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var messages = TestScheduler.parseMarbles( + marbles, + values, + error, + undefined, + this.runMode + ); var cold = new ColdObservable(messages, this); this.coldObservables.push(cold); return cold; }; - TestScheduler.prototype.createHotObservable = function (marbles, values, error) { + TestScheduler.prototype.createHotObservable = function ( + marbles, + values, + error + ) { if (marbles.indexOf('!') !== -1) { - throw new Error('hot observable cannot have unsubscription marker "!"'); + throw new Error( + 'hot observable cannot have unsubscription marker "!"' + ); } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var messages = TestScheduler.parseMarbles( + marbles, + values, + error, + undefined, + this.runMode + ); var subject = new HotObservable(messages, this); this.hotObservables.push(subject); return subject; }; - TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) { + TestScheduler.prototype.materializeInnerObservable = function ( + observable, + outerFrame + ) { var _this = this; var messages = []; - observable.subscribe(function (value) { - messages.push({ frame: _this.frame - outerFrame, notification: nextNotification(value) }); - }, function (error) { - messages.push({ frame: _this.frame - outerFrame, notification: errorNotification(error) }); - }, function () { - messages.push({ frame: _this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); - }); + observable.subscribe( + function (value) { + messages.push({ + frame: _this.frame - outerFrame, + notification: nextNotification(value) + }); + }, + function (error) { + messages.push({ + frame: _this.frame - outerFrame, + notification: errorNotification(error) + }); + }, + function () { + messages.push({ + frame: _this.frame - outerFrame, + notification: COMPLETE_NOTIFICATION + }); + } + ); return messages; }; - TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) { + TestScheduler.prototype.expectObservable = function ( + observable, + subscriptionMarbles + ) { var _this = this; - if (subscriptionMarbles === void 0) { subscriptionMarbles = null; } + if (subscriptionMarbles === void 0) { + subscriptionMarbles = null; + } var actual = []; var flushTest = { actual: actual, ready: false }; - var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); - var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; + var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions( + subscriptionMarbles, + this.runMode + ); + var subscriptionFrame = + subscriptionParsed.subscribedFrame === Infinity + ? 0 + : subscriptionParsed.subscribedFrame; var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; var subscription; this.schedule(function () { - subscription = observable.subscribe(function (x) { - var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - actual.push({ frame: _this.frame, notification: nextNotification(value) }); - }, function (error) { - actual.push({ frame: _this.frame, notification: errorNotification(error) }); - }, function () { - actual.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); - }); + subscription = observable.subscribe( + function (x) { + var value = + x instanceof Observable + ? _this.materializeInnerObservable(x, _this.frame) + : x; + actual.push({ + frame: _this.frame, + notification: nextNotification(value) + }); + }, + function (error) { + actual.push({ + frame: _this.frame, + notification: errorNotification(error) + }); + }, + function () { + actual.push({ + frame: _this.frame, + notification: COMPLETE_NOTIFICATION + }); + } + ); }, subscriptionFrame); if (unsubscriptionFrame !== Infinity) { - this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame); + this.schedule(function () { + return subscription.unsubscribe(); + }, unsubscriptionFrame); } this.flushTests.push(flushTest); var runMode = this.runMode; return { toBe: function (marbles, values, errorValue) { flushTest.ready = true; - flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); + flushTest.expected = TestScheduler.parseMarbles( + marbles, + values, + errorValue, + true, + runMode + ); }, toEqual: function (other) { flushTest.ready = true; flushTest.expected = []; _this.schedule(function () { - subscription = other.subscribe(function (x) { - var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - flushTest.expected.push({ frame: _this.frame, notification: nextNotification(value) }); - }, function (error) { - flushTest.expected.push({ frame: _this.frame, notification: errorNotification(error) }); - }, function () { - flushTest.expected.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); - }); + subscription = other.subscribe( + function (x) { + var value = + x instanceof Observable + ? _this.materializeInnerObservable( + x, + _this.frame + ) + : x; + flushTest.expected.push({ + frame: _this.frame, + notification: nextNotification(value) + }); + }, + function (error) { + flushTest.expected.push({ + frame: _this.frame, + notification: errorNotification(error) + }); + }, + function () { + flushTest.expected.push({ + frame: _this.frame, + notification: COMPLETE_NOTIFICATION + }); + } + ); }, subscriptionFrame); - }, + } }; }; - TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) { + TestScheduler.prototype.expectSubscriptions = function ( + actualSubscriptionLogs + ) { var flushTest = { actual: actualSubscriptionLogs, ready: false }; this.flushTests.push(flushTest); var runMode = this.runMode; return { toBe: function (marblesOrMarblesArray) { - var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; + var marblesArray = + typeof marblesOrMarblesArray === 'string' + ? [marblesOrMarblesArray] + : marblesOrMarblesArray; flushTest.ready = true; flushTest.expected = marblesArray - .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); }) - .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; }); - }, + .map(function (marbles) { + return TestScheduler.parseMarblesAsSubscriptions( + marbles, + runMode + ); + }) + .filter(function (marbles) { + return marbles.subscribedFrame !== Infinity; + }); + } }; }; TestScheduler.prototype.flush = function () { @@ -139,7 +258,9 @@ var TestScheduler = (function (_super) { }; TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) { var _this = this; - if (runMode === void 0) { runMode = false; } + if (runMode === void 0) { + runMode = false; + } if (typeof marbles !== 'string') { return new SubscriptionLog(Infinity); } @@ -174,14 +295,20 @@ var TestScheduler = (function (_super) { break; case '^': if (subscriptionFrame !== Infinity) { - throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); + throw new Error( + "found a second subscription point '^' in a " + + 'subscription marble diagram. There can only be one.' + ); } subscriptionFrame = groupStart > -1 ? groupStart : frame; advanceFrameBy(1); break; case '!': if (unsubscriptionFrame !== Infinity) { - throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); + throw new Error( + "found a second unsubscription point '!' in a " + + 'subscription marble diagram. There can only be one.' + ); } unsubscriptionFrame = groupStart > -1 ? groupStart : frame; break; @@ -189,7 +316,9 @@ var TestScheduler = (function (_super) { if (runMode && c.match(/^[0-9]$/)) { if (i === 0 || characters[i - 1] === ' ') { var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + var match = buffer.match( + /^([0-9]+(?:\.[0-9]+)?)(ms|s|m) / + ); if (match) { i += match[0].length - 1; var duration = parseFloat(match[1]); @@ -208,48 +337,76 @@ var TestScheduler = (function (_super) { default: break; } - advanceFrameBy(durationInMs / this_1.frameTimeFactor); + advanceFrameBy( + durationInMs / this_1.frameTimeFactor + ); break; } } } - throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); + throw new Error( + "there can only be '^' and '!' markers in a " + + "subscription marble diagram. Found instead '" + + c + + "'." + ); } frame = nextFrame; out_i_1 = i; }; - var this_1 = this, out_i_1; + var this_1 = this, + out_i_1; for (var i = 0; i < len; i++) { _loop_1(i); i = out_i_1; } if (unsubscriptionFrame < 0) { return new SubscriptionLog(subscriptionFrame); - } - else { + } else { return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); } }; - TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) { + TestScheduler.parseMarbles = function ( + marbles, + values, + errorValue, + materializeInnerObservables, + runMode + ) { var _this = this; - if (materializeInnerObservables === void 0) { materializeInnerObservables = false; } - if (runMode === void 0) { runMode = false; } + if (materializeInnerObservables === void 0) { + materializeInnerObservables = false; + } + if (runMode === void 0) { + runMode = false; + } if (marbles.indexOf('!') !== -1) { - throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); + throw new Error( + 'conventional marble diagrams cannot have the ' + + 'unsubscription marker "!"' + ); } var characters = __spreadArray([], __read(marbles)); var len = characters.length; var testMessages = []; - var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); + var subIndex = runMode + ? marbles.replace(/^[ ]+/, '').indexOf('^') + : marbles.indexOf('^'); var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; - var getValue = typeof values !== 'object' - ? function (x) { return x; } - : function (x) { - if (materializeInnerObservables && values[x] instanceof ColdObservable) { - return values[x].messages; - } - return values[x]; - }; + var getValue = + typeof values !== 'object' + ? function (x) { + return x; + } + : function (x) { + if ( + materializeInnerObservables && + values[x] instanceof ColdObservable + ) { + return values[x].messages; + } + return values[x]; + }; var groupStart = -1; var _loop_2 = function (i) { var nextFrame = frame; @@ -290,7 +447,9 @@ var TestScheduler = (function (_super) { if (runMode && c.match(/^[0-9]$/)) { if (i === 0 || characters[i - 1] === ' ') { var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + var match = buffer.match( + /^([0-9]+(?:\.[0-9]+)?)(ms|s|m) / + ); if (match) { i += match[0].length - 1; var duration = parseFloat(match[1]); @@ -309,7 +468,9 @@ var TestScheduler = (function (_super) { default: break; } - advanceFrameBy(durationInMs / this_2.frameTimeFactor); + advanceFrameBy( + durationInMs / this_2.frameTimeFactor + ); break; } } @@ -319,12 +480,16 @@ var TestScheduler = (function (_super) { break; } if (notification) { - testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification }); + testMessages.push({ + frame: groupStart > -1 ? groupStart : frame, + notification: notification + }); } frame = nextFrame; out_i_2 = i; }; - var this_2 = this, out_i_2; + var this_2 = this, + out_i_2; for (var i = 0; i < len; i++) { _loop_2(i); i = out_i_2; @@ -352,20 +517,33 @@ var TestScheduler = (function (_super) { throw new Error('animate() was not called within run()'); } map.delete(handle); - }, + } }; var animate = function (marbles) { var e_1, _a; if (map) { - throw new Error('animate() must not be called more than once within run()'); + throw new Error( + 'animate() must not be called more than once within run()' + ); } if (/[|#]/.test(marbles)) { throw new Error('animate() must not complete or error'); } map = new Map(); - var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); + var messages = TestScheduler.parseMarbles( + marbles, + undefined, + undefined, + undefined, + true + ); try { - for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) { + for ( + var messages_1 = __values(messages), + messages_1_1 = messages_1.next(); + !messages_1_1.done; + messages_1_1 = messages_1.next() + ) { var message = messages_1_1.value; _this.schedule(function () { var e_2, _a; @@ -373,27 +551,45 @@ var TestScheduler = (function (_super) { var callbacks = Array.from(map.values()); map.clear(); try { - for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) { + for ( + var callbacks_1 = + ((e_2 = void 0), __values(callbacks)), + callbacks_1_1 = callbacks_1.next(); + !callbacks_1_1.done; + callbacks_1_1 = callbacks_1.next() + ) { var callback = callbacks_1_1.value; callback(now); } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { try { - if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1); + if ( + callbacks_1_1 && + !callbacks_1_1.done && + (_a = callbacks_1.return) + ) + _a.call(callbacks_1); + } finally { + if (e_2) throw e_2.error; } - finally { if (e_2) throw e_2.error; } } }, message.frame); } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { try { - if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1); + if ( + messages_1_1 && + !messages_1_1.done && + (_a = messages_1.return) + ) + _a.call(messages_1); + } finally { + if (e_1) throw e_1.error; } - finally { if (e_1) throw e_1.error; } } }; return { animate: animate, delegate: delegate }; @@ -414,7 +610,9 @@ var TestScheduler = (function (_super) { return type === 'immediate'; }); if (dueImmediates.length > 0) { - var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler; + var _a = dueImmediates[0], + handle = _a.handle, + handler = _a.handler; scheduleLookup.delete(handle); handler(); return; @@ -425,7 +623,8 @@ var TestScheduler = (function (_super) { }); if (dueIntervals.length > 0) { var firstDueInterval = dueIntervals[0]; - var duration = firstDueInterval.duration, handler = firstDueInterval.handler; + var duration = firstDueInterval.duration, + handler = firstDueInterval.handler; firstDueInterval.due = now + duration; firstDueInterval.subscription = _this.schedule(run, duration); handler(); @@ -436,7 +635,9 @@ var TestScheduler = (function (_super) { return type === 'timeout'; }); if (dueTimeouts.length > 0) { - var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler; + var _b = dueTimeouts[0], + handle = _b.handle, + handler = _b.handler; scheduleLookup.delete(handle); handler(); return; @@ -452,7 +653,7 @@ var TestScheduler = (function (_super) { handle: handle, handler: handler, subscription: _this.schedule(run, 0), - type: 'immediate', + type: 'immediate' }); return handle; }, @@ -462,11 +663,13 @@ var TestScheduler = (function (_super) { value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; var interval = { setInterval: function (handler, duration) { - if (duration === void 0) { duration = 0; } + if (duration === void 0) { + duration = 0; + } var handle = ++lastHandle; scheduleLookup.set(handle, { due: _this.now() + duration, @@ -474,7 +677,7 @@ var TestScheduler = (function (_super) { handle: handle, handler: handler, subscription: _this.schedule(run, duration), - type: 'interval', + type: 'interval' }); return handle; }, @@ -484,11 +687,13 @@ var TestScheduler = (function (_super) { value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; var timeout = { setTimeout: function (handler, duration) { - if (duration === void 0) { duration = 0; } + if (duration === void 0) { + duration = 0; + } var handle = ++lastHandle; scheduleLookup.set(handle, { due: _this.now() + duration, @@ -496,7 +701,7 @@ var TestScheduler = (function (_super) { handle: handle, handler: handler, subscription: _this.schedule(run, duration), - type: 'timeout', + type: 'timeout' }); return handle; }, @@ -506,7 +711,7 @@ var TestScheduler = (function (_super) { value.subscription.unsubscribe(); scheduleLookup.delete(handle); } - }, + } }; return { immediate: immediate, interval: interval, timeout: timeout }; }; @@ -531,14 +736,13 @@ var TestScheduler = (function (_super) { time: this.createTime.bind(this), expectObservable: this.expectObservable.bind(this), expectSubscriptions: this.expectSubscriptions.bind(this), - animate: animator.animate, + animate: animator.animate }; try { var ret = callback(helpers); this.flush(); return ret; - } - finally { + } finally { TestScheduler.frameTimeFactor = prevFrameTimeFactor; this.maxFrames = prevMaxFrames; this.runMode = false; @@ -552,6 +756,6 @@ var TestScheduler = (function (_super) { }; TestScheduler.frameTimeFactor = 10; return TestScheduler; -}(VirtualTimeScheduler)); +})(VirtualTimeScheduler); export { TestScheduler }; -//# sourceMappingURL=TestScheduler.js.map \ No newline at end of file +//# sourceMappingURL=TestScheduler.js.map diff --git a/package-lock.json b/package-lock.json index 1b913dfb4..f73737d53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "auto-assign-issue", - "version": "1.2.0", + "version": "1.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bf18c9d32..ad304181a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "auto-assign-issue", - "version": "1.2.0", + "version": "1.4.0", "private": true, "description": "GitHub action that auto-assigns issues to users", "main": "src/index.js",