From 4a9255e6d1232a37819a5bf79db4e3388118cad2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:15:46 +0000 Subject: [PATCH 01/82] chore(deps): update dependency jest to v29.6.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a82ec467..4b8c637e 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "eslint": "8.47.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", - "jest": "29.6.2", + "jest": "29.6.3", "karma": "6.4.2", "karma-babel-preprocessor": "8.0.2", "karma-browserify": "8.1.0", From 84be86a62685cc9522e70fec0100f76691d9a7c5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 08:20:06 +0000 Subject: [PATCH 02/82] chore(deps): update dependency rollup to v3.28.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b8c637e..ac036e28 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.1", - "rollup": "3.28.0", + "rollup": "3.28.1", "@rollup/plugin-terser": "0.4.3", "testcafe": "3.2.0", "ts-node": "10.9.1", From b825e0606fc27379f4bc829a3eab0b970d96816b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 11:30:10 +0000 Subject: [PATCH 03/82] chore(deps): update dependency concurrently to v8.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ac036e28..a7f31ce0 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "browserify": "17.0.0", "child-process-promise": "2.2.1", "clone": "2.1.2", - "concurrently": "8.2.0", + "concurrently": "8.2.1", "convert-hrtime": "5.0.0", "copyfiles": "2.4.1", "cross-env": "7.0.3", From ec0d7ca45dcd77826b812c78de02ce7dea25b6dd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 12:25:53 +0000 Subject: [PATCH 04/82] chore(deps): update dependency jest to v29.6.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a7f31ce0..e7ee6a02 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "eslint": "8.47.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", - "jest": "29.6.3", + "jest": "29.6.4", "karma": "6.4.2", "karma-babel-preprocessor": "8.0.2", "karma-browserify": "8.1.0", From a743e0b5a05203e09b66f6786ab990aa9ff867f3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 20:47:46 +0000 Subject: [PATCH 05/82] chore(deps): update dependency typescript to v5.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e7ee6a02..b1c292f8 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "@rollup/plugin-terser": "0.4.3", "testcafe": "3.2.0", "ts-node": "10.9.1", - "typescript": "5.1.6", + "typescript": "5.2.2", "uglify-js": "3.17.4", "watchify": "4.0.0", "webpack": "5.88.2", From e6102c4d1b533ad0e06669bff4e24cf8d2e2df0d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 23:46:23 +0000 Subject: [PATCH 06/82] chore(deps): update babel monorepo to v7.22.11 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b1c292f8..23a47854 100644 --- a/package.json +++ b/package.json @@ -91,21 +91,21 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.22.10", + "@babel/runtime": "7.22.11", "oblivious-set": "1.1.1", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { "@babel/cli": "7.22.10", - "@babel/core": "7.22.10", + "@babel/core": "7.22.11", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.22.5", "@babel/plugin-transform-property-literals": "7.22.5", "@babel/plugin-transform-runtime": "7.22.10", "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.22.10", - "@babel/types": "7.22.10", + "@babel/types": "7.22.11", "@types/core-js": "2.5.5", "assert": "2.0.0", "async-test-util": "2.1.0", From 7b74c57e6c34abf38b6d3bd467e013e15793d07c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 22:50:39 +0000 Subject: [PATCH 07/82] chore(deps): update dependency eslint to v8.48.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 23a47854..46ae5075 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "copyfiles": "2.4.1", "cross-env": "7.0.3", "detect-node": "2.1.0", - "eslint": "8.47.0", + "eslint": "8.48.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.6.4", From 38086550b18a5f6725b3a660b5d950bc66215597 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:44:35 +0000 Subject: [PATCH 08/82] chore(deps): update dependency testcafe to v3.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46ae5075..4cb5338c 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "rimraf": "5.0.1", "rollup": "3.28.1", "@rollup/plugin-terser": "0.4.3", - "testcafe": "3.2.0", + "testcafe": "3.3.0", "ts-node": "10.9.1", "typescript": "5.2.2", "uglify-js": "3.17.4", From 45ae165f2ae756232fefd4d14f6a05b9ad6c0853 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Aug 2023 16:36:12 +0000 Subject: [PATCH 09/82] chore(deps): update dependency @babel/preset-env to v7.22.14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4cb5338c..80b23154 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "@babel/plugin-transform-property-literals": "7.22.5", "@babel/plugin-transform-runtime": "7.22.10", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.22.10", + "@babel/preset-env": "7.22.14", "@babel/types": "7.22.11", "@types/core-js": "2.5.5", "assert": "2.0.0", From f7c1d69c994c866affc9180a1859216e239c4cdb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:10:52 +0000 Subject: [PATCH 10/82] chore(deps): update babel monorepo to v7.22.15 --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 80b23154..0db1f02b 100644 --- a/package.json +++ b/package.json @@ -91,21 +91,21 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.22.11", + "@babel/runtime": "7.22.15", "oblivious-set": "1.1.1", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { - "@babel/cli": "7.22.10", - "@babel/core": "7.22.11", + "@babel/cli": "7.22.15", + "@babel/core": "7.22.15", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.22.5", "@babel/plugin-transform-property-literals": "7.22.5", - "@babel/plugin-transform-runtime": "7.22.10", + "@babel/plugin-transform-runtime": "7.22.15", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.22.14", - "@babel/types": "7.22.11", + "@babel/preset-env": "7.22.15", + "@babel/types": "7.22.15", "@types/core-js": "2.5.5", "assert": "2.0.0", "async-test-util": "2.1.0", From 00769e0d66dcaf7e3c09d18bd12c79adf6895e8f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 19:00:56 +0000 Subject: [PATCH 11/82] chore(deps): update dependency @types/core-js to v2.5.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0db1f02b..9dd740d7 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.22.15", "@babel/types": "7.22.15", - "@types/core-js": "2.5.5", + "@types/core-js": "2.5.6", "assert": "2.0.0", "async-test-util": "2.1.0", "browserify": "17.0.0", From fb5d5e54b98174c685ce3285c6a0b93d6af0258d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 08:25:25 +0000 Subject: [PATCH 12/82] chore(deps): update dependency rollup to v3.29.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9dd740d7..a535e4ee 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.1", - "rollup": "3.28.1", + "rollup": "3.29.0", "@rollup/plugin-terser": "0.4.3", "testcafe": "3.3.0", "ts-node": "10.9.1", From eda03fdd1190ee1b900024b896f75a9cbe12d734 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 21:54:59 +0000 Subject: [PATCH 13/82] chore(deps): update dependency assert to v2.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a535e4ee..36ae0847 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@babel/preset-env": "7.22.15", "@babel/types": "7.22.15", "@types/core-js": "2.5.6", - "assert": "2.0.0", + "assert": "2.1.0", "async-test-util": "2.1.0", "browserify": "17.0.0", "child-process-promise": "2.2.1", From c8968c52547feff14619a7f660f16e2f80c12078 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:20:42 +0000 Subject: [PATCH 14/82] chore(deps): update babel monorepo to v7.22.17 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 36ae0847..42aa1980 100644 --- a/package.json +++ b/package.json @@ -98,14 +98,14 @@ }, "devDependencies": { "@babel/cli": "7.22.15", - "@babel/core": "7.22.15", + "@babel/core": "7.22.17", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.22.5", "@babel/plugin-transform-property-literals": "7.22.5", "@babel/plugin-transform-runtime": "7.22.15", "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.22.15", - "@babel/types": "7.22.15", + "@babel/types": "7.22.17", "@types/core-js": "2.5.6", "assert": "2.1.0", "async-test-util": "2.1.0", From da7adc0c410f295e1d88e6c36688c01b4fd9c683 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 10 Sep 2023 07:12:35 +0000 Subject: [PATCH 15/82] chore(deps): update dependency rollup to v3.29.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 42aa1980..1f20455d 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.1", - "rollup": "3.29.0", + "rollup": "3.29.1", "@rollup/plugin-terser": "0.4.3", "testcafe": "3.3.0", "ts-node": "10.9.1", From 4b7c03fb982e48dba2dfa6a8436cb7d50389f72a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 10 Sep 2023 09:54:48 +0000 Subject: [PATCH 16/82] chore(deps): update dependency eslint to v8.49.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f20455d..4b70bce7 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "copyfiles": "2.4.1", "cross-env": "7.0.3", "detect-node": "2.1.0", - "eslint": "8.48.0", + "eslint": "8.49.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.6.4", From ca07e54ee3999693da0cb64361f8b184dfaccbfb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 07:45:48 +0000 Subject: [PATCH 17/82] chore(deps): update dependency jest to v29.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b70bce7..3ce774a0 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "eslint": "8.49.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", - "jest": "29.6.4", + "jest": "29.7.0", "karma": "6.4.2", "karma-babel-preprocessor": "8.0.2", "karma-browserify": "8.1.0", From fd051543b3f2b465bb28a65a6eccff0e0e6bd1ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 21:26:01 +0000 Subject: [PATCH 18/82] chore(deps): update dependency async-test-util to v2.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ce774a0..7361ce15 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "@babel/types": "7.22.17", "@types/core-js": "2.5.6", "assert": "2.1.0", - "async-test-util": "2.1.0", + "async-test-util": "2.1.1", "browserify": "17.0.0", "child-process-promise": "2.2.1", "clone": "2.1.2", From 9ba49402717baf5415a70a6a2cf712defa1c346d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:54:23 +0000 Subject: [PATCH 19/82] chore(deps): update babel monorepo to v7.22.19 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7361ce15..fe9379c2 100644 --- a/package.json +++ b/package.json @@ -98,14 +98,14 @@ }, "devDependencies": { "@babel/cli": "7.22.15", - "@babel/core": "7.22.17", + "@babel/core": "7.22.19", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.22.5", "@babel/plugin-transform-property-literals": "7.22.5", "@babel/plugin-transform-runtime": "7.22.15", "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.22.15", - "@babel/types": "7.22.17", + "@babel/types": "7.22.19", "@types/core-js": "2.5.6", "assert": "2.1.0", "async-test-util": "2.1.1", From 6048b7e5ad10c6a2612bb24dd5d4cc24deb41c5a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 23:09:13 +0000 Subject: [PATCH 20/82] chore(deps): update dependency rollup to v3.29.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fe9379c2..7613227e 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.1", - "rollup": "3.29.1", + "rollup": "3.29.2", "@rollup/plugin-terser": "0.4.3", "testcafe": "3.3.0", "ts-node": "10.9.1", From 837762c516e3a99ddd14bdbf502d2e2a2a895b1b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 16 Sep 2023 17:04:39 +0000 Subject: [PATCH 21/82] chore(deps): update babel monorepo to v7.22.20 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7613227e..5ef6f945 100644 --- a/package.json +++ b/package.json @@ -98,13 +98,13 @@ }, "devDependencies": { "@babel/cli": "7.22.15", - "@babel/core": "7.22.19", + "@babel/core": "7.22.20", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.22.5", "@babel/plugin-transform-property-literals": "7.22.5", "@babel/plugin-transform-runtime": "7.22.15", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.22.15", + "@babel/preset-env": "7.22.20", "@babel/types": "7.22.19", "@types/core-js": "2.5.6", "assert": "2.1.0", From cdb4991e0ae71b3857635b16f627024ba539c8b9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 00:30:59 +0200 Subject: [PATCH 22/82] chore(deps): update actions/checkout action to v4 (#1254) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 4 ++-- .github/workflows/prevent-commit-to-generated.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7d5ad0d1..c7e3e232 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows - name: Reuse npm cache folder @@ -91,7 +91,7 @@ jobs: matrix: node: ['17.3.0', '18.12.1'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node.js environment uses: actions/setup-node@v3.8.1 with: diff --git a/.github/workflows/prevent-commit-to-generated.yml b/.github/workflows/prevent-commit-to-generated.yml index bf06bc12..97a0061e 100644 --- a/.github/workflows/prevent-commit-to-generated.yml +++ b/.github/workflows/prevent-commit-to-generated.yml @@ -10,6 +10,6 @@ jobs: warn-user: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Warn User to not commit generated files run: bash -c 'echo "You have commited generated files (from the dist folder), this is not allowed. You can only commit files that you have manually edited" && exit 1' From 6029e2db71df6528dda4773ab465cd0ce2725ecd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 24 Sep 2023 07:40:44 +0000 Subject: [PATCH 23/82] chore(deps): update dependency rollup to v3.29.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ef6f945..07755aae 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.1", - "rollup": "3.29.2", + "rollup": "3.29.3", "@rollup/plugin-terser": "0.4.3", "testcafe": "3.3.0", "ts-node": "10.9.1", From c5357f5af21f4fee4c3505dfd56fafdc90b6fae7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 22:47:39 +0000 Subject: [PATCH 24/82] chore(deps): update dependency rimraf to v5.0.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 07755aae..841a1262 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "pre-commit": "1.2.2", "random-int": "3.0.0", "random-token": "0.0.8", - "rimraf": "5.0.1", + "rimraf": "5.0.4", "rollup": "3.29.3", "@rollup/plugin-terser": "0.4.3", "testcafe": "3.3.0", From 982162df5029039f40bd5beab0090670bdbb2f67 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 01:44:46 +0000 Subject: [PATCH 25/82] chore(deps): update babel monorepo --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 841a1262..2197379e 100644 --- a/package.json +++ b/package.json @@ -91,21 +91,21 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.22.15", + "@babel/runtime": "7.23.1", "oblivious-set": "1.1.1", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { - "@babel/cli": "7.22.15", - "@babel/core": "7.22.20", + "@babel/cli": "7.23.0", + "@babel/core": "7.23.0", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.22.5", "@babel/plugin-transform-property-literals": "7.22.5", "@babel/plugin-transform-runtime": "7.22.15", "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.22.20", - "@babel/types": "7.22.19", + "@babel/types": "7.23.0", "@types/core-js": "2.5.6", "assert": "2.1.0", "async-test-util": "2.1.1", From 1035704a5c3633b6b6baf2b8d5e141e1abc56f0a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 03:08:23 +0000 Subject: [PATCH 26/82] chore(deps): update dependency eslint to v8.50.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2197379e..5bb7b81c 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "copyfiles": "2.4.1", "cross-env": "7.0.3", "detect-node": "2.1.0", - "eslint": "8.49.0", + "eslint": "8.50.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.7.0", From ca7ce044b738651f33fe7f7747580a52ed7553bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 07:32:34 +0000 Subject: [PATCH 27/82] chore(deps): update dependency rimraf to v5.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5bb7b81c..8d806872 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "pre-commit": "1.2.2", "random-int": "3.0.0", "random-token": "0.0.8", - "rimraf": "5.0.4", + "rimraf": "5.0.5", "rollup": "3.29.3", "@rollup/plugin-terser": "0.4.3", "testcafe": "3.3.0", From 4eb04e1a7e894cfccc77d731cb040433c3e0c907 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:37:23 +0000 Subject: [PATCH 28/82] chore(deps): update dependency eslint to v8.51.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8d806872..457dd5df 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "copyfiles": "2.4.1", "cross-env": "7.0.3", "detect-node": "2.1.0", - "eslint": "8.50.0", + "eslint": "8.51.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.7.0", From a9d0fc7d32235c82a8dbf469a5321a260e3d8667 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 7 Oct 2023 02:21:47 +0000 Subject: [PATCH 29/82] chore(deps): update dependency rollup to v3.29.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 457dd5df..446d6000 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.5", - "rollup": "3.29.3", + "rollup": "3.29.4", "@rollup/plugin-terser": "0.4.3", "testcafe": "3.3.0", "ts-node": "10.9.1", From 3a21c7198e0c4cab7569e7ec99bd449d1803ea54 Mon Sep 17 00:00:00 2001 From: Daniel Meyer <8926560+pubkey@users.noreply.github.com> Date: Mon, 9 Oct 2023 01:33:25 +0200 Subject: [PATCH 30/82] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c7e3e232..3570f6f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: # install - name: install node modules - run: npm install + run: npm install --legacy-peer-deps - name: build run: npm run build @@ -115,7 +115,7 @@ jobs: ${{ runner.os }}-test-node - name: install node modules - run: npm install + run: npm install --legacy-peer-deps - name: build run: npm run build From ee92f439fb4a1ea4b2e17902764af42ee2c7a587 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 8 Oct 2023 23:33:40 +0000 Subject: [PATCH 31/82] chore(deps): update dependency @rollup/plugin-terser to v0.4.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 446d6000..164cc517 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "random-token": "0.0.8", "rimraf": "5.0.5", "rollup": "3.29.4", - "@rollup/plugin-terser": "0.4.3", + "@rollup/plugin-terser": "0.4.4", "testcafe": "3.3.0", "ts-node": "10.9.1", "typescript": "5.2.2", From 1e6ca4b72feca553f6ad2c3ad4ad855c73854d60 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Tue, 10 Oct 2023 15:49:03 +0200 Subject: [PATCH 32/82] FIX p-queue is not a constructor --- CHANGELOG.md | 2 ++ src/methods/node.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6033cd6e..35ed12ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## X.X.X (comming soon) +- FIX import of `p-queue` throws `is not a constructor` + ## 5.3.0 (18 August 2023) https://github.com/pubkey/broadcast-channel/pull/1243 diff --git a/src/methods/node.js b/src/methods/node.js index 323f6768..e27626e2 100644 --- a/src/methods/node.js +++ b/src/methods/node.js @@ -11,6 +11,7 @@ import events from 'events'; import net from 'net'; import path from 'path'; import PQueue from 'p-queue'; +const PQueueConstructor = PQueue.default ? PQueue.default : PQueue; import { add as unloadAdd } from 'unload'; @@ -399,7 +400,7 @@ export async function create(channelName, options = {}) { * which could throw an error. * Must always be smaller than options.node.maxParallelWrites */ - writeFileQueue: new PQueue({ concurrency: options.node.maxParallelWrites }), + writeFileQueue: new PQueueConstructor({ concurrency: options.node.maxParallelWrites }), messagesCallbackTime: null, messagesCallback: null, // ensures we do not read messages in parallel From add57278555a91441f01734db8f42a2311d6a088 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 15:51:52 +0200 Subject: [PATCH 33/82] chore(deps): update dependency rollup to v4 (#1273) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 164cc517..3bd79c35 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.5", - "rollup": "3.29.4", + "rollup": "4.0.2", "@rollup/plugin-terser": "0.4.4", "testcafe": "3.3.0", "ts-node": "10.9.1", From c393b514a2dfa31510bb232ecc85b16f91fe5300 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:08:13 +0200 Subject: [PATCH 34/82] 5.4.0 --- CHANGELOG.md | 2 + dist/es5node/broadcast-channel.js | 6 +- dist/es5node/leader-election-web-lock.js | 3 +- dist/es5node/methods/indexed-db.js | 14 +- dist/es5node/methods/localstorage.js | 11 +- dist/es5node/methods/native.js | 11 +- dist/es5node/methods/node.js | 9 +- dist/es5node/methods/simulate.js | 11 +- dist/es5node/util.js | 9 +- dist/esbrowser/methods/node.js | 3 +- dist/esnode/methods/node.js | 3 +- dist/lib/broadcast-channel.js | 6 +- dist/lib/browser.js | 69 +- dist/lib/browser.min.js | 2 +- dist/lib/leader-election-web-lock.js | 3 +- dist/lib/methods/indexed-db.js | 14 +- dist/lib/methods/localstorage.js | 11 +- dist/lib/methods/native.js | 11 +- dist/lib/methods/node.js | 9 +- dist/lib/methods/simulate.js | 11 +- dist/lib/util.js | 9 +- docs/e2e.js | 1429 ++++++++++++---------- docs/iframe.js | 69 +- docs/index.js | 69 +- docs/leader-iframe.js | 69 +- docs/worker.js | 1030 +++++++++------- package.json | 2 +- 27 files changed, 1476 insertions(+), 1419 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35ed12ae..50c9d1d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## X.X.X (comming soon) +## 5.4.0 (10 October 2023) + - FIX import of `p-queue` throws `is not a constructor` ## 5.3.0 (18 August 2023) diff --git a/dist/es5node/broadcast-channel.js b/dist/es5node/broadcast-channel.js index a67acd6a..07f70413 100644 --- a/dist/es5node/broadcast-channel.js +++ b/dist/es5node/broadcast-channel.js @@ -13,10 +13,9 @@ var _options = require("./options.js"); * Contains all open channels, * used in tests to ensure everything is closed. */ -var OPEN_BROADCAST_CHANNELS = new Set(); -exports.OPEN_BROADCAST_CHANNELS = OPEN_BROADCAST_CHANNELS; +var OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set(); var lastId = 0; -var BroadcastChannel = function BroadcastChannel(name, options) { +var BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) { // identifier of the channel to debug stuff this.id = lastId++; OPEN_BROADCAST_CHANNELS.add(this); @@ -73,7 +72,6 @@ var BroadcastChannel = function BroadcastChannel(name, options) { * window.BroadcastChannel with this * See methods/native.js */ -exports.BroadcastChannel = BroadcastChannel; BroadcastChannel._pubkey = true; /** diff --git a/dist/es5node/leader-election-web-lock.js b/dist/es5node/leader-election-web-lock.js index bd245d9f..7eee9a40 100644 --- a/dist/es5node/leader-election-web-lock.js +++ b/dist/es5node/leader-election-web-lock.js @@ -10,7 +10,7 @@ var _leaderElectionUtil = require("./leader-election-util.js"); * A faster version of the leader elector that uses the WebLock API * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API */ -var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { +var LeaderElectionWebLock = exports.LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { var _this = this; this.broadcastChannel = broadcastChannel; broadcastChannel._befC.push(function () { @@ -30,7 +30,6 @@ var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, opt // lock name this.lN = 'pubkey-bc||' + broadcastChannel.method.type + '||' + broadcastChannel.name; }; -exports.LeaderElectionWebLock = LeaderElectionWebLock; LeaderElectionWebLock.prototype = { hasLeader: function hasLeader() { var _this2 = this; diff --git a/dist/es5node/methods/indexed-db.js b/dist/es5node/methods/indexed-db.js index 2e01a260..0a6e499c 100644 --- a/dist/es5node/methods/indexed-db.js +++ b/dist/es5node/methods/indexed-db.js @@ -33,8 +33,7 @@ var _options = require("../options.js"); * @link https://rxdb.info/slow-indexeddb.html */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var DB_PREFIX = 'pubkey.broadcast-channel-0-'; var OBJECT_STORE_ID = 'messages'; @@ -42,12 +41,10 @@ var OBJECT_STORE_ID = 'messages'; * Use relaxed durability for faster performance on all transactions. * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/ */ -var TRANSACTION_SETTINGS = { +var TRANSACTION_SETTINGS = exports.TRANSACTION_SETTINGS = { durability: 'relaxed' }; -exports.TRANSACTION_SETTINGS = TRANSACTION_SETTINGS; -var type = 'idb'; -exports.type = type; +var type = exports.type = 'idb'; function getIdb() { if (typeof indexedDB !== 'undefined') return indexedDB; if (typeof window !== 'undefined') { @@ -359,7 +356,7 @@ function canBeUsed() { function averageResponseTime(options) { return options.idb.fallbackInterval * 2; } -var IndexedDBMethod = { +var IndexedDBMethod = exports.IndexedDBMethod = { create: create, close: close, onMessage: onMessage, @@ -368,5 +365,4 @@ var IndexedDBMethod = { type: type, averageResponseTime: averageResponseTime, microSeconds: microSeconds -}; -exports.IndexedDBMethod = IndexedDBMethod; \ No newline at end of file +}; \ No newline at end of file diff --git a/dist/es5node/methods/localstorage.js b/dist/es5node/methods/localstorage.js index ef1e45fa..60ca6d1c 100644 --- a/dist/es5node/methods/localstorage.js +++ b/dist/es5node/methods/localstorage.js @@ -27,16 +27,14 @@ var _util = require("../util.js"); * @link https://caniuse.com/#feat=indexeddb */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var KEY_PREFIX = 'pubkey.broadcastChannel-'; -var type = 'localstorage'; +var type = exports.type = 'localstorage'; /** * copied from crosstab * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 */ -exports.type = type; function getLocalStorage() { var localStorage; if (typeof window === 'undefined') return null; @@ -159,7 +157,7 @@ function averageResponseTime() { } return defaultTime; } -var LocalstorageMethod = { +var LocalstorageMethod = exports.LocalstorageMethod = { create: create, close: close, onMessage: onMessage, @@ -168,5 +166,4 @@ var LocalstorageMethod = { type: type, averageResponseTime: averageResponseTime, microSeconds: microSeconds -}; -exports.LocalstorageMethod = LocalstorageMethod; \ No newline at end of file +}; \ No newline at end of file diff --git a/dist/es5node/methods/native.js b/dist/es5node/methods/native.js index 245b6995..0f656ca2 100644 --- a/dist/es5node/methods/native.js +++ b/dist/es5node/methods/native.js @@ -13,10 +13,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'native'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'native'; function create(channelName) { var state = { messagesCallback: null, @@ -59,7 +57,7 @@ function canBeUsed() { function averageResponseTime() { return 150; } -var NativeMethod = { +var NativeMethod = exports.NativeMethod = { create: create, close: close, onMessage: onMessage, @@ -68,5 +66,4 @@ var NativeMethod = { type: type, averageResponseTime: averageResponseTime, microSeconds: microSeconds -}; -exports.NativeMethod = NativeMethod; \ No newline at end of file +}; \ No newline at end of file diff --git a/dist/es5node/methods/node.js b/dist/es5node/methods/node.js index 5a9f013c..e67c3425 100644 --- a/dist/es5node/methods/node.js +++ b/dist/es5node/methods/node.js @@ -53,6 +53,7 @@ var _obliviousSet = require("oblivious-set"); * The ipc is handled via sockets and file-writes to the tmp-folder */ +var PQueueConstructor = _pQueue["default"]["default"] ? _pQueue["default"]["default"] : _pQueue["default"]; /** * windows sucks, so we have handle windows-type of socket-paths * @link https://gist.github.com/domenic/2790533#gistcomment-331356 @@ -105,8 +106,7 @@ var removeDir = /*#__PURE__*/function () { }(); var OTHER_INSTANCES = {}; var TMP_FOLDER_NAME = 'pubkey.bc'; -var TMP_FOLDER_BASE = _path["default"].join(_os["default"].tmpdir(), TMP_FOLDER_NAME); -exports.TMP_FOLDER_BASE = TMP_FOLDER_BASE; +var TMP_FOLDER_BASE = exports.TMP_FOLDER_BASE = _path["default"].join(_os["default"].tmpdir(), TMP_FOLDER_NAME); var getPathsCache = new Map(); function getPaths(channelName) { if (!getPathsCache.has(channelName)) { @@ -587,13 +587,12 @@ function _cleanOldMessages() { })); return _cleanOldMessages.apply(this, arguments); } -var type = 'node'; +var type = exports.type = 'node'; /** * creates a new channelState * @return {Promise} */ -exports.type = type; function create(_x20) { return _create.apply(this, arguments); } @@ -631,7 +630,7 @@ function _create() { * which could throw an error. * Must always be smaller than options.node.maxParallelWrites */ - writeFileQueue: new _pQueue["default"]({ + writeFileQueue: new PQueueConstructor({ concurrency: options.node.maxParallelWrites }), messagesCallbackTime: null, diff --git a/dist/es5node/methods/simulate.js b/dist/es5node/methods/simulate.js index 4ae3ab40..99077bad 100644 --- a/dist/es5node/methods/simulate.js +++ b/dist/es5node/methods/simulate.js @@ -13,10 +13,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'simulate'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { @@ -55,7 +53,7 @@ function canBeUsed() { function averageResponseTime() { return 5; } -var SimulateMethod = { +var SimulateMethod = exports.SimulateMethod = { create: create, close: close, onMessage: onMessage, @@ -64,5 +62,4 @@ var SimulateMethod = { type: type, averageResponseTime: averageResponseTime, microSeconds: microSeconds -}; -exports.SimulateMethod = SimulateMethod; \ No newline at end of file +}; \ No newline at end of file diff --git a/dist/es5node/util.js b/dist/es5node/util.js index 50574b0f..d0a1d4b3 100644 --- a/dist/es5node/util.js +++ b/dist/es5node/util.js @@ -16,12 +16,9 @@ exports.supportsWebLockAPI = supportsWebLockAPI; function isPromise(obj) { return obj && typeof obj.then === 'function'; } -var PROMISE_RESOLVED_FALSE = Promise.resolve(false); -exports.PROMISE_RESOLVED_FALSE = PROMISE_RESOLVED_FALSE; -var PROMISE_RESOLVED_TRUE = Promise.resolve(true); -exports.PROMISE_RESOLVED_TRUE = PROMISE_RESOLVED_TRUE; -var PROMISE_RESOLVED_VOID = Promise.resolve(); -exports.PROMISE_RESOLVED_VOID = PROMISE_RESOLVED_VOID; +var PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false); +var PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true); +var PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve(); function sleep(time, resolveWith) { if (!time) time = 0; return new Promise(function (res) { diff --git a/dist/esbrowser/methods/node.js b/dist/esbrowser/methods/node.js index 39db0ea5..31bd7da1 100644 --- a/dist/esbrowser/methods/node.js +++ b/dist/esbrowser/methods/node.js @@ -13,6 +13,7 @@ import events from 'events'; import net from 'net'; import path from 'path'; import PQueue from 'p-queue'; +var PQueueConstructor = PQueue["default"] ? PQueue["default"] : PQueue; import { add as unloadAdd } from 'unload'; import { fillOptionsWithDefaults } from '../options.js'; import { randomInt, randomToken, PROMISE_RESOLVED_VOID } from '../util.js'; @@ -596,7 +597,7 @@ function _create() { * which could throw an error. * Must always be smaller than options.node.maxParallelWrites */ - writeFileQueue: new PQueue({ + writeFileQueue: new PQueueConstructor({ concurrency: options.node.maxParallelWrites }), messagesCallbackTime: null, diff --git a/dist/esnode/methods/node.js b/dist/esnode/methods/node.js index 39db0ea5..31bd7da1 100644 --- a/dist/esnode/methods/node.js +++ b/dist/esnode/methods/node.js @@ -13,6 +13,7 @@ import events from 'events'; import net from 'net'; import path from 'path'; import PQueue from 'p-queue'; +var PQueueConstructor = PQueue["default"] ? PQueue["default"] : PQueue; import { add as unloadAdd } from 'unload'; import { fillOptionsWithDefaults } from '../options.js'; import { randomInt, randomToken, PROMISE_RESOLVED_VOID } from '../util.js'; @@ -596,7 +597,7 @@ function _create() { * which could throw an error. * Must always be smaller than options.node.maxParallelWrites */ - writeFileQueue: new PQueue({ + writeFileQueue: new PQueueConstructor({ concurrency: options.node.maxParallelWrites }), messagesCallbackTime: null, diff --git a/dist/lib/broadcast-channel.js b/dist/lib/broadcast-channel.js index a67acd6a..07f70413 100644 --- a/dist/lib/broadcast-channel.js +++ b/dist/lib/broadcast-channel.js @@ -13,10 +13,9 @@ var _options = require("./options.js"); * Contains all open channels, * used in tests to ensure everything is closed. */ -var OPEN_BROADCAST_CHANNELS = new Set(); -exports.OPEN_BROADCAST_CHANNELS = OPEN_BROADCAST_CHANNELS; +var OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set(); var lastId = 0; -var BroadcastChannel = function BroadcastChannel(name, options) { +var BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) { // identifier of the channel to debug stuff this.id = lastId++; OPEN_BROADCAST_CHANNELS.add(this); @@ -73,7 +72,6 @@ var BroadcastChannel = function BroadcastChannel(name, options) { * window.BroadcastChannel with this * See methods/native.js */ -exports.BroadcastChannel = BroadcastChannel; BroadcastChannel._pubkey = true; /** diff --git a/dist/lib/browser.js b/dist/lib/browser.js index f3f80ecc..47e13265 100644 --- a/dist/lib/browser.js +++ b/dist/lib/browser.js @@ -14,10 +14,9 @@ var _options = require("./options.js"); * Contains all open channels, * used in tests to ensure everything is closed. */ -var OPEN_BROADCAST_CHANNELS = new Set(); -exports.OPEN_BROADCAST_CHANNELS = OPEN_BROADCAST_CHANNELS; +var OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set(); var lastId = 0; -var BroadcastChannel = function BroadcastChannel(name, options) { +var BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) { // identifier of the channel to debug stuff this.id = lastId++; OPEN_BROADCAST_CHANNELS.add(this); @@ -74,7 +73,6 @@ var BroadcastChannel = function BroadcastChannel(name, options) { * window.BroadcastChannel with this * See methods/native.js */ -exports.BroadcastChannel = BroadcastChannel; BroadcastChannel._pubkey = true; /** @@ -412,7 +410,7 @@ var _leaderElectionUtil = require("./leader-election-util.js"); * A faster version of the leader elector that uses the WebLock API * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API */ -var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { +var LeaderElectionWebLock = exports.LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { var _this = this; this.broadcastChannel = broadcastChannel; broadcastChannel._befC.push(function () { @@ -432,7 +430,6 @@ var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, opt // lock name this.lN = 'pubkey-bc||' + broadcastChannel.method.type + '||' + broadcastChannel.name; }; -exports.LeaderElectionWebLock = LeaderElectionWebLock; LeaderElectionWebLock.prototype = { hasLeader: function hasLeader() { var _this2 = this; @@ -880,8 +877,7 @@ var _options = require("../options.js"); * @link https://rxdb.info/slow-indexeddb.html */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var DB_PREFIX = 'pubkey.broadcast-channel-0-'; var OBJECT_STORE_ID = 'messages'; @@ -889,12 +885,10 @@ var OBJECT_STORE_ID = 'messages'; * Use relaxed durability for faster performance on all transactions. * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/ */ -var TRANSACTION_SETTINGS = { +var TRANSACTION_SETTINGS = exports.TRANSACTION_SETTINGS = { durability: 'relaxed' }; -exports.TRANSACTION_SETTINGS = TRANSACTION_SETTINGS; -var type = 'idb'; -exports.type = type; +var type = exports.type = 'idb'; function getIdb() { if (typeof indexedDB !== 'undefined') return indexedDB; if (typeof window !== 'undefined') { @@ -1206,7 +1200,7 @@ function canBeUsed() { function averageResponseTime(options) { return options.idb.fallbackInterval * 2; } -var IndexedDBMethod = { +var IndexedDBMethod = exports.IndexedDBMethod = { create: create, close: close, onMessage: onMessage, @@ -1216,7 +1210,6 @@ var IndexedDBMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.IndexedDBMethod = IndexedDBMethod; },{"../options.js":13,"../util.js":14,"oblivious-set":16}],10:[function(require,module,exports){ "use strict"; @@ -1247,16 +1240,14 @@ var _util = require("../util.js"); * @link https://caniuse.com/#feat=indexeddb */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var KEY_PREFIX = 'pubkey.broadcastChannel-'; -var type = 'localstorage'; +var type = exports.type = 'localstorage'; /** * copied from crosstab * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 */ -exports.type = type; function getLocalStorage() { var localStorage; if (typeof window === 'undefined') return null; @@ -1379,7 +1370,7 @@ function averageResponseTime() { } return defaultTime; } -var LocalstorageMethod = { +var LocalstorageMethod = exports.LocalstorageMethod = { create: create, close: close, onMessage: onMessage, @@ -1389,7 +1380,6 @@ var LocalstorageMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.LocalstorageMethod = LocalstorageMethod; },{"../options.js":13,"../util.js":14,"oblivious-set":16}],11:[function(require,module,exports){ "use strict"; @@ -1406,10 +1396,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'native'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'native'; function create(channelName) { var state = { messagesCallback: null, @@ -1452,7 +1440,7 @@ function canBeUsed() { function averageResponseTime() { return 150; } -var NativeMethod = { +var NativeMethod = exports.NativeMethod = { create: create, close: close, onMessage: onMessage, @@ -1462,7 +1450,6 @@ var NativeMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.NativeMethod = NativeMethod; },{"../util.js":14}],12:[function(require,module,exports){ "use strict"; @@ -1479,10 +1466,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'simulate'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { @@ -1521,7 +1506,7 @@ function canBeUsed() { function averageResponseTime() { return 5; } -var SimulateMethod = { +var SimulateMethod = exports.SimulateMethod = { create: create, close: close, onMessage: onMessage, @@ -1531,7 +1516,6 @@ var SimulateMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.SimulateMethod = SimulateMethod; },{"../util.js":14}],13:[function(require,module,exports){ "use strict"; @@ -1591,12 +1575,9 @@ exports.supportsWebLockAPI = supportsWebLockAPI; function isPromise(obj) { return obj && typeof obj.then === 'function'; } -var PROMISE_RESOLVED_FALSE = Promise.resolve(false); -exports.PROMISE_RESOLVED_FALSE = PROMISE_RESOLVED_FALSE; -var PROMISE_RESOLVED_TRUE = Promise.resolve(true); -exports.PROMISE_RESOLVED_TRUE = PROMISE_RESOLVED_TRUE; -var PROMISE_RESOLVED_VOID = Promise.resolve(); -exports.PROMISE_RESOLVED_VOID = PROMISE_RESOLVED_VOID; +var PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false); +var PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true); +var PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve(); function sleep(time, resolveWith) { if (!time) time = 0; return new Promise(function (res) { @@ -1649,14 +1630,14 @@ function supportsWebLockAPI() { } } },{}],15:[function(require,module,exports){ -function _typeof(obj) { +function _typeof(o) { "@babel/helpers - typeof"; - return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); } module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],16:[function(require,module,exports){ diff --git a/dist/lib/browser.min.js b/dist/lib/browser.min.js index b4b7842b..bb35e749 100644 --- a/dist/lib/browser.min.js +++ b/dist/lib/browser.min.js @@ -1 +1 @@ -!function o(r,i,s){function a(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return a(r[t][1][e]||e)},n,n.exports,o,r,i,s)}return i[t].exports}for(var u="function"==typeof require&&require,e=0;e=t&&e.fn(n.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function h(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!d(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}(n.BroadcastChannel=o)._pubkey=!0,o.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return l(this,"message",e)},postInternal:function(e){return l(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};h(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,f(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();f(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});h(this,e,n)},close:function(){var e,t=this;if(!this.closed)return u.delete(this),this.closed=!0,e=this._prepP||i.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:19}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;function o(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,r.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}var r=e("./util.js"),i=e("./leader-election-util.js");(n.LeaderElectionWebLock=o).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,u.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,u.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,u.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,u.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=y,n.cleanOldMessages=v,n.close=g,n.commitIndexedDBTransaction=d,n.create=_,n.createDatabase=u,n.getAllMessages=function(e){var n=e.transaction(c,"readonly",l),o=n.objectStore(c),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=L,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=r.microSeconds,o=(n.microSeconds=e,"pubkey.broadcast-channel-0-"),c="messages",l={durability:"relaxed"};n.TRANSACTION_SETTINGS=l;function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function u(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(c,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:(new Date).getTime(),data:n},r=e.transaction([c],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(c).add(o),d(r)})}function h(e,o){var r,i=e.transaction(c,"readonly",l),s=i.objectStore(c),a=[],u=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(u),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return u=IDBKeyRange.bound(o+1,1/0),s.openCursor(u)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time=t&&e.fn(n.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function f(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!l(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}e._pubkey=!0,e.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return c(this,"message",e)},postInternal:function(e){return c(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};f(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,d(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();d(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});f(this,e,n)},close:function(){var e,t=this;if(!this.closed)return a.delete(this),this.closed=!0,e=this._prepP||r.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:19}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;var o=e("./util.js"),r=e("./leader-election-util.js");(n.LeaderElectionWebLock=function(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,o.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,u.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,u.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,u.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,u.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=y,n.cleanOldMessages=v,n.close=g,n.commitIndexedDBTransaction=d,n.create=_,n.createDatabase=u,n.getAllMessages=function(e){var n=e.transaction(c,"readonly",l),o=n.objectStore(c),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=L,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=n.microSeconds=r.microSeconds,o="pubkey.broadcast-channel-0-",c="messages",l=n.TRANSACTION_SETTINGS={durability:"relaxed"};n.type="idb";function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function u(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(c,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:(new Date).getTime(),data:n},r=e.transaction([c],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(c).add(o),d(r)})}function h(e,o){var r,i=e.transaction(c,"readonly",l),s=i.objectStore(c),a=[],u=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(u),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return u=IDBKeyRange.bound(o+1,1/0),s.openCursor(u)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time} */ -exports.type = type; function create(_x20) { return _create.apply(this, arguments); } @@ -631,7 +630,7 @@ function _create() { * which could throw an error. * Must always be smaller than options.node.maxParallelWrites */ - writeFileQueue: new _pQueue["default"]({ + writeFileQueue: new PQueueConstructor({ concurrency: options.node.maxParallelWrites }), messagesCallbackTime: null, diff --git a/dist/lib/methods/simulate.js b/dist/lib/methods/simulate.js index 4ae3ab40..99077bad 100644 --- a/dist/lib/methods/simulate.js +++ b/dist/lib/methods/simulate.js @@ -13,10 +13,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'simulate'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { @@ -55,7 +53,7 @@ function canBeUsed() { function averageResponseTime() { return 5; } -var SimulateMethod = { +var SimulateMethod = exports.SimulateMethod = { create: create, close: close, onMessage: onMessage, @@ -64,5 +62,4 @@ var SimulateMethod = { type: type, averageResponseTime: averageResponseTime, microSeconds: microSeconds -}; -exports.SimulateMethod = SimulateMethod; \ No newline at end of file +}; \ No newline at end of file diff --git a/dist/lib/util.js b/dist/lib/util.js index 50574b0f..d0a1d4b3 100644 --- a/dist/lib/util.js +++ b/dist/lib/util.js @@ -16,12 +16,9 @@ exports.supportsWebLockAPI = supportsWebLockAPI; function isPromise(obj) { return obj && typeof obj.then === 'function'; } -var PROMISE_RESOLVED_FALSE = Promise.resolve(false); -exports.PROMISE_RESOLVED_FALSE = PROMISE_RESOLVED_FALSE; -var PROMISE_RESOLVED_TRUE = Promise.resolve(true); -exports.PROMISE_RESOLVED_TRUE = PROMISE_RESOLVED_TRUE; -var PROMISE_RESOLVED_VOID = Promise.resolve(); -exports.PROMISE_RESOLVED_VOID = PROMISE_RESOLVED_VOID; +var PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false); +var PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true); +var PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve(); function sleep(time, resolveWith) { if (!time) time = 0; return new Promise(function (res) { diff --git a/docs/e2e.js b/docs/e2e.js index c2c0033f..4a0870f5 100644 --- a/docs/e2e.js +++ b/docs/e2e.js @@ -14,10 +14,9 @@ var _options = require("./options.js"); * Contains all open channels, * used in tests to ensure everything is closed. */ -var OPEN_BROADCAST_CHANNELS = new Set(); -exports.OPEN_BROADCAST_CHANNELS = OPEN_BROADCAST_CHANNELS; +var OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set(); var lastId = 0; -var BroadcastChannel = function BroadcastChannel(name, options) { +var BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) { // identifier of the channel to debug stuff this.id = lastId++; OPEN_BROADCAST_CHANNELS.add(this); @@ -74,7 +73,6 @@ var BroadcastChannel = function BroadcastChannel(name, options) { * window.BroadcastChannel with this * See methods/native.js */ -exports.BroadcastChannel = BroadcastChannel; BroadcastChannel._pubkey = true; /** @@ -391,7 +389,7 @@ function beLeader(leaderElector) { leaderElector._lstns.push(isLeaderListener); return sendLeaderMessage(leaderElector, 'tell'); } -},{"unload":407}],5:[function(require,module,exports){ +},{"unload":410}],5:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -404,7 +402,7 @@ var _leaderElectionUtil = require("./leader-election-util.js"); * A faster version of the leader elector that uses the WebLock API * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API */ -var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { +var LeaderElectionWebLock = exports.LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { var _this = this; this.broadcastChannel = broadcastChannel; broadcastChannel._befC.push(function () { @@ -424,7 +422,6 @@ var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, opt // lock name this.lN = 'pubkey-bc||' + broadcastChannel.method.type + '||' + broadcastChannel.name; }; -exports.LeaderElectionWebLock = LeaderElectionWebLock; LeaderElectionWebLock.prototype = { hasLeader: function hasLeader() { var _this2 = this; @@ -872,8 +869,7 @@ var _options = require("../options.js"); * @link https://rxdb.info/slow-indexeddb.html */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var DB_PREFIX = 'pubkey.broadcast-channel-0-'; var OBJECT_STORE_ID = 'messages'; @@ -881,12 +877,10 @@ var OBJECT_STORE_ID = 'messages'; * Use relaxed durability for faster performance on all transactions. * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/ */ -var TRANSACTION_SETTINGS = { +var TRANSACTION_SETTINGS = exports.TRANSACTION_SETTINGS = { durability: 'relaxed' }; -exports.TRANSACTION_SETTINGS = TRANSACTION_SETTINGS; -var type = 'idb'; -exports.type = type; +var type = exports.type = 'idb'; function getIdb() { if (typeof indexedDB !== 'undefined') return indexedDB; if (typeof window !== 'undefined') { @@ -1198,7 +1192,7 @@ function canBeUsed() { function averageResponseTime(options) { return options.idb.fallbackInterval * 2; } -var IndexedDBMethod = { +var IndexedDBMethod = exports.IndexedDBMethod = { create: create, close: close, onMessage: onMessage, @@ -1208,8 +1202,7 @@ var IndexedDBMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.IndexedDBMethod = IndexedDBMethod; -},{"../options.js":12,"../util.js":13,"oblivious-set":397}],9:[function(require,module,exports){ +},{"../options.js":12,"../util.js":13,"oblivious-set":399}],9:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1239,16 +1232,14 @@ var _util = require("../util.js"); * @link https://caniuse.com/#feat=indexeddb */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var KEY_PREFIX = 'pubkey.broadcastChannel-'; -var type = 'localstorage'; +var type = exports.type = 'localstorage'; /** * copied from crosstab * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 */ -exports.type = type; function getLocalStorage() { var localStorage; if (typeof window === 'undefined') return null; @@ -1371,7 +1362,7 @@ function averageResponseTime() { } return defaultTime; } -var LocalstorageMethod = { +var LocalstorageMethod = exports.LocalstorageMethod = { create: create, close: close, onMessage: onMessage, @@ -1381,8 +1372,7 @@ var LocalstorageMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.LocalstorageMethod = LocalstorageMethod; -},{"../options.js":12,"../util.js":13,"oblivious-set":397}],10:[function(require,module,exports){ +},{"../options.js":12,"../util.js":13,"oblivious-set":399}],10:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1398,10 +1388,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'native'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'native'; function create(channelName) { var state = { messagesCallback: null, @@ -1444,7 +1432,7 @@ function canBeUsed() { function averageResponseTime() { return 150; } -var NativeMethod = { +var NativeMethod = exports.NativeMethod = { create: create, close: close, onMessage: onMessage, @@ -1454,7 +1442,6 @@ var NativeMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.NativeMethod = NativeMethod; },{"../util.js":13}],11:[function(require,module,exports){ "use strict"; @@ -1471,10 +1458,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'simulate'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { @@ -1513,7 +1498,7 @@ function canBeUsed() { function averageResponseTime() { return 5; } -var SimulateMethod = { +var SimulateMethod = exports.SimulateMethod = { create: create, close: close, onMessage: onMessage, @@ -1523,7 +1508,6 @@ var SimulateMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.SimulateMethod = SimulateMethod; },{"../util.js":13}],12:[function(require,module,exports){ "use strict"; @@ -1583,12 +1567,9 @@ exports.supportsWebLockAPI = supportsWebLockAPI; function isPromise(obj) { return obj && typeof obj.then === 'function'; } -var PROMISE_RESOLVED_FALSE = Promise.resolve(false); -exports.PROMISE_RESOLVED_FALSE = PROMISE_RESOLVED_FALSE; -var PROMISE_RESOLVED_TRUE = Promise.resolve(true); -exports.PROMISE_RESOLVED_TRUE = PROMISE_RESOLVED_TRUE; -var PROMISE_RESOLVED_VOID = Promise.resolve(); -exports.PROMISE_RESOLVED_VOID = PROMISE_RESOLVED_VOID; +var PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false); +var PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true); +var PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve(); function sleep(time, resolveWith) { if (!time) time = 0; return new Promise(function (res) { @@ -1654,7 +1635,7 @@ if (_global["default"]._babelPolyfill && typeof console !== "undefined" && conso } _global["default"]._babelPolyfill = true; -},{"./noConflict":15,"core-js/library/fn/global":57}],15:[function(require,module,exports){ +},{"./noConflict":15,"core-js/library/fn/global":58}],15:[function(require,module,exports){ "use strict"; require("core-js/es6"); @@ -1684,7 +1665,7 @@ require("core-js/fn/promise/finally"); require("core-js/web"); require("regenerator-runtime/runtime"); -},{"core-js/es6":45,"core-js/fn/array/flat-map":46,"core-js/fn/array/includes":47,"core-js/fn/object/entries":48,"core-js/fn/object/get-own-property-descriptors":49,"core-js/fn/object/values":50,"core-js/fn/promise/finally":51,"core-js/fn/string/pad-end":52,"core-js/fn/string/pad-start":53,"core-js/fn/string/trim-end":54,"core-js/fn/string/trim-start":55,"core-js/fn/symbol/async-iterator":56,"core-js/web":348,"regenerator-runtime/runtime":399}],16:[function(require,module,exports){ +},{"core-js/es6":46,"core-js/fn/array/flat-map":47,"core-js/fn/array/includes":48,"core-js/fn/object/entries":49,"core-js/fn/object/get-own-property-descriptors":50,"core-js/fn/object/values":51,"core-js/fn/promise/finally":52,"core-js/fn/string/pad-end":53,"core-js/fn/string/pad-start":54,"core-js/fn/string/trim-end":55,"core-js/fn/string/trim-start":56,"core-js/fn/symbol/async-iterator":57,"core-js/web":349,"regenerator-runtime/runtime":401}],16:[function(require,module,exports){ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); @@ -1728,310 +1709,315 @@ var _typeof = require("./typeof.js")["default"]; function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ module.exports = _regeneratorRuntime = function _regeneratorRuntime() { - return exports; + return e; }, module.exports.__esModule = true, module.exports["default"] = module.exports; - var exports = {}, - Op = Object.prototype, - hasOwn = Op.hasOwnProperty, - defineProperty = Object.defineProperty || function (obj, key, desc) { - obj[key] = desc.value; + var t, + e = {}, + r = Object.prototype, + n = r.hasOwnProperty, + o = Object.defineProperty || function (t, e, r) { + t[e] = r.value; }, - $Symbol = "function" == typeof Symbol ? Symbol : {}, - iteratorSymbol = $Symbol.iterator || "@@iterator", - asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", - toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - function define(obj, key, value) { - return Object.defineProperty(obj, key, { - value: value, + i = "function" == typeof Symbol ? Symbol : {}, + a = i.iterator || "@@iterator", + c = i.asyncIterator || "@@asyncIterator", + u = i.toStringTag || "@@toStringTag"; + function define(t, e, r) { + return Object.defineProperty(t, e, { + value: r, enumerable: !0, configurable: !0, writable: !0 - }), obj[key]; + }), t[e]; } try { define({}, ""); - } catch (err) { - define = function define(obj, key, value) { - return obj[key] = value; + } catch (t) { + define = function define(t, e, r) { + return t[e] = r; }; } - function wrap(innerFn, outerFn, self, tryLocsList) { - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, - generator = Object.create(protoGenerator.prototype), - context = new Context(tryLocsList || []); - return defineProperty(generator, "_invoke", { - value: makeInvokeMethod(innerFn, self, context) - }), generator; + function wrap(t, e, r, n) { + var i = e && e.prototype instanceof Generator ? e : Generator, + a = Object.create(i.prototype), + c = new Context(n || []); + return o(a, "_invoke", { + value: makeInvokeMethod(t, r, c) + }), a; } - function tryCatch(fn, obj, arg) { + function tryCatch(t, e, r) { try { return { type: "normal", - arg: fn.call(obj, arg) + arg: t.call(e, r) }; - } catch (err) { + } catch (t) { return { type: "throw", - arg: err + arg: t }; } } - exports.wrap = wrap; - var ContinueSentinel = {}; + e.wrap = wrap; + var h = "suspendedStart", + l = "suspendedYield", + f = "executing", + s = "completed", + y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} - var IteratorPrototype = {}; - define(IteratorPrototype, iteratorSymbol, function () { + var p = {}; + define(p, a, function () { return this; }); - var getProto = Object.getPrototypeOf, - NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function (method) { - define(prototype, method, function (arg) { - return this._invoke(method, arg); + var d = Object.getPrototypeOf, + v = d && d(d(values([]))); + v && v !== r && n.call(v, a) && (p = v); + var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); + function defineIteratorMethods(t) { + ["next", "throw", "return"].forEach(function (e) { + define(t, e, function (t) { + return this._invoke(e, t); }); }); } - function AsyncIterator(generator, PromiseImpl) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if ("throw" !== record.type) { - var result = record.arg, - value = result.value; - return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { - invoke("next", value, resolve, reject); - }, function (err) { - invoke("throw", err, resolve, reject); - }) : PromiseImpl.resolve(value).then(function (unwrapped) { - result.value = unwrapped, resolve(result); - }, function (error) { - return invoke("throw", error, resolve, reject); + function AsyncIterator(t, e) { + function invoke(r, o, i, a) { + var c = tryCatch(t[r], t, o); + if ("throw" !== c.type) { + var u = c.arg, + h = u.value; + return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { + invoke("next", t, i, a); + }, function (t) { + invoke("throw", t, i, a); + }) : e.resolve(h).then(function (t) { + u.value = t, i(u); + }, function (t) { + return invoke("throw", t, i, a); }); } - reject(record.arg); + a(c.arg); } - var previousPromise; - defineProperty(this, "_invoke", { - value: function value(method, arg) { + var r; + o(this, "_invoke", { + value: function value(t, n) { function callInvokeWithMethodAndArg() { - return new PromiseImpl(function (resolve, reject) { - invoke(method, arg, resolve, reject); + return new e(function (e, r) { + invoke(t, n, e, r); }); } - return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } - function makeInvokeMethod(innerFn, self, context) { - var state = "suspendedStart"; - return function (method, arg) { - if ("executing" === state) throw new Error("Generator is already running"); - if ("completed" === state) { - if ("throw" === method) throw arg; + function makeInvokeMethod(e, r, n) { + var o = h; + return function (i, a) { + if (o === f) throw new Error("Generator is already running"); + if (o === s) { + if ("throw" === i) throw a; return { - value: void 0, + value: t, done: !0 }; } - for (context.method = method, context.arg = arg;;) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; + for (n.method = i, n.arg = a;;) { + var c = n.delegate; + if (c) { + var u = maybeInvokeDelegate(c, n); + if (u) { + if (u === y) continue; + return u; } } - if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { - if ("suspendedStart" === state) throw state = "completed", context.arg; - context.dispatchException(context.arg); - } else "return" === context.method && context.abrupt("return", context.arg); - state = "executing"; - var record = tryCatch(innerFn, self, context); - if ("normal" === record.type) { - if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; + if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { + if (o === h) throw o = s, n.arg; + n.dispatchException(n.arg); + } else "return" === n.method && n.abrupt("return", n.arg); + o = f; + var p = tryCatch(e, r, n); + if ("normal" === p.type) { + if (o = n.done ? s : l, p.arg === y) continue; return { - value: record.arg, - done: context.done + value: p.arg, + done: n.done }; } - "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); + "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } - function maybeInvokeDelegate(delegate, context) { - var methodName = context.method, - method = delegate.iterator[methodName]; - if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; - var record = tryCatch(method, delegate.iterator, context.arg); - if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; - var info = record.arg; - return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); - } - function pushTryEntry(locs) { - var entry = { - tryLoc: locs[0] + function maybeInvokeDelegate(e, r) { + var n = r.method, + o = e.iterator[n]; + if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; + var i = tryCatch(o, e.iterator, r.arg); + if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; + var a = i.arg; + return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); + } + function pushTryEntry(t) { + var e = { + tryLoc: t[0] }; - 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); + 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal", delete record.arg, entry.completion = record; + function resetTryEntry(t) { + var e = t.completion || {}; + e.type = "normal", delete e.arg, t.completion = e; } - function Context(tryLocsList) { + function Context(t) { this.tryEntries = [{ tryLoc: "root" - }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); - } - function values(iterable) { - if (iterable || "" === iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) return iteratorMethod.call(iterable); - if ("function" == typeof iterable.next) return iterable; - if (!isNaN(iterable.length)) { - var i = -1, - next = function next() { - for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; - return next.value = undefined, next.done = !0, next; + }], t.forEach(pushTryEntry, this), this.reset(!0); + } + function values(e) { + if (e || "" === e) { + var r = e[a]; + if (r) return r.call(e); + if ("function" == typeof e.next) return e; + if (!isNaN(e.length)) { + var o = -1, + i = function next() { + for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; + return next.value = t, next.done = !0, next; }; - return next.next = next; + return i.next = i; } } - throw new TypeError(_typeof(iterable) + " is not iterable"); + throw new TypeError(_typeof(e) + " is not iterable"); } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { + return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 - }), defineProperty(GeneratorFunctionPrototype, "constructor", { + }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 - }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { - var ctor = "function" == typeof genFun && genFun.constructor; - return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); - }, exports.mark = function (genFun) { - return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; - }, exports.awrap = function (arg) { + }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { + var e = "function" == typeof t && t.constructor; + return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); + }, e.mark = function (t) { + return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; + }, e.awrap = function (t) { return { - __await: arg + __await: t }; - }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; - }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { - void 0 === PromiseImpl && (PromiseImpl = Promise); - var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); - return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { - return result.done ? result.value : iter.next(); + }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { + void 0 === i && (i = Promise); + var a = new AsyncIterator(wrap(t, r, n, o), i); + return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { + return t.done ? t.value : a.next(); }); - }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { + }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; - }), define(Gp, "toString", function () { + }), define(g, "toString", function () { return "[object Generator]"; - }), exports.keys = function (val) { - var object = Object(val), - keys = []; - for (var key in object) keys.push(key); - return keys.reverse(), function next() { - for (; keys.length;) { - var key = keys.pop(); - if (key in object) return next.value = key, next.done = !1, next; + }), e.keys = function (t) { + var e = Object(t), + r = []; + for (var n in e) r.push(n); + return r.reverse(), function next() { + for (; r.length;) { + var t = r.pop(); + if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; - }, exports.values = values, Context.prototype = { + }, e.values = values, Context.prototype = { constructor: Context, - reset: function reset(skipTempReset) { - if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); + reset: function reset(e) { + if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; - var rootRecord = this.tryEntries[0].completion; - if ("throw" === rootRecord.type) throw rootRecord.arg; + var t = this.tryEntries[0].completion; + if ("throw" === t.type) throw t.arg; return this.rval; }, - dispatchException: function dispatchException(exception) { - if (this.done) throw exception; - var context = this; - function handle(loc, caught) { - return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; + dispatchException: function dispatchException(e) { + if (this.done) throw e; + var r = this; + function handle(n, o) { + return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i], - record = entry.completion; - if ("root" === entry.tryLoc) return handle("end"); - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"), - hasFinally = hasOwn.call(entry, "finallyLoc"); - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); - if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); - } else if (hasCatch) { - if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); + for (var o = this.tryEntries.length - 1; o >= 0; --o) { + var i = this.tryEntries[o], + a = i.completion; + if ("root" === i.tryLoc) return handle("end"); + if (i.tryLoc <= this.prev) { + var c = n.call(i, "catchLoc"), + u = n.call(i, "finallyLoc"); + if (c && u) { + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); + } else if (c) { + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { - if (!hasFinally) throw new Error("try statement without catch or finally"); - if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); + if (!u) throw new Error("try statement without catch or finally"); + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, - abrupt: function abrupt(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { - var finallyEntry = entry; + abrupt: function abrupt(t, e) { + for (var r = this.tryEntries.length - 1; r >= 0; --r) { + var o = this.tryEntries[r]; + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { + var i = o; break; } } - finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); - var record = finallyEntry ? finallyEntry.completion : {}; - return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); + i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); + var a = i ? i.completion : {}; + return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, - complete: function complete(record, afterLoc) { - if ("throw" === record.type) throw record.arg; - return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; + complete: function complete(t, e) { + if ("throw" === t.type) throw t.arg; + return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, - finish: function finish(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; + finish: function finish(t) { + for (var e = this.tryEntries.length - 1; e >= 0; --e) { + var r = this.tryEntries[e]; + if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, - "catch": function _catch(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if ("throw" === record.type) { - var thrown = record.arg; - resetTryEntry(entry); + "catch": function _catch(t) { + for (var e = this.tryEntries.length - 1; e >= 0; --e) { + var r = this.tryEntries[e]; + if (r.tryLoc === t) { + var n = r.completion; + if ("throw" === n.type) { + var o = n.arg; + resetTryEntry(r); } - return thrown; + return o; } } throw new Error("illegal catch attempt"); }, - delegateYield: function delegateYield(iterable, resultName, nextLoc) { + delegateYield: function delegateYield(e, r, n) { return this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }, "next" === this.method && (this.arg = undefined), ContinueSentinel; + iterator: values(e), + resultName: r, + nextLoc: n + }, "next" === this.method && (this.arg = t), y; } - }, exports; + }, e; } module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; },{"./typeof.js":19}],19:[function(require,module,exports){ -function _typeof(obj) { +function _typeof(o) { "@babel/helpers - typeof"; - return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); } module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],20:[function(require,module,exports){ @@ -2054,6 +2040,21 @@ try { },{"../helpers/regeneratorRuntime":18}],21:[function(require,module,exports){ 'use strict'; +var callBound = require('call-bind/callBound'); +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); + +var isArrayBuffer = require('is-array-buffer'); + +module.exports = function byteLength(ab) { + if (!isArrayBuffer(ab)) { + return NaN; + } + return $byteLength ? $byteLength(ab) : ab.byteLength; +}; // in node < 0.11, byteLength is an own nonconfigurable property + +},{"call-bind/callBound":43,"is-array-buffer":370}],22:[function(require,module,exports){ +'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); @@ -2117,7 +2118,7 @@ function assertThrows(test) { } else rej(nonThrown); }); } -},{"./is-promise":25,"./utils":33}],22:[function(require,module,exports){ +},{"./is-promise":26,"./utils":34}],23:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2131,7 +2132,7 @@ var _clone2 = _interopRequireDefault(_clone); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = _clone2['default']; -},{"clone":44}],23:[function(require,module,exports){ +},{"clone":45}],24:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2145,7 +2146,7 @@ var _deepEqual2 = _interopRequireDefault(_deepEqual); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = _deepEqual2['default']; -},{"deep-equal":349}],24:[function(require,module,exports){ +},{"deep-equal":350}],25:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2248,7 +2249,7 @@ exports.resolveValues = _resolveValues2['default']; exports.performanceNow = _performanceNow2['default']; exports.isPromise = _isPromise2['default']; exports.promisify = _promisify2['default']; -},{"./assert-throws":21,"./clone":22,"./deep-equal":23,"./is-promise":25,"./performance-now":26,"./promisify":27,"./random-boolean":28,"./random-number":29,"./random-string":30,"./resolve-values":31,"./run-forever":32,"./wait":37,"./wait-forever":34,"./wait-resolveable":35,"./wait-until":36}],25:[function(require,module,exports){ +},{"./assert-throws":22,"./clone":23,"./deep-equal":24,"./is-promise":26,"./performance-now":27,"./promisify":28,"./random-boolean":29,"./random-number":30,"./random-string":31,"./resolve-values":32,"./run-forever":33,"./wait":38,"./wait-forever":35,"./wait-resolveable":36,"./wait-until":37}],26:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2264,7 +2265,7 @@ function isPromise(value) { } catch (err) {} return false; } -},{}],26:[function(require,module,exports){ +},{}],27:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2297,7 +2298,7 @@ function performanceNow() { return perf.now(); } -},{"./require-on-node-only":40,"is-node":374}],27:[function(require,module,exports){ +},{"./require-on-node-only":41,"is-node":376}],28:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2326,7 +2327,7 @@ function promisify(value) { return Promise.resolve(value); } } -},{"./is-promise":25}],28:[function(require,module,exports){ +},{"./is-promise":26}],29:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -2340,7 +2341,7 @@ exports["default"] = randomBoolean; function randomBoolean() { return Math.random() >= 0.5; } -},{}],29:[function(require,module,exports){ +},{}],30:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -2359,7 +2360,7 @@ function randomNumber() { return Math.floor(Math.random() * (max - min + 1)) + min; } -},{}],30:[function(require,module,exports){ +},{}],31:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2379,7 +2380,7 @@ function randomString() { text += charset.charAt(Math.floor(Math.random() * charset.length)); }return text; } -},{}],31:[function(require,module,exports){ +},{}],32:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2408,7 +2409,7 @@ function resolveValues(obj) { return ret; }); } -},{"./promisify":27}],32:[function(require,module,exports){ +},{"./promisify":28}],33:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2443,7 +2444,7 @@ function runForever(predicate) { runLoop(); }); } -},{"./promisify":27,"./wait":37}],33:[function(require,module,exports){ +},{"./promisify":28,"./wait":38}],34:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2473,7 +2474,7 @@ function ensureInSetTimeoutLimit(timeoutInMilliseconds) { } return timeoutInMilliseconds; } -},{}],34:[function(require,module,exports){ +},{}],35:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -2490,7 +2491,7 @@ function waitForever(fun) { return new Promise(function (res) {}); } -},{}],35:[function(require,module,exports){ +},{}],36:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2517,7 +2518,7 @@ function waitResolveable() { }); return ret; } -},{"./utils":33}],36:[function(require,module,exports){ +},{"./utils":34}],37:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2583,7 +2584,7 @@ function waitUntil(fun) { runLoopOnce(); }); } -},{"./promisify":27,"./wait":37}],37:[function(require,module,exports){ +},{"./promisify":28,"./wait":38}],38:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2605,7 +2606,7 @@ function wait() { return setTimeout(res, (0, _utils.ensureInSetTimeoutLimit)(ms)); }); } -},{"./utils":33}],38:[function(require,module,exports){ +},{"./utils":34}],39:[function(require,module,exports){ (function (global){(function (){ 'use strict'; @@ -2636,7 +2637,7 @@ module.exports = function availableTypedArrays() { }; }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],39:[function(require,module,exports){ +},{}],40:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -2788,9 +2789,9 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],40:[function(require,module,exports){ - },{}],41:[function(require,module,exports){ + +},{}],42:[function(require,module,exports){ (function (Buffer){(function (){ /*! * The buffer module from node.js, for the browser. @@ -4571,7 +4572,7 @@ function numberIsNaN (obj) { } }).call(this)}).call(this,require("buffer").Buffer) -},{"base64-js":39,"buffer":41,"ieee754":365}],42:[function(require,module,exports){ +},{"base64-js":40,"buffer":42,"ieee754":367}],43:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -4588,7 +4589,7 @@ module.exports = function callBoundIntrinsic(name, allowMissing) { return intrinsic; }; -},{"./":43,"get-intrinsic":356}],43:[function(require,module,exports){ +},{"./":44,"get-intrinsic":358}],44:[function(require,module,exports){ 'use strict'; var bind = require('function-bind'); @@ -4637,7 +4638,7 @@ if ($defineProperty) { module.exports.apply = applyBind; } -},{"function-bind":354,"get-intrinsic":356}],44:[function(require,module,exports){ +},{"function-bind":356,"get-intrinsic":358}],45:[function(require,module,exports){ (function (Buffer){(function (){ var clone = (function() { 'use strict'; @@ -4898,7 +4899,7 @@ if (typeof module === 'object' && module.exports) { } }).call(this)}).call(this,require("buffer").Buffer) -},{"buffer":41}],45:[function(require,module,exports){ +},{"buffer":42}],46:[function(require,module,exports){ require('../modules/es6.symbol'); require('../modules/es6.object.create'); require('../modules/es6.object.define-property'); @@ -5039,74 +5040,74 @@ require('../modules/es6.reflect.set'); require('../modules/es6.reflect.set-prototype-of'); module.exports = require('../modules/_core'); -},{"../modules/_core":94,"../modules/es6.array.copy-within":196,"../modules/es6.array.every":197,"../modules/es6.array.fill":198,"../modules/es6.array.filter":199,"../modules/es6.array.find":201,"../modules/es6.array.find-index":200,"../modules/es6.array.for-each":202,"../modules/es6.array.from":203,"../modules/es6.array.index-of":204,"../modules/es6.array.is-array":205,"../modules/es6.array.iterator":206,"../modules/es6.array.join":207,"../modules/es6.array.last-index-of":208,"../modules/es6.array.map":209,"../modules/es6.array.of":210,"../modules/es6.array.reduce":212,"../modules/es6.array.reduce-right":211,"../modules/es6.array.slice":213,"../modules/es6.array.some":214,"../modules/es6.array.sort":215,"../modules/es6.array.species":216,"../modules/es6.date.now":217,"../modules/es6.date.to-iso-string":218,"../modules/es6.date.to-json":219,"../modules/es6.date.to-primitive":220,"../modules/es6.date.to-string":221,"../modules/es6.function.bind":222,"../modules/es6.function.has-instance":223,"../modules/es6.function.name":224,"../modules/es6.map":225,"../modules/es6.math.acosh":226,"../modules/es6.math.asinh":227,"../modules/es6.math.atanh":228,"../modules/es6.math.cbrt":229,"../modules/es6.math.clz32":230,"../modules/es6.math.cosh":231,"../modules/es6.math.expm1":232,"../modules/es6.math.fround":233,"../modules/es6.math.hypot":234,"../modules/es6.math.imul":235,"../modules/es6.math.log10":236,"../modules/es6.math.log1p":237,"../modules/es6.math.log2":238,"../modules/es6.math.sign":239,"../modules/es6.math.sinh":240,"../modules/es6.math.tanh":241,"../modules/es6.math.trunc":242,"../modules/es6.number.constructor":243,"../modules/es6.number.epsilon":244,"../modules/es6.number.is-finite":245,"../modules/es6.number.is-integer":246,"../modules/es6.number.is-nan":247,"../modules/es6.number.is-safe-integer":248,"../modules/es6.number.max-safe-integer":249,"../modules/es6.number.min-safe-integer":250,"../modules/es6.number.parse-float":251,"../modules/es6.number.parse-int":252,"../modules/es6.number.to-fixed":253,"../modules/es6.number.to-precision":254,"../modules/es6.object.assign":255,"../modules/es6.object.create":256,"../modules/es6.object.define-properties":257,"../modules/es6.object.define-property":258,"../modules/es6.object.freeze":259,"../modules/es6.object.get-own-property-descriptor":260,"../modules/es6.object.get-own-property-names":261,"../modules/es6.object.get-prototype-of":262,"../modules/es6.object.is":266,"../modules/es6.object.is-extensible":263,"../modules/es6.object.is-frozen":264,"../modules/es6.object.is-sealed":265,"../modules/es6.object.keys":267,"../modules/es6.object.prevent-extensions":268,"../modules/es6.object.seal":269,"../modules/es6.object.set-prototype-of":270,"../modules/es6.object.to-string":271,"../modules/es6.parse-float":272,"../modules/es6.parse-int":273,"../modules/es6.promise":274,"../modules/es6.reflect.apply":275,"../modules/es6.reflect.construct":276,"../modules/es6.reflect.define-property":277,"../modules/es6.reflect.delete-property":278,"../modules/es6.reflect.enumerate":279,"../modules/es6.reflect.get":282,"../modules/es6.reflect.get-own-property-descriptor":280,"../modules/es6.reflect.get-prototype-of":281,"../modules/es6.reflect.has":283,"../modules/es6.reflect.is-extensible":284,"../modules/es6.reflect.own-keys":285,"../modules/es6.reflect.prevent-extensions":286,"../modules/es6.reflect.set":288,"../modules/es6.reflect.set-prototype-of":287,"../modules/es6.regexp.constructor":289,"../modules/es6.regexp.exec":290,"../modules/es6.regexp.flags":291,"../modules/es6.regexp.match":292,"../modules/es6.regexp.replace":293,"../modules/es6.regexp.search":294,"../modules/es6.regexp.split":295,"../modules/es6.regexp.to-string":296,"../modules/es6.set":297,"../modules/es6.string.anchor":298,"../modules/es6.string.big":299,"../modules/es6.string.blink":300,"../modules/es6.string.bold":301,"../modules/es6.string.code-point-at":302,"../modules/es6.string.ends-with":303,"../modules/es6.string.fixed":304,"../modules/es6.string.fontcolor":305,"../modules/es6.string.fontsize":306,"../modules/es6.string.from-code-point":307,"../modules/es6.string.includes":308,"../modules/es6.string.italics":309,"../modules/es6.string.iterator":310,"../modules/es6.string.link":311,"../modules/es6.string.raw":312,"../modules/es6.string.repeat":313,"../modules/es6.string.small":314,"../modules/es6.string.starts-with":315,"../modules/es6.string.strike":316,"../modules/es6.string.sub":317,"../modules/es6.string.sup":318,"../modules/es6.string.trim":319,"../modules/es6.symbol":320,"../modules/es6.typed.array-buffer":321,"../modules/es6.typed.data-view":322,"../modules/es6.typed.float32-array":323,"../modules/es6.typed.float64-array":324,"../modules/es6.typed.int16-array":325,"../modules/es6.typed.int32-array":326,"../modules/es6.typed.int8-array":327,"../modules/es6.typed.uint16-array":328,"../modules/es6.typed.uint32-array":329,"../modules/es6.typed.uint8-array":330,"../modules/es6.typed.uint8-clamped-array":331,"../modules/es6.weak-map":332,"../modules/es6.weak-set":333}],46:[function(require,module,exports){ +},{"../modules/_core":95,"../modules/es6.array.copy-within":197,"../modules/es6.array.every":198,"../modules/es6.array.fill":199,"../modules/es6.array.filter":200,"../modules/es6.array.find":202,"../modules/es6.array.find-index":201,"../modules/es6.array.for-each":203,"../modules/es6.array.from":204,"../modules/es6.array.index-of":205,"../modules/es6.array.is-array":206,"../modules/es6.array.iterator":207,"../modules/es6.array.join":208,"../modules/es6.array.last-index-of":209,"../modules/es6.array.map":210,"../modules/es6.array.of":211,"../modules/es6.array.reduce":213,"../modules/es6.array.reduce-right":212,"../modules/es6.array.slice":214,"../modules/es6.array.some":215,"../modules/es6.array.sort":216,"../modules/es6.array.species":217,"../modules/es6.date.now":218,"../modules/es6.date.to-iso-string":219,"../modules/es6.date.to-json":220,"../modules/es6.date.to-primitive":221,"../modules/es6.date.to-string":222,"../modules/es6.function.bind":223,"../modules/es6.function.has-instance":224,"../modules/es6.function.name":225,"../modules/es6.map":226,"../modules/es6.math.acosh":227,"../modules/es6.math.asinh":228,"../modules/es6.math.atanh":229,"../modules/es6.math.cbrt":230,"../modules/es6.math.clz32":231,"../modules/es6.math.cosh":232,"../modules/es6.math.expm1":233,"../modules/es6.math.fround":234,"../modules/es6.math.hypot":235,"../modules/es6.math.imul":236,"../modules/es6.math.log10":237,"../modules/es6.math.log1p":238,"../modules/es6.math.log2":239,"../modules/es6.math.sign":240,"../modules/es6.math.sinh":241,"../modules/es6.math.tanh":242,"../modules/es6.math.trunc":243,"../modules/es6.number.constructor":244,"../modules/es6.number.epsilon":245,"../modules/es6.number.is-finite":246,"../modules/es6.number.is-integer":247,"../modules/es6.number.is-nan":248,"../modules/es6.number.is-safe-integer":249,"../modules/es6.number.max-safe-integer":250,"../modules/es6.number.min-safe-integer":251,"../modules/es6.number.parse-float":252,"../modules/es6.number.parse-int":253,"../modules/es6.number.to-fixed":254,"../modules/es6.number.to-precision":255,"../modules/es6.object.assign":256,"../modules/es6.object.create":257,"../modules/es6.object.define-properties":258,"../modules/es6.object.define-property":259,"../modules/es6.object.freeze":260,"../modules/es6.object.get-own-property-descriptor":261,"../modules/es6.object.get-own-property-names":262,"../modules/es6.object.get-prototype-of":263,"../modules/es6.object.is":267,"../modules/es6.object.is-extensible":264,"../modules/es6.object.is-frozen":265,"../modules/es6.object.is-sealed":266,"../modules/es6.object.keys":268,"../modules/es6.object.prevent-extensions":269,"../modules/es6.object.seal":270,"../modules/es6.object.set-prototype-of":271,"../modules/es6.object.to-string":272,"../modules/es6.parse-float":273,"../modules/es6.parse-int":274,"../modules/es6.promise":275,"../modules/es6.reflect.apply":276,"../modules/es6.reflect.construct":277,"../modules/es6.reflect.define-property":278,"../modules/es6.reflect.delete-property":279,"../modules/es6.reflect.enumerate":280,"../modules/es6.reflect.get":283,"../modules/es6.reflect.get-own-property-descriptor":281,"../modules/es6.reflect.get-prototype-of":282,"../modules/es6.reflect.has":284,"../modules/es6.reflect.is-extensible":285,"../modules/es6.reflect.own-keys":286,"../modules/es6.reflect.prevent-extensions":287,"../modules/es6.reflect.set":289,"../modules/es6.reflect.set-prototype-of":288,"../modules/es6.regexp.constructor":290,"../modules/es6.regexp.exec":291,"../modules/es6.regexp.flags":292,"../modules/es6.regexp.match":293,"../modules/es6.regexp.replace":294,"../modules/es6.regexp.search":295,"../modules/es6.regexp.split":296,"../modules/es6.regexp.to-string":297,"../modules/es6.set":298,"../modules/es6.string.anchor":299,"../modules/es6.string.big":300,"../modules/es6.string.blink":301,"../modules/es6.string.bold":302,"../modules/es6.string.code-point-at":303,"../modules/es6.string.ends-with":304,"../modules/es6.string.fixed":305,"../modules/es6.string.fontcolor":306,"../modules/es6.string.fontsize":307,"../modules/es6.string.from-code-point":308,"../modules/es6.string.includes":309,"../modules/es6.string.italics":310,"../modules/es6.string.iterator":311,"../modules/es6.string.link":312,"../modules/es6.string.raw":313,"../modules/es6.string.repeat":314,"../modules/es6.string.small":315,"../modules/es6.string.starts-with":316,"../modules/es6.string.strike":317,"../modules/es6.string.sub":318,"../modules/es6.string.sup":319,"../modules/es6.string.trim":320,"../modules/es6.symbol":321,"../modules/es6.typed.array-buffer":322,"../modules/es6.typed.data-view":323,"../modules/es6.typed.float32-array":324,"../modules/es6.typed.float64-array":325,"../modules/es6.typed.int16-array":326,"../modules/es6.typed.int32-array":327,"../modules/es6.typed.int8-array":328,"../modules/es6.typed.uint16-array":329,"../modules/es6.typed.uint32-array":330,"../modules/es6.typed.uint8-array":331,"../modules/es6.typed.uint8-clamped-array":332,"../modules/es6.weak-map":333,"../modules/es6.weak-set":334}],47:[function(require,module,exports){ require('../../modules/es7.array.flat-map'); module.exports = require('../../modules/_core').Array.flatMap; -},{"../../modules/_core":94,"../../modules/es7.array.flat-map":334}],47:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es7.array.flat-map":335}],48:[function(require,module,exports){ require('../../modules/es7.array.includes'); module.exports = require('../../modules/_core').Array.includes; -},{"../../modules/_core":94,"../../modules/es7.array.includes":335}],48:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es7.array.includes":336}],49:[function(require,module,exports){ require('../../modules/es7.object.entries'); module.exports = require('../../modules/_core').Object.entries; -},{"../../modules/_core":94,"../../modules/es7.object.entries":336}],49:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es7.object.entries":337}],50:[function(require,module,exports){ require('../../modules/es7.object.get-own-property-descriptors'); module.exports = require('../../modules/_core').Object.getOwnPropertyDescriptors; -},{"../../modules/_core":94,"../../modules/es7.object.get-own-property-descriptors":337}],50:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es7.object.get-own-property-descriptors":338}],51:[function(require,module,exports){ require('../../modules/es7.object.values'); module.exports = require('../../modules/_core').Object.values; -},{"../../modules/_core":94,"../../modules/es7.object.values":338}],51:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es7.object.values":339}],52:[function(require,module,exports){ 'use strict'; require('../../modules/es6.promise'); require('../../modules/es7.promise.finally'); module.exports = require('../../modules/_core').Promise['finally']; -},{"../../modules/_core":94,"../../modules/es6.promise":274,"../../modules/es7.promise.finally":339}],52:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es6.promise":275,"../../modules/es7.promise.finally":340}],53:[function(require,module,exports){ require('../../modules/es7.string.pad-end'); module.exports = require('../../modules/_core').String.padEnd; -},{"../../modules/_core":94,"../../modules/es7.string.pad-end":340}],53:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es7.string.pad-end":341}],54:[function(require,module,exports){ require('../../modules/es7.string.pad-start'); module.exports = require('../../modules/_core').String.padStart; -},{"../../modules/_core":94,"../../modules/es7.string.pad-start":341}],54:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es7.string.pad-start":342}],55:[function(require,module,exports){ require('../../modules/es7.string.trim-right'); module.exports = require('../../modules/_core').String.trimRight; -},{"../../modules/_core":94,"../../modules/es7.string.trim-right":343}],55:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es7.string.trim-right":344}],56:[function(require,module,exports){ require('../../modules/es7.string.trim-left'); module.exports = require('../../modules/_core').String.trimLeft; -},{"../../modules/_core":94,"../../modules/es7.string.trim-left":342}],56:[function(require,module,exports){ +},{"../../modules/_core":95,"../../modules/es7.string.trim-left":343}],57:[function(require,module,exports){ require('../../modules/es7.symbol.async-iterator'); module.exports = require('../../modules/_wks-ext').f('asyncIterator'); -},{"../../modules/_wks-ext":193,"../../modules/es7.symbol.async-iterator":344}],57:[function(require,module,exports){ +},{"../../modules/_wks-ext":194,"../../modules/es7.symbol.async-iterator":345}],58:[function(require,module,exports){ require('../modules/es7.global'); module.exports = require('../modules/_core').global; -},{"../modules/_core":60,"../modules/es7.global":74}],58:[function(require,module,exports){ +},{"../modules/_core":61,"../modules/es7.global":75}],59:[function(require,module,exports){ module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; -},{}],59:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ var isObject = require('./_is-object'); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; -},{"./_is-object":70}],60:[function(require,module,exports){ +},{"./_is-object":71}],61:[function(require,module,exports){ var core = module.exports = { version: '2.6.12' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef -},{}],61:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ // optional / simple context binding var aFunction = require('./_a-function'); module.exports = function (fn, that, length) { @@ -5128,13 +5129,13 @@ module.exports = function (fn, that, length) { }; }; -},{"./_a-function":58}],62:[function(require,module,exports){ +},{"./_a-function":59}],63:[function(require,module,exports){ // Thank's IE8 for his funny defineProperty module.exports = !require('./_fails')(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); -},{"./_fails":65}],63:[function(require,module,exports){ +},{"./_fails":66}],64:[function(require,module,exports){ var isObject = require('./_is-object'); var document = require('./_global').document; // typeof document.createElement is 'object' in old IE @@ -5143,7 +5144,7 @@ module.exports = function (it) { return is ? document.createElement(it) : {}; }; -},{"./_global":66,"./_is-object":70}],64:[function(require,module,exports){ +},{"./_global":67,"./_is-object":71}],65:[function(require,module,exports){ var global = require('./_global'); var core = require('./_core'); var ctx = require('./_ctx'); @@ -5207,7 +5208,7 @@ $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; -},{"./_core":60,"./_ctx":61,"./_global":66,"./_has":67,"./_hide":68}],65:[function(require,module,exports){ +},{"./_core":61,"./_ctx":62,"./_global":67,"./_has":68,"./_hide":69}],66:[function(require,module,exports){ module.exports = function (exec) { try { return !!exec(); @@ -5216,7 +5217,7 @@ module.exports = function (exec) { } }; -},{}],66:[function(require,module,exports){ +},{}],67:[function(require,module,exports){ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self @@ -5224,13 +5225,13 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef -},{}],67:[function(require,module,exports){ +},{}],68:[function(require,module,exports){ var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; -},{}],68:[function(require,module,exports){ +},{}],69:[function(require,module,exports){ var dP = require('./_object-dp'); var createDesc = require('./_property-desc'); module.exports = require('./_descriptors') ? function (object, key, value) { @@ -5240,17 +5241,17 @@ module.exports = require('./_descriptors') ? function (object, key, value) { return object; }; -},{"./_descriptors":62,"./_object-dp":71,"./_property-desc":72}],69:[function(require,module,exports){ +},{"./_descriptors":63,"./_object-dp":72,"./_property-desc":73}],70:[function(require,module,exports){ module.exports = !require('./_descriptors') && !require('./_fails')(function () { return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; }); -},{"./_descriptors":62,"./_dom-create":63,"./_fails":65}],70:[function(require,module,exports){ +},{"./_descriptors":63,"./_dom-create":64,"./_fails":66}],71:[function(require,module,exports){ module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; -},{}],71:[function(require,module,exports){ +},{}],72:[function(require,module,exports){ var anObject = require('./_an-object'); var IE8_DOM_DEFINE = require('./_ie8-dom-define'); var toPrimitive = require('./_to-primitive'); @@ -5268,7 +5269,7 @@ exports.f = require('./_descriptors') ? Object.defineProperty : function defineP return O; }; -},{"./_an-object":59,"./_descriptors":62,"./_ie8-dom-define":69,"./_to-primitive":73}],72:[function(require,module,exports){ +},{"./_an-object":60,"./_descriptors":63,"./_ie8-dom-define":70,"./_to-primitive":74}],73:[function(require,module,exports){ module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), @@ -5278,7 +5279,7 @@ module.exports = function (bitmap, value) { }; }; -},{}],73:[function(require,module,exports){ +},{}],74:[function(require,module,exports){ // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = require('./_is-object'); // instead of the ES6 spec version, we didn't implement @@toPrimitive case @@ -5292,22 +5293,22 @@ module.exports = function (it, S) { throw TypeError("Can't convert object to primitive value"); }; -},{"./_is-object":70}],74:[function(require,module,exports){ +},{"./_is-object":71}],75:[function(require,module,exports){ // https://github.com/tc39/proposal-global var $export = require('./_export'); $export($export.G, { global: require('./_global') }); -},{"./_export":64,"./_global":66}],75:[function(require,module,exports){ -arguments[4][58][0].apply(exports,arguments) -},{"dup":58}],76:[function(require,module,exports){ +},{"./_export":65,"./_global":67}],76:[function(require,module,exports){ +arguments[4][59][0].apply(exports,arguments) +},{"dup":59}],77:[function(require,module,exports){ var cof = require('./_cof'); module.exports = function (it, msg) { if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); return +it; }; -},{"./_cof":90}],77:[function(require,module,exports){ +},{"./_cof":91}],78:[function(require,module,exports){ // 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES = require('./_wks')('unscopables'); var ArrayProto = Array.prototype; @@ -5316,7 +5317,7 @@ module.exports = function (key) { ArrayProto[UNSCOPABLES][key] = true; }; -},{"./_hide":114,"./_wks":194}],78:[function(require,module,exports){ +},{"./_hide":115,"./_wks":195}],79:[function(require,module,exports){ 'use strict'; var at = require('./_string-at')(true); @@ -5326,16 +5327,16 @@ module.exports = function (S, index, unicode) { return index + (unicode ? at(S, index).length : 1); }; -},{"./_string-at":171}],79:[function(require,module,exports){ +},{"./_string-at":172}],80:[function(require,module,exports){ module.exports = function (it, Constructor, name, forbiddenField) { if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { throw TypeError(name + ': incorrect invocation!'); } return it; }; -},{}],80:[function(require,module,exports){ -arguments[4][59][0].apply(exports,arguments) -},{"./_is-object":123,"dup":59}],81:[function(require,module,exports){ +},{}],81:[function(require,module,exports){ +arguments[4][60][0].apply(exports,arguments) +},{"./_is-object":124,"dup":60}],82:[function(require,module,exports){ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = require('./_to-object'); @@ -5363,7 +5364,7 @@ module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* } return O; }; -},{"./_to-absolute-index":179,"./_to-length":183,"./_to-object":184}],82:[function(require,module,exports){ +},{"./_to-absolute-index":180,"./_to-length":184,"./_to-object":185}],83:[function(require,module,exports){ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = require('./_to-object'); @@ -5380,7 +5381,7 @@ module.exports = function fill(value /* , start = 0, end = @length */) { return O; }; -},{"./_to-absolute-index":179,"./_to-length":183,"./_to-object":184}],83:[function(require,module,exports){ +},{"./_to-absolute-index":180,"./_to-length":184,"./_to-object":185}],84:[function(require,module,exports){ // false -> Array#indexOf // true -> Array#includes var toIObject = require('./_to-iobject'); @@ -5405,7 +5406,7 @@ module.exports = function (IS_INCLUDES) { }; }; -},{"./_to-absolute-index":179,"./_to-iobject":182,"./_to-length":183}],84:[function(require,module,exports){ +},{"./_to-absolute-index":180,"./_to-iobject":183,"./_to-length":184}],85:[function(require,module,exports){ // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter @@ -5451,7 +5452,7 @@ module.exports = function (TYPE, $create) { }; }; -},{"./_array-species-create":87,"./_ctx":96,"./_iobject":119,"./_to-length":183,"./_to-object":184}],85:[function(require,module,exports){ +},{"./_array-species-create":88,"./_ctx":97,"./_iobject":120,"./_to-length":184,"./_to-object":185}],86:[function(require,module,exports){ var aFunction = require('./_a-function'); var toObject = require('./_to-object'); var IObject = require('./_iobject'); @@ -5481,7 +5482,7 @@ module.exports = function (that, callbackfn, aLen, memo, isRight) { return memo; }; -},{"./_a-function":75,"./_iobject":119,"./_to-length":183,"./_to-object":184}],86:[function(require,module,exports){ +},{"./_a-function":76,"./_iobject":120,"./_to-length":184,"./_to-object":185}],87:[function(require,module,exports){ var isObject = require('./_is-object'); var isArray = require('./_is-array'); var SPECIES = require('./_wks')('species'); @@ -5499,7 +5500,7 @@ module.exports = function (original) { } return C === undefined ? Array : C; }; -},{"./_is-array":121,"./_is-object":123,"./_wks":194}],87:[function(require,module,exports){ +},{"./_is-array":122,"./_is-object":124,"./_wks":195}],88:[function(require,module,exports){ // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = require('./_array-species-constructor'); @@ -5507,7 +5508,7 @@ module.exports = function (original, length) { return new (speciesConstructor(original))(length); }; -},{"./_array-species-constructor":86}],88:[function(require,module,exports){ +},{"./_array-species-constructor":87}],89:[function(require,module,exports){ 'use strict'; var aFunction = require('./_a-function'); var isObject = require('./_is-object'); @@ -5534,7 +5535,7 @@ module.exports = Function.bind || function bind(that /* , ...args */) { return bound; }; -},{"./_a-function":75,"./_invoke":118,"./_is-object":123}],89:[function(require,module,exports){ +},{"./_a-function":76,"./_invoke":119,"./_is-object":124}],90:[function(require,module,exports){ // getting tag from 19.1.3.6 Object.prototype.toString() var cof = require('./_cof'); var TAG = require('./_wks')('toStringTag'); @@ -5559,14 +5560,14 @@ module.exports = function (it) { : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; -},{"./_cof":90,"./_wks":194}],90:[function(require,module,exports){ +},{"./_cof":91,"./_wks":195}],91:[function(require,module,exports){ var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; -},{}],91:[function(require,module,exports){ +},{}],92:[function(require,module,exports){ 'use strict'; var dP = require('./_object-dp').f; var create = require('./_object-create'); @@ -5712,7 +5713,7 @@ module.exports = { } }; -},{"./_an-instance":79,"./_ctx":96,"./_descriptors":100,"./_for-of":110,"./_iter-define":127,"./_iter-step":129,"./_meta":136,"./_object-create":140,"./_object-dp":141,"./_redefine-all":159,"./_set-species":165,"./_validate-collection":191}],92:[function(require,module,exports){ +},{"./_an-instance":80,"./_ctx":97,"./_descriptors":101,"./_for-of":111,"./_iter-define":128,"./_iter-step":130,"./_meta":137,"./_object-create":141,"./_object-dp":142,"./_redefine-all":160,"./_set-species":166,"./_validate-collection":192}],93:[function(require,module,exports){ 'use strict'; var redefineAll = require('./_redefine-all'); var getWeak = require('./_meta').getWeak; @@ -5799,7 +5800,7 @@ module.exports = { ufstore: uncaughtFrozenStore }; -},{"./_an-instance":79,"./_an-object":80,"./_array-methods":84,"./_for-of":110,"./_has":113,"./_is-object":123,"./_meta":136,"./_redefine-all":159,"./_validate-collection":191}],93:[function(require,module,exports){ +},{"./_an-instance":80,"./_an-object":81,"./_array-methods":85,"./_for-of":111,"./_has":114,"./_is-object":124,"./_meta":137,"./_redefine-all":160,"./_validate-collection":192}],94:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var $export = require('./_export'); @@ -5886,9 +5887,9 @@ module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { return C; }; -},{"./_an-instance":79,"./_export":104,"./_fails":106,"./_for-of":110,"./_global":112,"./_inherit-if-required":117,"./_is-object":123,"./_iter-detect":128,"./_meta":136,"./_redefine":160,"./_redefine-all":159,"./_set-to-string-tag":166}],94:[function(require,module,exports){ -arguments[4][60][0].apply(exports,arguments) -},{"dup":60}],95:[function(require,module,exports){ +},{"./_an-instance":80,"./_export":105,"./_fails":107,"./_for-of":111,"./_global":113,"./_inherit-if-required":118,"./_is-object":124,"./_iter-detect":129,"./_meta":137,"./_redefine":161,"./_redefine-all":160,"./_set-to-string-tag":167}],95:[function(require,module,exports){ +arguments[4][61][0].apply(exports,arguments) +},{"dup":61}],96:[function(require,module,exports){ 'use strict'; var $defineProperty = require('./_object-dp'); var createDesc = require('./_property-desc'); @@ -5898,9 +5899,9 @@ module.exports = function (object, index, value) { else object[index] = value; }; -},{"./_object-dp":141,"./_property-desc":158}],96:[function(require,module,exports){ -arguments[4][61][0].apply(exports,arguments) -},{"./_a-function":75,"dup":61}],97:[function(require,module,exports){ +},{"./_object-dp":142,"./_property-desc":159}],97:[function(require,module,exports){ +arguments[4][62][0].apply(exports,arguments) +},{"./_a-function":76,"dup":62}],98:[function(require,module,exports){ 'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var fails = require('./_fails'); @@ -5928,7 +5929,7 @@ module.exports = (fails(function () { ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; } : $toISOString; -},{"./_fails":106}],98:[function(require,module,exports){ +},{"./_fails":107}],99:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); var toPrimitive = require('./_to-primitive'); @@ -5939,24 +5940,24 @@ module.exports = function (hint) { return toPrimitive(anObject(this), hint != NUMBER); }; -},{"./_an-object":80,"./_to-primitive":185}],99:[function(require,module,exports){ +},{"./_an-object":81,"./_to-primitive":186}],100:[function(require,module,exports){ // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; -},{}],100:[function(require,module,exports){ -arguments[4][62][0].apply(exports,arguments) -},{"./_fails":106,"dup":62}],101:[function(require,module,exports){ +},{}],101:[function(require,module,exports){ arguments[4][63][0].apply(exports,arguments) -},{"./_global":112,"./_is-object":123,"dup":63}],102:[function(require,module,exports){ +},{"./_fails":107,"dup":63}],102:[function(require,module,exports){ +arguments[4][64][0].apply(exports,arguments) +},{"./_global":113,"./_is-object":124,"dup":64}],103:[function(require,module,exports){ // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); -},{}],103:[function(require,module,exports){ +},{}],104:[function(require,module,exports){ // all enumerable object keys, includes symbols var getKeys = require('./_object-keys'); var gOPS = require('./_object-gops'); @@ -5973,7 +5974,7 @@ module.exports = function (it) { } return result; }; -},{"./_object-gops":146,"./_object-keys":149,"./_object-pie":150}],104:[function(require,module,exports){ +},{"./_object-gops":147,"./_object-keys":150,"./_object-pie":151}],105:[function(require,module,exports){ var global = require('./_global'); var core = require('./_core'); var hide = require('./_hide'); @@ -6018,7 +6019,7 @@ $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; -},{"./_core":94,"./_ctx":96,"./_global":112,"./_hide":114,"./_redefine":160}],105:[function(require,module,exports){ +},{"./_core":95,"./_ctx":97,"./_global":113,"./_hide":115,"./_redefine":161}],106:[function(require,module,exports){ var MATCH = require('./_wks')('match'); module.exports = function (KEY) { var re = /./; @@ -6032,9 +6033,9 @@ module.exports = function (KEY) { } return true; }; -},{"./_wks":194}],106:[function(require,module,exports){ -arguments[4][65][0].apply(exports,arguments) -},{"dup":65}],107:[function(require,module,exports){ +},{"./_wks":195}],107:[function(require,module,exports){ +arguments[4][66][0].apply(exports,arguments) +},{"dup":66}],108:[function(require,module,exports){ 'use strict'; require('./es6.regexp.exec'); var redefine = require('./_redefine'); @@ -6132,7 +6133,7 @@ module.exports = function (KEY, length, exec) { } }; -},{"./_defined":99,"./_fails":106,"./_hide":114,"./_redefine":160,"./_regexp-exec":162,"./_wks":194,"./es6.regexp.exec":290}],108:[function(require,module,exports){ +},{"./_defined":100,"./_fails":107,"./_hide":115,"./_redefine":161,"./_regexp-exec":163,"./_wks":195,"./es6.regexp.exec":291}],109:[function(require,module,exports){ 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = require('./_an-object'); @@ -6147,7 +6148,7 @@ module.exports = function () { return result; }; -},{"./_an-object":80}],109:[function(require,module,exports){ +},{"./_an-object":81}],110:[function(require,module,exports){ 'use strict'; // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray var isArray = require('./_is-array'); @@ -6188,7 +6189,7 @@ function flattenIntoArray(target, original, source, sourceLen, start, depth, map module.exports = flattenIntoArray; -},{"./_ctx":96,"./_is-array":121,"./_is-object":123,"./_to-length":183,"./_wks":194}],110:[function(require,module,exports){ +},{"./_ctx":97,"./_is-array":122,"./_is-object":124,"./_to-length":184,"./_wks":195}],111:[function(require,module,exports){ var ctx = require('./_ctx'); var call = require('./_iter-call'); var isArrayIter = require('./_is-array-iter'); @@ -6215,22 +6216,22 @@ var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) exports.BREAK = BREAK; exports.RETURN = RETURN; -},{"./_an-object":80,"./_ctx":96,"./_is-array-iter":120,"./_iter-call":125,"./_to-length":183,"./core.get-iterator-method":195}],111:[function(require,module,exports){ +},{"./_an-object":81,"./_ctx":97,"./_is-array-iter":121,"./_iter-call":126,"./_to-length":184,"./core.get-iterator-method":196}],112:[function(require,module,exports){ module.exports = require('./_shared')('native-function-to-string', Function.toString); -},{"./_shared":168}],112:[function(require,module,exports){ -arguments[4][66][0].apply(exports,arguments) -},{"dup":66}],113:[function(require,module,exports){ +},{"./_shared":169}],113:[function(require,module,exports){ arguments[4][67][0].apply(exports,arguments) },{"dup":67}],114:[function(require,module,exports){ arguments[4][68][0].apply(exports,arguments) -},{"./_descriptors":100,"./_object-dp":141,"./_property-desc":158,"dup":68}],115:[function(require,module,exports){ +},{"dup":68}],115:[function(require,module,exports){ +arguments[4][69][0].apply(exports,arguments) +},{"./_descriptors":101,"./_object-dp":142,"./_property-desc":159,"dup":69}],116:[function(require,module,exports){ var document = require('./_global').document; module.exports = document && document.documentElement; -},{"./_global":112}],116:[function(require,module,exports){ -arguments[4][69][0].apply(exports,arguments) -},{"./_descriptors":100,"./_dom-create":101,"./_fails":106,"dup":69}],117:[function(require,module,exports){ +},{"./_global":113}],117:[function(require,module,exports){ +arguments[4][70][0].apply(exports,arguments) +},{"./_descriptors":101,"./_dom-create":102,"./_fails":107,"dup":70}],118:[function(require,module,exports){ var isObject = require('./_is-object'); var setPrototypeOf = require('./_set-proto').set; module.exports = function (that, target, C) { @@ -6241,7 +6242,7 @@ module.exports = function (that, target, C) { } return that; }; -},{"./_is-object":123,"./_set-proto":164}],118:[function(require,module,exports){ +},{"./_is-object":124,"./_set-proto":165}],119:[function(require,module,exports){ // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function (fn, args, that) { var un = that === undefined; @@ -6259,7 +6260,7 @@ module.exports = function (fn, args, that) { } return fn.apply(that, args); }; -},{}],119:[function(require,module,exports){ +},{}],120:[function(require,module,exports){ // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = require('./_cof'); // eslint-disable-next-line no-prototype-builtins @@ -6267,7 +6268,7 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; -},{"./_cof":90}],120:[function(require,module,exports){ +},{"./_cof":91}],121:[function(require,module,exports){ // check on default Array iterator var Iterators = require('./_iterators'); var ITERATOR = require('./_wks')('iterator'); @@ -6277,14 +6278,14 @@ module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; -},{"./_iterators":130,"./_wks":194}],121:[function(require,module,exports){ +},{"./_iterators":131,"./_wks":195}],122:[function(require,module,exports){ // 7.2.2 IsArray(argument) var cof = require('./_cof'); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; -},{"./_cof":90}],122:[function(require,module,exports){ +},{"./_cof":91}],123:[function(require,module,exports){ // 20.1.2.3 Number.isInteger(number) var isObject = require('./_is-object'); var floor = Math.floor; @@ -6292,9 +6293,9 @@ module.exports = function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; -},{"./_is-object":123}],123:[function(require,module,exports){ -arguments[4][70][0].apply(exports,arguments) -},{"dup":70}],124:[function(require,module,exports){ +},{"./_is-object":124}],124:[function(require,module,exports){ +arguments[4][71][0].apply(exports,arguments) +},{"dup":71}],125:[function(require,module,exports){ // 7.2.8 IsRegExp(argument) var isObject = require('./_is-object'); var cof = require('./_cof'); @@ -6304,7 +6305,7 @@ module.exports = function (it) { return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; -},{"./_cof":90,"./_is-object":123,"./_wks":194}],125:[function(require,module,exports){ +},{"./_cof":91,"./_is-object":124,"./_wks":195}],126:[function(require,module,exports){ // call something on iterator step with safe closing on error var anObject = require('./_an-object'); module.exports = function (iterator, fn, value, entries) { @@ -6318,7 +6319,7 @@ module.exports = function (iterator, fn, value, entries) { } }; -},{"./_an-object":80}],126:[function(require,module,exports){ +},{"./_an-object":81}],127:[function(require,module,exports){ 'use strict'; var create = require('./_object-create'); var descriptor = require('./_property-desc'); @@ -6333,7 +6334,7 @@ module.exports = function (Constructor, NAME, next) { setToStringTag(Constructor, NAME + ' Iterator'); }; -},{"./_hide":114,"./_object-create":140,"./_property-desc":158,"./_set-to-string-tag":166,"./_wks":194}],127:[function(require,module,exports){ +},{"./_hide":115,"./_object-create":141,"./_property-desc":159,"./_set-to-string-tag":167,"./_wks":195}],128:[function(require,module,exports){ 'use strict'; var LIBRARY = require('./_library'); var $export = require('./_export'); @@ -6404,7 +6405,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE return methods; }; -},{"./_export":104,"./_hide":114,"./_iter-create":126,"./_iterators":130,"./_library":131,"./_object-gpo":147,"./_redefine":160,"./_set-to-string-tag":166,"./_wks":194}],128:[function(require,module,exports){ +},{"./_export":105,"./_hide":115,"./_iter-create":127,"./_iterators":131,"./_library":132,"./_object-gpo":148,"./_redefine":161,"./_set-to-string-tag":167,"./_wks":195}],129:[function(require,module,exports){ var ITERATOR = require('./_wks')('iterator'); var SAFE_CLOSING = false; @@ -6428,18 +6429,18 @@ module.exports = function (exec, skipClosing) { return safe; }; -},{"./_wks":194}],129:[function(require,module,exports){ +},{"./_wks":195}],130:[function(require,module,exports){ module.exports = function (done, value) { return { value: value, done: !!done }; }; -},{}],130:[function(require,module,exports){ +},{}],131:[function(require,module,exports){ module.exports = {}; -},{}],131:[function(require,module,exports){ +},{}],132:[function(require,module,exports){ module.exports = false; -},{}],132:[function(require,module,exports){ +},{}],133:[function(require,module,exports){ // 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 @@ -6451,7 +6452,7 @@ module.exports = (!$expm1 return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1; -},{}],133:[function(require,module,exports){ +},{}],134:[function(require,module,exports){ // 20.2.2.16 Math.fround(x) var sign = require('./_math-sign'); var pow = Math.pow; @@ -6476,20 +6477,20 @@ module.exports = Math.fround || function fround(x) { return $sign * result; }; -},{"./_math-sign":135}],134:[function(require,module,exports){ +},{"./_math-sign":136}],135:[function(require,module,exports){ // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x) { return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; -},{}],135:[function(require,module,exports){ +},{}],136:[function(require,module,exports){ // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x) { // eslint-disable-next-line no-self-compare return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; -},{}],136:[function(require,module,exports){ +},{}],137:[function(require,module,exports){ var META = require('./_uid')('meta'); var isObject = require('./_is-object'); var has = require('./_has'); @@ -6544,7 +6545,7 @@ var meta = module.exports = { onFreeze: onFreeze }; -},{"./_fails":106,"./_has":113,"./_is-object":123,"./_object-dp":141,"./_uid":189}],137:[function(require,module,exports){ +},{"./_fails":107,"./_has":114,"./_is-object":124,"./_object-dp":142,"./_uid":190}],138:[function(require,module,exports){ var global = require('./_global'); var macrotask = require('./_task').set; var Observer = global.MutationObserver || global.WebKitMutationObserver; @@ -6615,7 +6616,7 @@ module.exports = function () { }; }; -},{"./_cof":90,"./_global":112,"./_task":178}],138:[function(require,module,exports){ +},{"./_cof":91,"./_global":113,"./_task":179}],139:[function(require,module,exports){ 'use strict'; // 25.4.1.5 NewPromiseCapability(C) var aFunction = require('./_a-function'); @@ -6635,7 +6636,7 @@ module.exports.f = function (C) { return new PromiseCapability(C); }; -},{"./_a-function":75}],139:[function(require,module,exports){ +},{"./_a-function":76}],140:[function(require,module,exports){ 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var DESCRIPTORS = require('./_descriptors'); @@ -6675,7 +6676,7 @@ module.exports = !$assign || require('./_fails')(function () { } return T; } : $assign; -},{"./_descriptors":100,"./_fails":106,"./_iobject":119,"./_object-gops":146,"./_object-keys":149,"./_object-pie":150,"./_to-object":184}],140:[function(require,module,exports){ +},{"./_descriptors":101,"./_fails":107,"./_iobject":120,"./_object-gops":147,"./_object-keys":150,"./_object-pie":151,"./_to-object":185}],141:[function(require,module,exports){ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = require('./_an-object'); var dPs = require('./_object-dps'); @@ -6718,9 +6719,9 @@ module.exports = Object.create || function create(O, Properties) { return Properties === undefined ? result : dPs(result, Properties); }; -},{"./_an-object":80,"./_dom-create":101,"./_enum-bug-keys":102,"./_html":115,"./_object-dps":142,"./_shared-key":167}],141:[function(require,module,exports){ -arguments[4][71][0].apply(exports,arguments) -},{"./_an-object":80,"./_descriptors":100,"./_ie8-dom-define":116,"./_to-primitive":185,"dup":71}],142:[function(require,module,exports){ +},{"./_an-object":81,"./_dom-create":102,"./_enum-bug-keys":103,"./_html":116,"./_object-dps":143,"./_shared-key":168}],142:[function(require,module,exports){ +arguments[4][72][0].apply(exports,arguments) +},{"./_an-object":81,"./_descriptors":101,"./_ie8-dom-define":117,"./_to-primitive":186,"dup":72}],143:[function(require,module,exports){ var dP = require('./_object-dp'); var anObject = require('./_an-object'); var getKeys = require('./_object-keys'); @@ -6735,7 +6736,7 @@ module.exports = require('./_descriptors') ? Object.defineProperties : function return O; }; -},{"./_an-object":80,"./_descriptors":100,"./_object-dp":141,"./_object-keys":149}],143:[function(require,module,exports){ +},{"./_an-object":81,"./_descriptors":101,"./_object-dp":142,"./_object-keys":150}],144:[function(require,module,exports){ var pIE = require('./_object-pie'); var createDesc = require('./_property-desc'); var toIObject = require('./_to-iobject'); @@ -6753,7 +6754,7 @@ exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; -},{"./_descriptors":100,"./_has":113,"./_ie8-dom-define":116,"./_object-pie":150,"./_property-desc":158,"./_to-iobject":182,"./_to-primitive":185}],144:[function(require,module,exports){ +},{"./_descriptors":101,"./_has":114,"./_ie8-dom-define":117,"./_object-pie":151,"./_property-desc":159,"./_to-iobject":183,"./_to-primitive":186}],145:[function(require,module,exports){ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = require('./_to-iobject'); var gOPN = require('./_object-gopn').f; @@ -6774,7 +6775,7 @@ module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; -},{"./_object-gopn":145,"./_to-iobject":182}],145:[function(require,module,exports){ +},{"./_object-gopn":146,"./_to-iobject":183}],146:[function(require,module,exports){ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = require('./_object-keys-internal'); var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); @@ -6783,10 +6784,10 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; -},{"./_enum-bug-keys":102,"./_object-keys-internal":148}],146:[function(require,module,exports){ +},{"./_enum-bug-keys":103,"./_object-keys-internal":149}],147:[function(require,module,exports){ exports.f = Object.getOwnPropertySymbols; -},{}],147:[function(require,module,exports){ +},{}],148:[function(require,module,exports){ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = require('./_has'); var toObject = require('./_to-object'); @@ -6801,7 +6802,7 @@ module.exports = Object.getPrototypeOf || function (O) { } return O instanceof Object ? ObjectProto : null; }; -},{"./_has":113,"./_shared-key":167,"./_to-object":184}],148:[function(require,module,exports){ +},{"./_has":114,"./_shared-key":168,"./_to-object":185}],149:[function(require,module,exports){ var has = require('./_has'); var toIObject = require('./_to-iobject'); var arrayIndexOf = require('./_array-includes')(false); @@ -6820,7 +6821,7 @@ module.exports = function (object, names) { return result; }; -},{"./_array-includes":83,"./_has":113,"./_shared-key":167,"./_to-iobject":182}],149:[function(require,module,exports){ +},{"./_array-includes":84,"./_has":114,"./_shared-key":168,"./_to-iobject":183}],150:[function(require,module,exports){ // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = require('./_object-keys-internal'); var enumBugKeys = require('./_enum-bug-keys'); @@ -6829,10 +6830,10 @@ module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; -},{"./_enum-bug-keys":102,"./_object-keys-internal":148}],150:[function(require,module,exports){ +},{"./_enum-bug-keys":103,"./_object-keys-internal":149}],151:[function(require,module,exports){ exports.f = {}.propertyIsEnumerable; -},{}],151:[function(require,module,exports){ +},{}],152:[function(require,module,exports){ // most Object methods by ES6 should accept primitives var $export = require('./_export'); var core = require('./_core'); @@ -6844,7 +6845,7 @@ module.exports = function (KEY, exec) { $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; -},{"./_core":94,"./_export":104,"./_fails":106}],152:[function(require,module,exports){ +},{"./_core":95,"./_export":105,"./_fails":107}],153:[function(require,module,exports){ var DESCRIPTORS = require('./_descriptors'); var getKeys = require('./_object-keys'); var toIObject = require('./_to-iobject'); @@ -6867,7 +6868,7 @@ module.exports = function (isEntries) { }; }; -},{"./_descriptors":100,"./_object-keys":149,"./_object-pie":150,"./_to-iobject":182}],153:[function(require,module,exports){ +},{"./_descriptors":101,"./_object-keys":150,"./_object-pie":151,"./_to-iobject":183}],154:[function(require,module,exports){ // all object keys, includes non-enumerable and symbols var gOPN = require('./_object-gopn'); var gOPS = require('./_object-gops'); @@ -6879,7 +6880,7 @@ module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { return getSymbols ? keys.concat(getSymbols(it)) : keys; }; -},{"./_an-object":80,"./_global":112,"./_object-gopn":145,"./_object-gops":146}],154:[function(require,module,exports){ +},{"./_an-object":81,"./_global":113,"./_object-gopn":146,"./_object-gops":147}],155:[function(require,module,exports){ var $parseFloat = require('./_global').parseFloat; var $trim = require('./_string-trim').trim; @@ -6889,7 +6890,7 @@ module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat; -},{"./_global":112,"./_string-trim":176,"./_string-ws":177}],155:[function(require,module,exports){ +},{"./_global":113,"./_string-trim":177,"./_string-ws":178}],156:[function(require,module,exports){ var $parseInt = require('./_global').parseInt; var $trim = require('./_string-trim').trim; var ws = require('./_string-ws'); @@ -6900,7 +6901,7 @@ module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? f return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt; -},{"./_global":112,"./_string-trim":176,"./_string-ws":177}],156:[function(require,module,exports){ +},{"./_global":113,"./_string-trim":177,"./_string-ws":178}],157:[function(require,module,exports){ module.exports = function (exec) { try { return { e: false, v: exec() }; @@ -6909,7 +6910,7 @@ module.exports = function (exec) { } }; -},{}],157:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ var anObject = require('./_an-object'); var isObject = require('./_is-object'); var newPromiseCapability = require('./_new-promise-capability'); @@ -6923,16 +6924,16 @@ module.exports = function (C, x) { return promiseCapability.promise; }; -},{"./_an-object":80,"./_is-object":123,"./_new-promise-capability":138}],158:[function(require,module,exports){ -arguments[4][72][0].apply(exports,arguments) -},{"dup":72}],159:[function(require,module,exports){ +},{"./_an-object":81,"./_is-object":124,"./_new-promise-capability":139}],159:[function(require,module,exports){ +arguments[4][73][0].apply(exports,arguments) +},{"dup":73}],160:[function(require,module,exports){ var redefine = require('./_redefine'); module.exports = function (target, src, safe) { for (var key in src) redefine(target, key, src[key], safe); return target; }; -},{"./_redefine":160}],160:[function(require,module,exports){ +},{"./_redefine":161}],161:[function(require,module,exports){ var global = require('./_global'); var hide = require('./_hide'); var has = require('./_has'); @@ -6965,7 +6966,7 @@ require('./_core').inspectSource = function (it) { return typeof this == 'function' && this[SRC] || $toString.call(this); }); -},{"./_core":94,"./_function-to-string":111,"./_global":112,"./_has":113,"./_hide":114,"./_uid":189}],161:[function(require,module,exports){ +},{"./_core":95,"./_function-to-string":112,"./_global":113,"./_has":114,"./_hide":115,"./_uid":190}],162:[function(require,module,exports){ 'use strict'; var classof = require('./_classof'); @@ -6988,7 +6989,7 @@ module.exports = function (R, S) { return builtinExec.call(R, S); }; -},{"./_classof":89}],162:[function(require,module,exports){ +},{"./_classof":90}],163:[function(require,module,exports){ 'use strict'; var regexpFlags = require('./_flags'); @@ -7048,14 +7049,14 @@ if (PATCH) { module.exports = patchedExec; -},{"./_flags":108}],163:[function(require,module,exports){ +},{"./_flags":109}],164:[function(require,module,exports){ // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y) { // eslint-disable-next-line no-self-compare return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; -},{}],164:[function(require,module,exports){ +},{}],165:[function(require,module,exports){ // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = require('./_is-object'); @@ -7082,7 +7083,7 @@ module.exports = { check: check }; -},{"./_an-object":80,"./_ctx":96,"./_is-object":123,"./_object-gopd":143}],165:[function(require,module,exports){ +},{"./_an-object":81,"./_ctx":97,"./_is-object":124,"./_object-gopd":144}],166:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var dP = require('./_object-dp'); @@ -7097,7 +7098,7 @@ module.exports = function (KEY) { }); }; -},{"./_descriptors":100,"./_global":112,"./_object-dp":141,"./_wks":194}],166:[function(require,module,exports){ +},{"./_descriptors":101,"./_global":113,"./_object-dp":142,"./_wks":195}],167:[function(require,module,exports){ var def = require('./_object-dp').f; var has = require('./_has'); var TAG = require('./_wks')('toStringTag'); @@ -7106,14 +7107,14 @@ module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; -},{"./_has":113,"./_object-dp":141,"./_wks":194}],167:[function(require,module,exports){ +},{"./_has":114,"./_object-dp":142,"./_wks":195}],168:[function(require,module,exports){ var shared = require('./_shared')('keys'); var uid = require('./_uid'); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; -},{"./_shared":168,"./_uid":189}],168:[function(require,module,exports){ +},{"./_shared":169,"./_uid":190}],169:[function(require,module,exports){ var core = require('./_core'); var global = require('./_global'); var SHARED = '__core-js_shared__'; @@ -7127,7 +7128,7 @@ var store = global[SHARED] || (global[SHARED] = {}); copyright: '© 2020 Denis Pushkarev (zloirock.ru)' }); -},{"./_core":94,"./_global":112,"./_library":131}],169:[function(require,module,exports){ +},{"./_core":95,"./_global":113,"./_library":132}],170:[function(require,module,exports){ // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = require('./_an-object'); var aFunction = require('./_a-function'); @@ -7138,7 +7139,7 @@ module.exports = function (O, D) { return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; -},{"./_a-function":75,"./_an-object":80,"./_wks":194}],170:[function(require,module,exports){ +},{"./_a-function":76,"./_an-object":81,"./_wks":195}],171:[function(require,module,exports){ 'use strict'; var fails = require('./_fails'); @@ -7149,7 +7150,7 @@ module.exports = function (method, arg) { }); }; -},{"./_fails":106}],171:[function(require,module,exports){ +},{"./_fails":107}],172:[function(require,module,exports){ var toInteger = require('./_to-integer'); var defined = require('./_defined'); // true -> String#at @@ -7168,7 +7169,7 @@ module.exports = function (TO_STRING) { }; }; -},{"./_defined":99,"./_to-integer":181}],172:[function(require,module,exports){ +},{"./_defined":100,"./_to-integer":182}],173:[function(require,module,exports){ // helper for String#{startsWith, endsWith, includes} var isRegExp = require('./_is-regexp'); var defined = require('./_defined'); @@ -7178,7 +7179,7 @@ module.exports = function (that, searchString, NAME) { return String(defined(that)); }; -},{"./_defined":99,"./_is-regexp":124}],173:[function(require,module,exports){ +},{"./_defined":100,"./_is-regexp":125}],174:[function(require,module,exports){ var $export = require('./_export'); var fails = require('./_fails'); var defined = require('./_defined'); @@ -7199,7 +7200,7 @@ module.exports = function (NAME, exec) { }), 'String', O); }; -},{"./_defined":99,"./_export":104,"./_fails":106}],174:[function(require,module,exports){ +},{"./_defined":100,"./_export":105,"./_fails":107}],175:[function(require,module,exports){ // https://github.com/tc39/proposal-string-pad-start-end var toLength = require('./_to-length'); var repeat = require('./_string-repeat'); @@ -7217,7 +7218,7 @@ module.exports = function (that, maxLength, fillString, left) { return left ? stringFiller + S : S + stringFiller; }; -},{"./_defined":99,"./_string-repeat":175,"./_to-length":183}],175:[function(require,module,exports){ +},{"./_defined":100,"./_string-repeat":176,"./_to-length":184}],176:[function(require,module,exports){ 'use strict'; var toInteger = require('./_to-integer'); var defined = require('./_defined'); @@ -7231,7 +7232,7 @@ module.exports = function repeat(count) { return res; }; -},{"./_defined":99,"./_to-integer":181}],176:[function(require,module,exports){ +},{"./_defined":100,"./_to-integer":182}],177:[function(require,module,exports){ var $export = require('./_export'); var defined = require('./_defined'); var fails = require('./_fails'); @@ -7263,11 +7264,11 @@ var trim = exporter.trim = function (string, TYPE) { module.exports = exporter; -},{"./_defined":99,"./_export":104,"./_fails":106,"./_string-ws":177}],177:[function(require,module,exports){ +},{"./_defined":100,"./_export":105,"./_fails":107,"./_string-ws":178}],178:[function(require,module,exports){ module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; -},{}],178:[function(require,module,exports){ +},{}],179:[function(require,module,exports){ var ctx = require('./_ctx'); var invoke = require('./_invoke'); var html = require('./_html'); @@ -7353,7 +7354,7 @@ module.exports = { clear: clearTask }; -},{"./_cof":90,"./_ctx":96,"./_dom-create":101,"./_global":112,"./_html":115,"./_invoke":118}],179:[function(require,module,exports){ +},{"./_cof":91,"./_ctx":97,"./_dom-create":102,"./_global":113,"./_html":116,"./_invoke":119}],180:[function(require,module,exports){ var toInteger = require('./_to-integer'); var max = Math.max; var min = Math.min; @@ -7362,7 +7363,7 @@ module.exports = function (index, length) { return index < 0 ? max(index + length, 0) : min(index, length); }; -},{"./_to-integer":181}],180:[function(require,module,exports){ +},{"./_to-integer":182}],181:[function(require,module,exports){ // https://tc39.github.io/ecma262/#sec-toindex var toInteger = require('./_to-integer'); var toLength = require('./_to-length'); @@ -7374,7 +7375,7 @@ module.exports = function (it) { return length; }; -},{"./_to-integer":181,"./_to-length":183}],181:[function(require,module,exports){ +},{"./_to-integer":182,"./_to-length":184}],182:[function(require,module,exports){ // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; @@ -7382,7 +7383,7 @@ module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; -},{}],182:[function(require,module,exports){ +},{}],183:[function(require,module,exports){ // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = require('./_iobject'); var defined = require('./_defined'); @@ -7390,7 +7391,7 @@ module.exports = function (it) { return IObject(defined(it)); }; -},{"./_defined":99,"./_iobject":119}],183:[function(require,module,exports){ +},{"./_defined":100,"./_iobject":120}],184:[function(require,module,exports){ // 7.1.15 ToLength var toInteger = require('./_to-integer'); var min = Math.min; @@ -7398,16 +7399,16 @@ module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; -},{"./_to-integer":181}],184:[function(require,module,exports){ +},{"./_to-integer":182}],185:[function(require,module,exports){ // 7.1.13 ToObject(argument) var defined = require('./_defined'); module.exports = function (it) { return Object(defined(it)); }; -},{"./_defined":99}],185:[function(require,module,exports){ -arguments[4][73][0].apply(exports,arguments) -},{"./_is-object":123,"dup":73}],186:[function(require,module,exports){ +},{"./_defined":100}],186:[function(require,module,exports){ +arguments[4][74][0].apply(exports,arguments) +},{"./_is-object":124,"dup":74}],187:[function(require,module,exports){ 'use strict'; if (require('./_descriptors')) { var LIBRARY = require('./_library'); @@ -7889,7 +7890,7 @@ if (require('./_descriptors')) { }; } else module.exports = function () { /* empty */ }; -},{"./_an-instance":79,"./_array-copy-within":81,"./_array-fill":82,"./_array-includes":83,"./_array-methods":84,"./_classof":89,"./_ctx":96,"./_descriptors":100,"./_export":104,"./_fails":106,"./_global":112,"./_has":113,"./_hide":114,"./_is-array-iter":120,"./_is-object":123,"./_iter-detect":128,"./_iterators":130,"./_library":131,"./_object-create":140,"./_object-dp":141,"./_object-gopd":143,"./_object-gopn":145,"./_object-gpo":147,"./_property-desc":158,"./_redefine-all":159,"./_set-species":165,"./_species-constructor":169,"./_to-absolute-index":179,"./_to-index":180,"./_to-integer":181,"./_to-length":183,"./_to-object":184,"./_to-primitive":185,"./_typed":188,"./_typed-buffer":187,"./_uid":189,"./_wks":194,"./core.get-iterator-method":195,"./es6.array.iterator":206}],187:[function(require,module,exports){ +},{"./_an-instance":80,"./_array-copy-within":82,"./_array-fill":83,"./_array-includes":84,"./_array-methods":85,"./_classof":90,"./_ctx":97,"./_descriptors":101,"./_export":105,"./_fails":107,"./_global":113,"./_has":114,"./_hide":115,"./_is-array-iter":121,"./_is-object":124,"./_iter-detect":129,"./_iterators":131,"./_library":132,"./_object-create":141,"./_object-dp":142,"./_object-gopd":144,"./_object-gopn":146,"./_object-gpo":148,"./_property-desc":159,"./_redefine-all":160,"./_set-species":166,"./_species-constructor":170,"./_to-absolute-index":180,"./_to-index":181,"./_to-integer":182,"./_to-length":184,"./_to-object":185,"./_to-primitive":186,"./_typed":189,"./_typed-buffer":188,"./_uid":190,"./_wks":195,"./core.get-iterator-method":196,"./es6.array.iterator":207}],188:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var DESCRIPTORS = require('./_descriptors'); @@ -8167,7 +8168,7 @@ hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView; -},{"./_an-instance":79,"./_array-fill":82,"./_descriptors":100,"./_fails":106,"./_global":112,"./_hide":114,"./_library":131,"./_object-dp":141,"./_object-gopn":145,"./_redefine-all":159,"./_set-to-string-tag":166,"./_to-index":180,"./_to-integer":181,"./_to-length":183,"./_typed":188}],188:[function(require,module,exports){ +},{"./_an-instance":80,"./_array-fill":83,"./_descriptors":101,"./_fails":107,"./_global":113,"./_hide":115,"./_library":132,"./_object-dp":142,"./_object-gopn":146,"./_redefine-all":160,"./_set-to-string-tag":167,"./_to-index":181,"./_to-integer":182,"./_to-length":184,"./_typed":189}],189:[function(require,module,exports){ var global = require('./_global'); var hide = require('./_hide'); var uid = require('./_uid'); @@ -8197,27 +8198,27 @@ module.exports = { VIEW: VIEW }; -},{"./_global":112,"./_hide":114,"./_uid":189}],189:[function(require,module,exports){ +},{"./_global":113,"./_hide":115,"./_uid":190}],190:[function(require,module,exports){ var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; -},{}],190:[function(require,module,exports){ +},{}],191:[function(require,module,exports){ var global = require('./_global'); var navigator = global.navigator; module.exports = navigator && navigator.userAgent || ''; -},{"./_global":112}],191:[function(require,module,exports){ +},{"./_global":113}],192:[function(require,module,exports){ var isObject = require('./_is-object'); module.exports = function (it, TYPE) { if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); return it; }; -},{"./_is-object":123}],192:[function(require,module,exports){ +},{"./_is-object":124}],193:[function(require,module,exports){ var global = require('./_global'); var core = require('./_core'); var LIBRARY = require('./_library'); @@ -8228,10 +8229,10 @@ module.exports = function (name) { if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; -},{"./_core":94,"./_global":112,"./_library":131,"./_object-dp":141,"./_wks-ext":193}],193:[function(require,module,exports){ +},{"./_core":95,"./_global":113,"./_library":132,"./_object-dp":142,"./_wks-ext":194}],194:[function(require,module,exports){ exports.f = require('./_wks'); -},{"./_wks":194}],194:[function(require,module,exports){ +},{"./_wks":195}],195:[function(require,module,exports){ var store = require('./_shared')('wks'); var uid = require('./_uid'); var Symbol = require('./_global').Symbol; @@ -8244,7 +8245,7 @@ var $exports = module.exports = function (name) { $exports.store = store; -},{"./_global":112,"./_shared":168,"./_uid":189}],195:[function(require,module,exports){ +},{"./_global":113,"./_shared":169,"./_uid":190}],196:[function(require,module,exports){ var classof = require('./_classof'); var ITERATOR = require('./_wks')('iterator'); var Iterators = require('./_iterators'); @@ -8254,7 +8255,7 @@ module.exports = require('./_core').getIteratorMethod = function (it) { || Iterators[classof(it)]; }; -},{"./_classof":89,"./_core":94,"./_iterators":130,"./_wks":194}],196:[function(require,module,exports){ +},{"./_classof":90,"./_core":95,"./_iterators":131,"./_wks":195}],197:[function(require,module,exports){ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var $export = require('./_export'); @@ -8262,7 +8263,7 @@ $export($export.P, 'Array', { copyWithin: require('./_array-copy-within') }); require('./_add-to-unscopables')('copyWithin'); -},{"./_add-to-unscopables":77,"./_array-copy-within":81,"./_export":104}],197:[function(require,module,exports){ +},{"./_add-to-unscopables":78,"./_array-copy-within":82,"./_export":105}],198:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $every = require('./_array-methods')(4); @@ -8274,7 +8275,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].every, true), 'A } }); -},{"./_array-methods":84,"./_export":104,"./_strict-method":170}],198:[function(require,module,exports){ +},{"./_array-methods":85,"./_export":105,"./_strict-method":171}],199:[function(require,module,exports){ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var $export = require('./_export'); @@ -8282,7 +8283,7 @@ $export($export.P, 'Array', { fill: require('./_array-fill') }); require('./_add-to-unscopables')('fill'); -},{"./_add-to-unscopables":77,"./_array-fill":82,"./_export":104}],199:[function(require,module,exports){ +},{"./_add-to-unscopables":78,"./_array-fill":83,"./_export":105}],200:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $filter = require('./_array-methods')(2); @@ -8294,7 +8295,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].filter, true), ' } }); -},{"./_array-methods":84,"./_export":104,"./_strict-method":170}],200:[function(require,module,exports){ +},{"./_array-methods":85,"./_export":105,"./_strict-method":171}],201:[function(require,module,exports){ 'use strict'; // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) var $export = require('./_export'); @@ -8310,7 +8311,7 @@ $export($export.P + $export.F * forced, 'Array', { }); require('./_add-to-unscopables')(KEY); -},{"./_add-to-unscopables":77,"./_array-methods":84,"./_export":104}],201:[function(require,module,exports){ +},{"./_add-to-unscopables":78,"./_array-methods":85,"./_export":105}],202:[function(require,module,exports){ 'use strict'; // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) var $export = require('./_export'); @@ -8326,7 +8327,7 @@ $export($export.P + $export.F * forced, 'Array', { }); require('./_add-to-unscopables')(KEY); -},{"./_add-to-unscopables":77,"./_array-methods":84,"./_export":104}],202:[function(require,module,exports){ +},{"./_add-to-unscopables":78,"./_array-methods":85,"./_export":105}],203:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $forEach = require('./_array-methods')(0); @@ -8339,7 +8340,7 @@ $export($export.P + $export.F * !STRICT, 'Array', { } }); -},{"./_array-methods":84,"./_export":104,"./_strict-method":170}],203:[function(require,module,exports){ +},{"./_array-methods":85,"./_export":105,"./_strict-method":171}],204:[function(require,module,exports){ 'use strict'; var ctx = require('./_ctx'); var $export = require('./_export'); @@ -8378,7 +8379,7 @@ $export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Arr } }); -},{"./_create-property":95,"./_ctx":96,"./_export":104,"./_is-array-iter":120,"./_iter-call":125,"./_iter-detect":128,"./_to-length":183,"./_to-object":184,"./core.get-iterator-method":195}],204:[function(require,module,exports){ +},{"./_create-property":96,"./_ctx":97,"./_export":105,"./_is-array-iter":121,"./_iter-call":126,"./_iter-detect":129,"./_to-length":184,"./_to-object":185,"./core.get-iterator-method":196}],205:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $indexOf = require('./_array-includes')(false); @@ -8395,13 +8396,13 @@ $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($ } }); -},{"./_array-includes":83,"./_export":104,"./_strict-method":170}],205:[function(require,module,exports){ +},{"./_array-includes":84,"./_export":105,"./_strict-method":171}],206:[function(require,module,exports){ // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) var $export = require('./_export'); $export($export.S, 'Array', { isArray: require('./_is-array') }); -},{"./_export":104,"./_is-array":121}],206:[function(require,module,exports){ +},{"./_export":105,"./_is-array":122}],207:[function(require,module,exports){ 'use strict'; var addToUnscopables = require('./_add-to-unscopables'); var step = require('./_iter-step'); @@ -8437,7 +8438,7 @@ addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); -},{"./_add-to-unscopables":77,"./_iter-define":127,"./_iter-step":129,"./_iterators":130,"./_to-iobject":182}],207:[function(require,module,exports){ +},{"./_add-to-unscopables":78,"./_iter-define":128,"./_iter-step":130,"./_iterators":131,"./_to-iobject":183}],208:[function(require,module,exports){ 'use strict'; // 22.1.3.13 Array.prototype.join(separator) var $export = require('./_export'); @@ -8451,7 +8452,7 @@ $export($export.P + $export.F * (require('./_iobject') != Object || !require('./ } }); -},{"./_export":104,"./_iobject":119,"./_strict-method":170,"./_to-iobject":182}],208:[function(require,module,exports){ +},{"./_export":105,"./_iobject":120,"./_strict-method":171,"./_to-iobject":183}],209:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var toIObject = require('./_to-iobject'); @@ -8475,7 +8476,7 @@ $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($ } }); -},{"./_export":104,"./_strict-method":170,"./_to-integer":181,"./_to-iobject":182,"./_to-length":183}],209:[function(require,module,exports){ +},{"./_export":105,"./_strict-method":171,"./_to-integer":182,"./_to-iobject":183,"./_to-length":184}],210:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $map = require('./_array-methods')(1); @@ -8487,7 +8488,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Arr } }); -},{"./_array-methods":84,"./_export":104,"./_strict-method":170}],210:[function(require,module,exports){ +},{"./_array-methods":85,"./_export":105,"./_strict-method":171}],211:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var createProperty = require('./_create-property'); @@ -8508,7 +8509,7 @@ $export($export.S + $export.F * require('./_fails')(function () { } }); -},{"./_create-property":95,"./_export":104,"./_fails":106}],211:[function(require,module,exports){ +},{"./_create-property":96,"./_export":105,"./_fails":107}],212:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $reduce = require('./_array-reduce'); @@ -8520,7 +8521,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].reduceRight, tru } }); -},{"./_array-reduce":85,"./_export":104,"./_strict-method":170}],212:[function(require,module,exports){ +},{"./_array-reduce":86,"./_export":105,"./_strict-method":171}],213:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $reduce = require('./_array-reduce'); @@ -8532,7 +8533,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].reduce, true), ' } }); -},{"./_array-reduce":85,"./_export":104,"./_strict-method":170}],213:[function(require,module,exports){ +},{"./_array-reduce":86,"./_export":105,"./_strict-method":171}],214:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var html = require('./_html'); @@ -8562,7 +8563,7 @@ $export($export.P + $export.F * require('./_fails')(function () { } }); -},{"./_cof":90,"./_export":104,"./_fails":106,"./_html":115,"./_to-absolute-index":179,"./_to-length":183}],214:[function(require,module,exports){ +},{"./_cof":91,"./_export":105,"./_fails":107,"./_html":116,"./_to-absolute-index":180,"./_to-length":184}],215:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $some = require('./_array-methods')(3); @@ -8574,7 +8575,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Ar } }); -},{"./_array-methods":84,"./_export":104,"./_strict-method":170}],215:[function(require,module,exports){ +},{"./_array-methods":85,"./_export":105,"./_strict-method":171}],216:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var aFunction = require('./_a-function'); @@ -8599,16 +8600,16 @@ $export($export.P + $export.F * (fails(function () { } }); -},{"./_a-function":75,"./_export":104,"./_fails":106,"./_strict-method":170,"./_to-object":184}],216:[function(require,module,exports){ +},{"./_a-function":76,"./_export":105,"./_fails":107,"./_strict-method":171,"./_to-object":185}],217:[function(require,module,exports){ require('./_set-species')('Array'); -},{"./_set-species":165}],217:[function(require,module,exports){ +},{"./_set-species":166}],218:[function(require,module,exports){ // 20.3.3.1 / 15.9.4.4 Date.now() var $export = require('./_export'); $export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); -},{"./_export":104}],218:[function(require,module,exports){ +},{"./_export":105}],219:[function(require,module,exports){ // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var $export = require('./_export'); var toISOString = require('./_date-to-iso-string'); @@ -8618,7 +8619,7 @@ $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'D toISOString: toISOString }); -},{"./_date-to-iso-string":97,"./_export":104}],219:[function(require,module,exports){ +},{"./_date-to-iso-string":98,"./_export":105}],220:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var toObject = require('./_to-object'); @@ -8636,13 +8637,13 @@ $export($export.P + $export.F * require('./_fails')(function () { } }); -},{"./_export":104,"./_fails":106,"./_to-object":184,"./_to-primitive":185}],220:[function(require,module,exports){ +},{"./_export":105,"./_fails":107,"./_to-object":185,"./_to-primitive":186}],221:[function(require,module,exports){ var TO_PRIMITIVE = require('./_wks')('toPrimitive'); var proto = Date.prototype; if (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); -},{"./_date-to-primitive":98,"./_hide":114,"./_wks":194}],221:[function(require,module,exports){ +},{"./_date-to-primitive":99,"./_hide":115,"./_wks":195}],222:[function(require,module,exports){ var DateProto = Date.prototype; var INVALID_DATE = 'Invalid Date'; var TO_STRING = 'toString'; @@ -8656,13 +8657,13 @@ if (new Date(NaN) + '' != INVALID_DATE) { }); } -},{"./_redefine":160}],222:[function(require,module,exports){ +},{"./_redefine":161}],223:[function(require,module,exports){ // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) var $export = require('./_export'); $export($export.P, 'Function', { bind: require('./_bind') }); -},{"./_bind":88,"./_export":104}],223:[function(require,module,exports){ +},{"./_bind":89,"./_export":105}],224:[function(require,module,exports){ 'use strict'; var isObject = require('./_is-object'); var getPrototypeOf = require('./_object-gpo'); @@ -8677,7 +8678,7 @@ if (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').f(FunctionProto, H return false; } }); -},{"./_is-object":123,"./_object-dp":141,"./_object-gpo":147,"./_wks":194}],224:[function(require,module,exports){ +},{"./_is-object":124,"./_object-dp":142,"./_object-gpo":148,"./_wks":195}],225:[function(require,module,exports){ var dP = require('./_object-dp').f; var FProto = Function.prototype; var nameRE = /^\s*function ([^ (]*)/; @@ -8695,7 +8696,7 @@ NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { } }); -},{"./_descriptors":100,"./_object-dp":141}],225:[function(require,module,exports){ +},{"./_descriptors":101,"./_object-dp":142}],226:[function(require,module,exports){ 'use strict'; var strong = require('./_collection-strong'); var validate = require('./_validate-collection'); @@ -8716,7 +8717,7 @@ module.exports = require('./_collection')(MAP, function (get) { } }, strong, true); -},{"./_collection":93,"./_collection-strong":91,"./_validate-collection":191}],226:[function(require,module,exports){ +},{"./_collection":94,"./_collection-strong":92,"./_validate-collection":192}],227:[function(require,module,exports){ // 20.2.2.3 Math.acosh(x) var $export = require('./_export'); var log1p = require('./_math-log1p'); @@ -8736,7 +8737,7 @@ $export($export.S + $export.F * !($acosh } }); -},{"./_export":104,"./_math-log1p":134}],227:[function(require,module,exports){ +},{"./_export":105,"./_math-log1p":135}],228:[function(require,module,exports){ // 20.2.2.5 Math.asinh(x) var $export = require('./_export'); var $asinh = Math.asinh; @@ -8748,7 +8749,7 @@ function asinh(x) { // Tor Browser bug: Math.asinh(0) -> -0 $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); -},{"./_export":104}],228:[function(require,module,exports){ +},{"./_export":105}],229:[function(require,module,exports){ // 20.2.2.7 Math.atanh(x) var $export = require('./_export'); var $atanh = Math.atanh; @@ -8760,7 +8761,7 @@ $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { } }); -},{"./_export":104}],229:[function(require,module,exports){ +},{"./_export":105}],230:[function(require,module,exports){ // 20.2.2.9 Math.cbrt(x) var $export = require('./_export'); var sign = require('./_math-sign'); @@ -8771,7 +8772,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":104,"./_math-sign":135}],230:[function(require,module,exports){ +},{"./_export":105,"./_math-sign":136}],231:[function(require,module,exports){ // 20.2.2.11 Math.clz32(x) var $export = require('./_export'); @@ -8781,7 +8782,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":104}],231:[function(require,module,exports){ +},{"./_export":105}],232:[function(require,module,exports){ // 20.2.2.12 Math.cosh(x) var $export = require('./_export'); var exp = Math.exp; @@ -8792,20 +8793,20 @@ $export($export.S, 'Math', { } }); -},{"./_export":104}],232:[function(require,module,exports){ +},{"./_export":105}],233:[function(require,module,exports){ // 20.2.2.14 Math.expm1(x) var $export = require('./_export'); var $expm1 = require('./_math-expm1'); $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); -},{"./_export":104,"./_math-expm1":132}],233:[function(require,module,exports){ +},{"./_export":105,"./_math-expm1":133}],234:[function(require,module,exports){ // 20.2.2.16 Math.fround(x) var $export = require('./_export'); $export($export.S, 'Math', { fround: require('./_math-fround') }); -},{"./_export":104,"./_math-fround":133}],234:[function(require,module,exports){ +},{"./_export":105,"./_math-fround":134}],235:[function(require,module,exports){ // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) var $export = require('./_export'); var abs = Math.abs; @@ -8832,7 +8833,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":104}],235:[function(require,module,exports){ +},{"./_export":105}],236:[function(require,module,exports){ // 20.2.2.18 Math.imul(x, y) var $export = require('./_export'); var $imul = Math.imul; @@ -8851,7 +8852,7 @@ $export($export.S + $export.F * require('./_fails')(function () { } }); -},{"./_export":104,"./_fails":106}],236:[function(require,module,exports){ +},{"./_export":105,"./_fails":107}],237:[function(require,module,exports){ // 20.2.2.21 Math.log10(x) var $export = require('./_export'); @@ -8861,13 +8862,13 @@ $export($export.S, 'Math', { } }); -},{"./_export":104}],237:[function(require,module,exports){ +},{"./_export":105}],238:[function(require,module,exports){ // 20.2.2.20 Math.log1p(x) var $export = require('./_export'); $export($export.S, 'Math', { log1p: require('./_math-log1p') }); -},{"./_export":104,"./_math-log1p":134}],238:[function(require,module,exports){ +},{"./_export":105,"./_math-log1p":135}],239:[function(require,module,exports){ // 20.2.2.22 Math.log2(x) var $export = require('./_export'); @@ -8877,13 +8878,13 @@ $export($export.S, 'Math', { } }); -},{"./_export":104}],239:[function(require,module,exports){ +},{"./_export":105}],240:[function(require,module,exports){ // 20.2.2.28 Math.sign(x) var $export = require('./_export'); $export($export.S, 'Math', { sign: require('./_math-sign') }); -},{"./_export":104,"./_math-sign":135}],240:[function(require,module,exports){ +},{"./_export":105,"./_math-sign":136}],241:[function(require,module,exports){ // 20.2.2.30 Math.sinh(x) var $export = require('./_export'); var expm1 = require('./_math-expm1'); @@ -8900,7 +8901,7 @@ $export($export.S + $export.F * require('./_fails')(function () { } }); -},{"./_export":104,"./_fails":106,"./_math-expm1":132}],241:[function(require,module,exports){ +},{"./_export":105,"./_fails":107,"./_math-expm1":133}],242:[function(require,module,exports){ // 20.2.2.33 Math.tanh(x) var $export = require('./_export'); var expm1 = require('./_math-expm1'); @@ -8914,7 +8915,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":104,"./_math-expm1":132}],242:[function(require,module,exports){ +},{"./_export":105,"./_math-expm1":133}],243:[function(require,module,exports){ // 20.2.2.34 Math.trunc(x) var $export = require('./_export'); @@ -8924,7 +8925,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":104}],243:[function(require,module,exports){ +},{"./_export":105}],244:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var has = require('./_has'); @@ -8995,13 +8996,13 @@ if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { require('./_redefine')(global, NUMBER, $Number); } -},{"./_cof":90,"./_descriptors":100,"./_fails":106,"./_global":112,"./_has":113,"./_inherit-if-required":117,"./_object-create":140,"./_object-dp":141,"./_object-gopd":143,"./_object-gopn":145,"./_redefine":160,"./_string-trim":176,"./_to-primitive":185}],244:[function(require,module,exports){ +},{"./_cof":91,"./_descriptors":101,"./_fails":107,"./_global":113,"./_has":114,"./_inherit-if-required":118,"./_object-create":141,"./_object-dp":142,"./_object-gopd":144,"./_object-gopn":146,"./_redefine":161,"./_string-trim":177,"./_to-primitive":186}],245:[function(require,module,exports){ // 20.1.2.1 Number.EPSILON var $export = require('./_export'); $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); -},{"./_export":104}],245:[function(require,module,exports){ +},{"./_export":105}],246:[function(require,module,exports){ // 20.1.2.2 Number.isFinite(number) var $export = require('./_export'); var _isFinite = require('./_global').isFinite; @@ -9012,13 +9013,13 @@ $export($export.S, 'Number', { } }); -},{"./_export":104,"./_global":112}],246:[function(require,module,exports){ +},{"./_export":105,"./_global":113}],247:[function(require,module,exports){ // 20.1.2.3 Number.isInteger(number) var $export = require('./_export'); $export($export.S, 'Number', { isInteger: require('./_is-integer') }); -},{"./_export":104,"./_is-integer":122}],247:[function(require,module,exports){ +},{"./_export":105,"./_is-integer":123}],248:[function(require,module,exports){ // 20.1.2.4 Number.isNaN(number) var $export = require('./_export'); @@ -9029,7 +9030,7 @@ $export($export.S, 'Number', { } }); -},{"./_export":104}],248:[function(require,module,exports){ +},{"./_export":105}],249:[function(require,module,exports){ // 20.1.2.5 Number.isSafeInteger(number) var $export = require('./_export'); var isInteger = require('./_is-integer'); @@ -9041,31 +9042,31 @@ $export($export.S, 'Number', { } }); -},{"./_export":104,"./_is-integer":122}],249:[function(require,module,exports){ +},{"./_export":105,"./_is-integer":123}],250:[function(require,module,exports){ // 20.1.2.6 Number.MAX_SAFE_INTEGER var $export = require('./_export'); $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); -},{"./_export":104}],250:[function(require,module,exports){ +},{"./_export":105}],251:[function(require,module,exports){ // 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = require('./_export'); $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); -},{"./_export":104}],251:[function(require,module,exports){ +},{"./_export":105}],252:[function(require,module,exports){ var $export = require('./_export'); var $parseFloat = require('./_parse-float'); // 20.1.2.12 Number.parseFloat(string) $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); -},{"./_export":104,"./_parse-float":154}],252:[function(require,module,exports){ +},{"./_export":105,"./_parse-float":155}],253:[function(require,module,exports){ var $export = require('./_export'); var $parseInt = require('./_parse-int'); // 20.1.2.13 Number.parseInt(string, radix) $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); -},{"./_export":104,"./_parse-int":155}],253:[function(require,module,exports){ +},{"./_export":105,"./_parse-int":156}],254:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var toInteger = require('./_to-integer'); @@ -9181,7 +9182,7 @@ $export($export.P + $export.F * (!!$toFixed && ( } }); -},{"./_a-number-value":76,"./_export":104,"./_fails":106,"./_string-repeat":175,"./_to-integer":181}],254:[function(require,module,exports){ +},{"./_a-number-value":77,"./_export":105,"./_fails":107,"./_string-repeat":176,"./_to-integer":182}],255:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $fails = require('./_fails'); @@ -9201,28 +9202,28 @@ $export($export.P + $export.F * ($fails(function () { } }); -},{"./_a-number-value":76,"./_export":104,"./_fails":106}],255:[function(require,module,exports){ +},{"./_a-number-value":77,"./_export":105,"./_fails":107}],256:[function(require,module,exports){ // 19.1.3.1 Object.assign(target, source) var $export = require('./_export'); $export($export.S + $export.F, 'Object', { assign: require('./_object-assign') }); -},{"./_export":104,"./_object-assign":139}],256:[function(require,module,exports){ +},{"./_export":105,"./_object-assign":140}],257:[function(require,module,exports){ var $export = require('./_export'); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', { create: require('./_object-create') }); -},{"./_export":104,"./_object-create":140}],257:[function(require,module,exports){ +},{"./_export":105,"./_object-create":141}],258:[function(require,module,exports){ var $export = require('./_export'); // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) $export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') }); -},{"./_descriptors":100,"./_export":104,"./_object-dps":142}],258:[function(require,module,exports){ +},{"./_descriptors":101,"./_export":105,"./_object-dps":143}],259:[function(require,module,exports){ var $export = require('./_export'); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f }); -},{"./_descriptors":100,"./_export":104,"./_object-dp":141}],259:[function(require,module,exports){ +},{"./_descriptors":101,"./_export":105,"./_object-dp":142}],260:[function(require,module,exports){ // 19.1.2.5 Object.freeze(O) var isObject = require('./_is-object'); var meta = require('./_meta').onFreeze; @@ -9233,7 +9234,7 @@ require('./_object-sap')('freeze', function ($freeze) { }; }); -},{"./_is-object":123,"./_meta":136,"./_object-sap":151}],260:[function(require,module,exports){ +},{"./_is-object":124,"./_meta":137,"./_object-sap":152}],261:[function(require,module,exports){ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = require('./_to-iobject'); var $getOwnPropertyDescriptor = require('./_object-gopd').f; @@ -9244,13 +9245,13 @@ require('./_object-sap')('getOwnPropertyDescriptor', function () { }; }); -},{"./_object-gopd":143,"./_object-sap":151,"./_to-iobject":182}],261:[function(require,module,exports){ +},{"./_object-gopd":144,"./_object-sap":152,"./_to-iobject":183}],262:[function(require,module,exports){ // 19.1.2.7 Object.getOwnPropertyNames(O) require('./_object-sap')('getOwnPropertyNames', function () { return require('./_object-gopn-ext').f; }); -},{"./_object-gopn-ext":144,"./_object-sap":151}],262:[function(require,module,exports){ +},{"./_object-gopn-ext":145,"./_object-sap":152}],263:[function(require,module,exports){ // 19.1.2.9 Object.getPrototypeOf(O) var toObject = require('./_to-object'); var $getPrototypeOf = require('./_object-gpo'); @@ -9261,7 +9262,7 @@ require('./_object-sap')('getPrototypeOf', function () { }; }); -},{"./_object-gpo":147,"./_object-sap":151,"./_to-object":184}],263:[function(require,module,exports){ +},{"./_object-gpo":148,"./_object-sap":152,"./_to-object":185}],264:[function(require,module,exports){ // 19.1.2.11 Object.isExtensible(O) var isObject = require('./_is-object'); @@ -9271,7 +9272,7 @@ require('./_object-sap')('isExtensible', function ($isExtensible) { }; }); -},{"./_is-object":123,"./_object-sap":151}],264:[function(require,module,exports){ +},{"./_is-object":124,"./_object-sap":152}],265:[function(require,module,exports){ // 19.1.2.12 Object.isFrozen(O) var isObject = require('./_is-object'); @@ -9281,7 +9282,7 @@ require('./_object-sap')('isFrozen', function ($isFrozen) { }; }); -},{"./_is-object":123,"./_object-sap":151}],265:[function(require,module,exports){ +},{"./_is-object":124,"./_object-sap":152}],266:[function(require,module,exports){ // 19.1.2.13 Object.isSealed(O) var isObject = require('./_is-object'); @@ -9291,12 +9292,12 @@ require('./_object-sap')('isSealed', function ($isSealed) { }; }); -},{"./_is-object":123,"./_object-sap":151}],266:[function(require,module,exports){ +},{"./_is-object":124,"./_object-sap":152}],267:[function(require,module,exports){ // 19.1.3.10 Object.is(value1, value2) var $export = require('./_export'); $export($export.S, 'Object', { is: require('./_same-value') }); -},{"./_export":104,"./_same-value":163}],267:[function(require,module,exports){ +},{"./_export":105,"./_same-value":164}],268:[function(require,module,exports){ // 19.1.2.14 Object.keys(O) var toObject = require('./_to-object'); var $keys = require('./_object-keys'); @@ -9307,7 +9308,7 @@ require('./_object-sap')('keys', function () { }; }); -},{"./_object-keys":149,"./_object-sap":151,"./_to-object":184}],268:[function(require,module,exports){ +},{"./_object-keys":150,"./_object-sap":152,"./_to-object":185}],269:[function(require,module,exports){ // 19.1.2.15 Object.preventExtensions(O) var isObject = require('./_is-object'); var meta = require('./_meta').onFreeze; @@ -9318,7 +9319,7 @@ require('./_object-sap')('preventExtensions', function ($preventExtensions) { }; }); -},{"./_is-object":123,"./_meta":136,"./_object-sap":151}],269:[function(require,module,exports){ +},{"./_is-object":124,"./_meta":137,"./_object-sap":152}],270:[function(require,module,exports){ // 19.1.2.17 Object.seal(O) var isObject = require('./_is-object'); var meta = require('./_meta').onFreeze; @@ -9329,12 +9330,12 @@ require('./_object-sap')('seal', function ($seal) { }; }); -},{"./_is-object":123,"./_meta":136,"./_object-sap":151}],270:[function(require,module,exports){ +},{"./_is-object":124,"./_meta":137,"./_object-sap":152}],271:[function(require,module,exports){ // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = require('./_export'); $export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set }); -},{"./_export":104,"./_set-proto":164}],271:[function(require,module,exports){ +},{"./_export":105,"./_set-proto":165}],272:[function(require,module,exports){ 'use strict'; // 19.1.3.6 Object.prototype.toString() var classof = require('./_classof'); @@ -9346,19 +9347,19 @@ if (test + '' != '[object z]') { }, true); } -},{"./_classof":89,"./_redefine":160,"./_wks":194}],272:[function(require,module,exports){ +},{"./_classof":90,"./_redefine":161,"./_wks":195}],273:[function(require,module,exports){ var $export = require('./_export'); var $parseFloat = require('./_parse-float'); // 18.2.4 parseFloat(string) $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); -},{"./_export":104,"./_parse-float":154}],273:[function(require,module,exports){ +},{"./_export":105,"./_parse-float":155}],274:[function(require,module,exports){ var $export = require('./_export'); var $parseInt = require('./_parse-int'); // 18.2.5 parseInt(string, radix) $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); -},{"./_export":104,"./_parse-int":155}],274:[function(require,module,exports){ +},{"./_export":105,"./_parse-int":156}],275:[function(require,module,exports){ 'use strict'; var LIBRARY = require('./_library'); var global = require('./_global'); @@ -9646,7 +9647,7 @@ $export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(functi } }); -},{"./_a-function":75,"./_an-instance":79,"./_classof":89,"./_core":94,"./_ctx":96,"./_export":104,"./_for-of":110,"./_global":112,"./_is-object":123,"./_iter-detect":128,"./_library":131,"./_microtask":137,"./_new-promise-capability":138,"./_perform":156,"./_promise-resolve":157,"./_redefine-all":159,"./_set-species":165,"./_set-to-string-tag":166,"./_species-constructor":169,"./_task":178,"./_user-agent":190,"./_wks":194}],275:[function(require,module,exports){ +},{"./_a-function":76,"./_an-instance":80,"./_classof":90,"./_core":95,"./_ctx":97,"./_export":105,"./_for-of":111,"./_global":113,"./_is-object":124,"./_iter-detect":129,"./_library":132,"./_microtask":138,"./_new-promise-capability":139,"./_perform":157,"./_promise-resolve":158,"./_redefine-all":160,"./_set-species":166,"./_set-to-string-tag":167,"./_species-constructor":170,"./_task":179,"./_user-agent":191,"./_wks":195}],276:[function(require,module,exports){ // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) var $export = require('./_export'); var aFunction = require('./_a-function'); @@ -9664,7 +9665,7 @@ $export($export.S + $export.F * !require('./_fails')(function () { } }); -},{"./_a-function":75,"./_an-object":80,"./_export":104,"./_fails":106,"./_global":112}],276:[function(require,module,exports){ +},{"./_a-function":76,"./_an-object":81,"./_export":105,"./_fails":107,"./_global":113}],277:[function(require,module,exports){ // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) var $export = require('./_export'); var create = require('./_object-create'); @@ -9713,7 +9714,7 @@ $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { } }); -},{"./_a-function":75,"./_an-object":80,"./_bind":88,"./_export":104,"./_fails":106,"./_global":112,"./_is-object":123,"./_object-create":140}],277:[function(require,module,exports){ +},{"./_a-function":76,"./_an-object":81,"./_bind":89,"./_export":105,"./_fails":107,"./_global":113,"./_is-object":124,"./_object-create":141}],278:[function(require,module,exports){ // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) var dP = require('./_object-dp'); var $export = require('./_export'); @@ -9738,7 +9739,7 @@ $export($export.S + $export.F * require('./_fails')(function () { } }); -},{"./_an-object":80,"./_export":104,"./_fails":106,"./_object-dp":141,"./_to-primitive":185}],278:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105,"./_fails":107,"./_object-dp":142,"./_to-primitive":186}],279:[function(require,module,exports){ // 26.1.4 Reflect.deleteProperty(target, propertyKey) var $export = require('./_export'); var gOPD = require('./_object-gopd').f; @@ -9751,7 +9752,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":80,"./_export":104,"./_object-gopd":143}],279:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105,"./_object-gopd":144}],280:[function(require,module,exports){ 'use strict'; // 26.1.5 Reflect.enumerate(target) var $export = require('./_export'); @@ -9779,7 +9780,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":80,"./_export":104,"./_iter-create":126}],280:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105,"./_iter-create":127}],281:[function(require,module,exports){ // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) var gOPD = require('./_object-gopd'); var $export = require('./_export'); @@ -9791,7 +9792,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":80,"./_export":104,"./_object-gopd":143}],281:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105,"./_object-gopd":144}],282:[function(require,module,exports){ // 26.1.8 Reflect.getPrototypeOf(target) var $export = require('./_export'); var getProto = require('./_object-gpo'); @@ -9803,7 +9804,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":80,"./_export":104,"./_object-gpo":147}],282:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105,"./_object-gpo":148}],283:[function(require,module,exports){ // 26.1.6 Reflect.get(target, propertyKey [, receiver]) var gOPD = require('./_object-gopd'); var getPrototypeOf = require('./_object-gpo'); @@ -9826,7 +9827,7 @@ function get(target, propertyKey /* , receiver */) { $export($export.S, 'Reflect', { get: get }); -},{"./_an-object":80,"./_export":104,"./_has":113,"./_is-object":123,"./_object-gopd":143,"./_object-gpo":147}],283:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105,"./_has":114,"./_is-object":124,"./_object-gopd":144,"./_object-gpo":148}],284:[function(require,module,exports){ // 26.1.9 Reflect.has(target, propertyKey) var $export = require('./_export'); @@ -9836,7 +9837,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_export":104}],284:[function(require,module,exports){ +},{"./_export":105}],285:[function(require,module,exports){ // 26.1.10 Reflect.isExtensible(target) var $export = require('./_export'); var anObject = require('./_an-object'); @@ -9849,13 +9850,13 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":80,"./_export":104}],285:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105}],286:[function(require,module,exports){ // 26.1.11 Reflect.ownKeys(target) var $export = require('./_export'); $export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); -},{"./_export":104,"./_own-keys":153}],286:[function(require,module,exports){ +},{"./_export":105,"./_own-keys":154}],287:[function(require,module,exports){ // 26.1.12 Reflect.preventExtensions(target) var $export = require('./_export'); var anObject = require('./_an-object'); @@ -9873,7 +9874,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":80,"./_export":104}],287:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105}],288:[function(require,module,exports){ // 26.1.14 Reflect.setPrototypeOf(target, proto) var $export = require('./_export'); var setProto = require('./_set-proto'); @@ -9890,7 +9891,7 @@ if (setProto) $export($export.S, 'Reflect', { } }); -},{"./_export":104,"./_set-proto":164}],288:[function(require,module,exports){ +},{"./_export":105,"./_set-proto":165}],289:[function(require,module,exports){ // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) var dP = require('./_object-dp'); var gOPD = require('./_object-gopd'); @@ -9925,7 +9926,7 @@ function set(target, propertyKey, V /* , receiver */) { $export($export.S, 'Reflect', { set: set }); -},{"./_an-object":80,"./_export":104,"./_has":113,"./_is-object":123,"./_object-dp":141,"./_object-gopd":143,"./_object-gpo":147,"./_property-desc":158}],289:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105,"./_has":114,"./_is-object":124,"./_object-dp":142,"./_object-gopd":144,"./_object-gpo":148,"./_property-desc":159}],290:[function(require,module,exports){ var global = require('./_global'); var inheritIfRequired = require('./_inherit-if-required'); var dP = require('./_object-dp').f; @@ -9970,7 +9971,7 @@ if (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function ( require('./_set-species')('RegExp'); -},{"./_descriptors":100,"./_fails":106,"./_flags":108,"./_global":112,"./_inherit-if-required":117,"./_is-regexp":124,"./_object-dp":141,"./_object-gopn":145,"./_redefine":160,"./_set-species":165,"./_wks":194}],290:[function(require,module,exports){ +},{"./_descriptors":101,"./_fails":107,"./_flags":109,"./_global":113,"./_inherit-if-required":118,"./_is-regexp":125,"./_object-dp":142,"./_object-gopn":146,"./_redefine":161,"./_set-species":166,"./_wks":195}],291:[function(require,module,exports){ 'use strict'; var regexpExec = require('./_regexp-exec'); require('./_export')({ @@ -9981,14 +9982,14 @@ require('./_export')({ exec: regexpExec }); -},{"./_export":104,"./_regexp-exec":162}],291:[function(require,module,exports){ +},{"./_export":105,"./_regexp-exec":163}],292:[function(require,module,exports){ // 21.2.5.3 get RegExp.prototype.flags() if (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', { configurable: true, get: require('./_flags') }); -},{"./_descriptors":100,"./_flags":108,"./_object-dp":141}],292:[function(require,module,exports){ +},{"./_descriptors":101,"./_flags":109,"./_object-dp":142}],293:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); @@ -10030,7 +10031,7 @@ require('./_fix-re-wks')('match', 1, function (defined, MATCH, $match, maybeCall ]; }); -},{"./_advance-string-index":78,"./_an-object":80,"./_fix-re-wks":107,"./_regexp-exec-abstract":161,"./_to-length":183}],293:[function(require,module,exports){ +},{"./_advance-string-index":79,"./_an-object":81,"./_fix-re-wks":108,"./_regexp-exec-abstract":162,"./_to-length":184}],294:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); @@ -10150,7 +10151,7 @@ require('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, may } }); -},{"./_advance-string-index":78,"./_an-object":80,"./_fix-re-wks":107,"./_regexp-exec-abstract":161,"./_to-integer":181,"./_to-length":183,"./_to-object":184}],294:[function(require,module,exports){ +},{"./_advance-string-index":79,"./_an-object":81,"./_fix-re-wks":108,"./_regexp-exec-abstract":162,"./_to-integer":182,"./_to-length":184,"./_to-object":185}],295:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); @@ -10183,7 +10184,7 @@ require('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search, maybeC ]; }); -},{"./_an-object":80,"./_fix-re-wks":107,"./_regexp-exec-abstract":161,"./_same-value":163}],295:[function(require,module,exports){ +},{"./_an-object":81,"./_fix-re-wks":108,"./_regexp-exec-abstract":162,"./_same-value":164}],296:[function(require,module,exports){ 'use strict'; var isRegExp = require('./_is-regexp'); @@ -10319,7 +10320,7 @@ require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCall ]; }); -},{"./_advance-string-index":78,"./_an-object":80,"./_fails":106,"./_fix-re-wks":107,"./_is-regexp":124,"./_regexp-exec":162,"./_regexp-exec-abstract":161,"./_species-constructor":169,"./_to-length":183}],296:[function(require,module,exports){ +},{"./_advance-string-index":79,"./_an-object":81,"./_fails":107,"./_fix-re-wks":108,"./_is-regexp":125,"./_regexp-exec":163,"./_regexp-exec-abstract":162,"./_species-constructor":170,"./_to-length":184}],297:[function(require,module,exports){ 'use strict'; require('./es6.regexp.flags'); var anObject = require('./_an-object'); @@ -10346,7 +10347,7 @@ if (require('./_fails')(function () { return $toString.call({ source: 'a', flags }); } -},{"./_an-object":80,"./_descriptors":100,"./_fails":106,"./_flags":108,"./_redefine":160,"./es6.regexp.flags":291}],297:[function(require,module,exports){ +},{"./_an-object":81,"./_descriptors":101,"./_fails":107,"./_flags":109,"./_redefine":161,"./es6.regexp.flags":292}],298:[function(require,module,exports){ 'use strict'; var strong = require('./_collection-strong'); var validate = require('./_validate-collection'); @@ -10362,7 +10363,7 @@ module.exports = require('./_collection')(SET, function (get) { } }, strong); -},{"./_collection":93,"./_collection-strong":91,"./_validate-collection":191}],298:[function(require,module,exports){ +},{"./_collection":94,"./_collection-strong":92,"./_validate-collection":192}],299:[function(require,module,exports){ 'use strict'; // B.2.3.2 String.prototype.anchor(name) require('./_string-html')('anchor', function (createHTML) { @@ -10371,7 +10372,7 @@ require('./_string-html')('anchor', function (createHTML) { }; }); -},{"./_string-html":173}],299:[function(require,module,exports){ +},{"./_string-html":174}],300:[function(require,module,exports){ 'use strict'; // B.2.3.3 String.prototype.big() require('./_string-html')('big', function (createHTML) { @@ -10380,7 +10381,7 @@ require('./_string-html')('big', function (createHTML) { }; }); -},{"./_string-html":173}],300:[function(require,module,exports){ +},{"./_string-html":174}],301:[function(require,module,exports){ 'use strict'; // B.2.3.4 String.prototype.blink() require('./_string-html')('blink', function (createHTML) { @@ -10389,7 +10390,7 @@ require('./_string-html')('blink', function (createHTML) { }; }); -},{"./_string-html":173}],301:[function(require,module,exports){ +},{"./_string-html":174}],302:[function(require,module,exports){ 'use strict'; // B.2.3.5 String.prototype.bold() require('./_string-html')('bold', function (createHTML) { @@ -10398,7 +10399,7 @@ require('./_string-html')('bold', function (createHTML) { }; }); -},{"./_string-html":173}],302:[function(require,module,exports){ +},{"./_string-html":174}],303:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $at = require('./_string-at')(false); @@ -10409,7 +10410,7 @@ $export($export.P, 'String', { } }); -},{"./_export":104,"./_string-at":171}],303:[function(require,module,exports){ +},{"./_export":105,"./_string-at":172}],304:[function(require,module,exports){ // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) 'use strict'; var $export = require('./_export'); @@ -10431,7 +10432,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'Strin } }); -},{"./_export":104,"./_fails-is-regexp":105,"./_string-context":172,"./_to-length":183}],304:[function(require,module,exports){ +},{"./_export":105,"./_fails-is-regexp":106,"./_string-context":173,"./_to-length":184}],305:[function(require,module,exports){ 'use strict'; // B.2.3.6 String.prototype.fixed() require('./_string-html')('fixed', function (createHTML) { @@ -10440,7 +10441,7 @@ require('./_string-html')('fixed', function (createHTML) { }; }); -},{"./_string-html":173}],305:[function(require,module,exports){ +},{"./_string-html":174}],306:[function(require,module,exports){ 'use strict'; // B.2.3.7 String.prototype.fontcolor(color) require('./_string-html')('fontcolor', function (createHTML) { @@ -10449,7 +10450,7 @@ require('./_string-html')('fontcolor', function (createHTML) { }; }); -},{"./_string-html":173}],306:[function(require,module,exports){ +},{"./_string-html":174}],307:[function(require,module,exports){ 'use strict'; // B.2.3.8 String.prototype.fontsize(size) require('./_string-html')('fontsize', function (createHTML) { @@ -10458,7 +10459,7 @@ require('./_string-html')('fontsize', function (createHTML) { }; }); -},{"./_string-html":173}],307:[function(require,module,exports){ +},{"./_string-html":174}],308:[function(require,module,exports){ var $export = require('./_export'); var toAbsoluteIndex = require('./_to-absolute-index'); var fromCharCode = String.fromCharCode; @@ -10483,7 +10484,7 @@ $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1) } }); -},{"./_export":104,"./_to-absolute-index":179}],308:[function(require,module,exports){ +},{"./_export":105,"./_to-absolute-index":180}],309:[function(require,module,exports){ // 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = require('./_export'); @@ -10497,7 +10498,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String } }); -},{"./_export":104,"./_fails-is-regexp":105,"./_string-context":172}],309:[function(require,module,exports){ +},{"./_export":105,"./_fails-is-regexp":106,"./_string-context":173}],310:[function(require,module,exports){ 'use strict'; // B.2.3.9 String.prototype.italics() require('./_string-html')('italics', function (createHTML) { @@ -10506,7 +10507,7 @@ require('./_string-html')('italics', function (createHTML) { }; }); -},{"./_string-html":173}],310:[function(require,module,exports){ +},{"./_string-html":174}],311:[function(require,module,exports){ 'use strict'; var $at = require('./_string-at')(true); @@ -10525,7 +10526,7 @@ require('./_iter-define')(String, 'String', function (iterated) { return { value: point, done: false }; }); -},{"./_iter-define":127,"./_string-at":171}],311:[function(require,module,exports){ +},{"./_iter-define":128,"./_string-at":172}],312:[function(require,module,exports){ 'use strict'; // B.2.3.10 String.prototype.link(url) require('./_string-html')('link', function (createHTML) { @@ -10534,7 +10535,7 @@ require('./_string-html')('link', function (createHTML) { }; }); -},{"./_string-html":173}],312:[function(require,module,exports){ +},{"./_string-html":174}],313:[function(require,module,exports){ var $export = require('./_export'); var toIObject = require('./_to-iobject'); var toLength = require('./_to-length'); @@ -10554,7 +10555,7 @@ $export($export.S, 'String', { } }); -},{"./_export":104,"./_to-iobject":182,"./_to-length":183}],313:[function(require,module,exports){ +},{"./_export":105,"./_to-iobject":183,"./_to-length":184}],314:[function(require,module,exports){ var $export = require('./_export'); $export($export.P, 'String', { @@ -10562,7 +10563,7 @@ $export($export.P, 'String', { repeat: require('./_string-repeat') }); -},{"./_export":104,"./_string-repeat":175}],314:[function(require,module,exports){ +},{"./_export":105,"./_string-repeat":176}],315:[function(require,module,exports){ 'use strict'; // B.2.3.11 String.prototype.small() require('./_string-html')('small', function (createHTML) { @@ -10571,7 +10572,7 @@ require('./_string-html')('small', function (createHTML) { }; }); -},{"./_string-html":173}],315:[function(require,module,exports){ +},{"./_string-html":174}],316:[function(require,module,exports){ // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) 'use strict'; var $export = require('./_export'); @@ -10591,7 +10592,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'Str } }); -},{"./_export":104,"./_fails-is-regexp":105,"./_string-context":172,"./_to-length":183}],316:[function(require,module,exports){ +},{"./_export":105,"./_fails-is-regexp":106,"./_string-context":173,"./_to-length":184}],317:[function(require,module,exports){ 'use strict'; // B.2.3.12 String.prototype.strike() require('./_string-html')('strike', function (createHTML) { @@ -10600,7 +10601,7 @@ require('./_string-html')('strike', function (createHTML) { }; }); -},{"./_string-html":173}],317:[function(require,module,exports){ +},{"./_string-html":174}],318:[function(require,module,exports){ 'use strict'; // B.2.3.13 String.prototype.sub() require('./_string-html')('sub', function (createHTML) { @@ -10609,7 +10610,7 @@ require('./_string-html')('sub', function (createHTML) { }; }); -},{"./_string-html":173}],318:[function(require,module,exports){ +},{"./_string-html":174}],319:[function(require,module,exports){ 'use strict'; // B.2.3.14 String.prototype.sup() require('./_string-html')('sup', function (createHTML) { @@ -10618,7 +10619,7 @@ require('./_string-html')('sup', function (createHTML) { }; }); -},{"./_string-html":173}],319:[function(require,module,exports){ +},{"./_string-html":174}],320:[function(require,module,exports){ 'use strict'; // 21.1.3.25 String.prototype.trim() require('./_string-trim')('trim', function ($trim) { @@ -10627,7 +10628,7 @@ require('./_string-trim')('trim', function ($trim) { }; }); -},{"./_string-trim":176}],320:[function(require,module,exports){ +},{"./_string-trim":177}],321:[function(require,module,exports){ 'use strict'; // ECMAScript 6 symbols shim var global = require('./_global'); @@ -10875,7 +10876,7 @@ setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); -},{"./_an-object":80,"./_descriptors":100,"./_enum-keys":103,"./_export":104,"./_fails":106,"./_global":112,"./_has":113,"./_hide":114,"./_is-array":121,"./_is-object":123,"./_library":131,"./_meta":136,"./_object-create":140,"./_object-dp":141,"./_object-gopd":143,"./_object-gopn":145,"./_object-gopn-ext":144,"./_object-gops":146,"./_object-keys":149,"./_object-pie":150,"./_property-desc":158,"./_redefine":160,"./_set-to-string-tag":166,"./_shared":168,"./_to-iobject":182,"./_to-object":184,"./_to-primitive":185,"./_uid":189,"./_wks":194,"./_wks-define":192,"./_wks-ext":193}],321:[function(require,module,exports){ +},{"./_an-object":81,"./_descriptors":101,"./_enum-keys":104,"./_export":105,"./_fails":107,"./_global":113,"./_has":114,"./_hide":115,"./_is-array":122,"./_is-object":124,"./_library":132,"./_meta":137,"./_object-create":141,"./_object-dp":142,"./_object-gopd":144,"./_object-gopn":146,"./_object-gopn-ext":145,"./_object-gops":147,"./_object-keys":150,"./_object-pie":151,"./_property-desc":159,"./_redefine":161,"./_set-to-string-tag":167,"./_shared":169,"./_to-iobject":183,"./_to-object":185,"./_to-primitive":186,"./_uid":190,"./_wks":195,"./_wks-define":193,"./_wks-ext":194}],322:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $typed = require('./_typed'); @@ -10923,76 +10924,76 @@ $export($export.P + $export.U + $export.F * require('./_fails')(function () { require('./_set-species')(ARRAY_BUFFER); -},{"./_an-object":80,"./_export":104,"./_fails":106,"./_global":112,"./_is-object":123,"./_set-species":165,"./_species-constructor":169,"./_to-absolute-index":179,"./_to-length":183,"./_typed":188,"./_typed-buffer":187}],322:[function(require,module,exports){ +},{"./_an-object":81,"./_export":105,"./_fails":107,"./_global":113,"./_is-object":124,"./_set-species":166,"./_species-constructor":170,"./_to-absolute-index":180,"./_to-length":184,"./_typed":189,"./_typed-buffer":188}],323:[function(require,module,exports){ var $export = require('./_export'); $export($export.G + $export.W + $export.F * !require('./_typed').ABV, { DataView: require('./_typed-buffer').DataView }); -},{"./_export":104,"./_typed":188,"./_typed-buffer":187}],323:[function(require,module,exports){ +},{"./_export":105,"./_typed":189,"./_typed-buffer":188}],324:[function(require,module,exports){ require('./_typed-array')('Float32', 4, function (init) { return function Float32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":186}],324:[function(require,module,exports){ +},{"./_typed-array":187}],325:[function(require,module,exports){ require('./_typed-array')('Float64', 8, function (init) { return function Float64Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":186}],325:[function(require,module,exports){ +},{"./_typed-array":187}],326:[function(require,module,exports){ require('./_typed-array')('Int16', 2, function (init) { return function Int16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":186}],326:[function(require,module,exports){ +},{"./_typed-array":187}],327:[function(require,module,exports){ require('./_typed-array')('Int32', 4, function (init) { return function Int32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":186}],327:[function(require,module,exports){ +},{"./_typed-array":187}],328:[function(require,module,exports){ require('./_typed-array')('Int8', 1, function (init) { return function Int8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":186}],328:[function(require,module,exports){ +},{"./_typed-array":187}],329:[function(require,module,exports){ require('./_typed-array')('Uint16', 2, function (init) { return function Uint16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":186}],329:[function(require,module,exports){ +},{"./_typed-array":187}],330:[function(require,module,exports){ require('./_typed-array')('Uint32', 4, function (init) { return function Uint32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":186}],330:[function(require,module,exports){ +},{"./_typed-array":187}],331:[function(require,module,exports){ require('./_typed-array')('Uint8', 1, function (init) { return function Uint8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":186}],331:[function(require,module,exports){ +},{"./_typed-array":187}],332:[function(require,module,exports){ require('./_typed-array')('Uint8', 1, function (init) { return function Uint8ClampedArray(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }, true); -},{"./_typed-array":186}],332:[function(require,module,exports){ +},{"./_typed-array":187}],333:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var each = require('./_array-methods')(0); @@ -11054,7 +11055,7 @@ if (NATIVE_WEAK_MAP && IS_IE11) { }); } -},{"./_array-methods":84,"./_collection":93,"./_collection-weak":92,"./_global":112,"./_is-object":123,"./_meta":136,"./_object-assign":139,"./_redefine":160,"./_validate-collection":191}],333:[function(require,module,exports){ +},{"./_array-methods":85,"./_collection":94,"./_collection-weak":93,"./_global":113,"./_is-object":124,"./_meta":137,"./_object-assign":140,"./_redefine":161,"./_validate-collection":192}],334:[function(require,module,exports){ 'use strict'; var weak = require('./_collection-weak'); var validate = require('./_validate-collection'); @@ -11070,7 +11071,7 @@ require('./_collection')(WEAK_SET, function (get) { } }, weak, false, true); -},{"./_collection":93,"./_collection-weak":92,"./_validate-collection":191}],334:[function(require,module,exports){ +},{"./_collection":94,"./_collection-weak":93,"./_validate-collection":192}],335:[function(require,module,exports){ 'use strict'; // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap var $export = require('./_export'); @@ -11094,7 +11095,7 @@ $export($export.P, 'Array', { require('./_add-to-unscopables')('flatMap'); -},{"./_a-function":75,"./_add-to-unscopables":77,"./_array-species-create":87,"./_export":104,"./_flatten-into-array":109,"./_to-length":183,"./_to-object":184}],335:[function(require,module,exports){ +},{"./_a-function":76,"./_add-to-unscopables":78,"./_array-species-create":88,"./_export":105,"./_flatten-into-array":110,"./_to-length":184,"./_to-object":185}],336:[function(require,module,exports){ 'use strict'; // https://github.com/tc39/Array.prototype.includes var $export = require('./_export'); @@ -11108,7 +11109,7 @@ $export($export.P, 'Array', { require('./_add-to-unscopables')('includes'); -},{"./_add-to-unscopables":77,"./_array-includes":83,"./_export":104}],336:[function(require,module,exports){ +},{"./_add-to-unscopables":78,"./_array-includes":84,"./_export":105}],337:[function(require,module,exports){ // https://github.com/tc39/proposal-object-values-entries var $export = require('./_export'); var $entries = require('./_object-to-array')(true); @@ -11119,7 +11120,7 @@ $export($export.S, 'Object', { } }); -},{"./_export":104,"./_object-to-array":152}],337:[function(require,module,exports){ +},{"./_export":105,"./_object-to-array":153}],338:[function(require,module,exports){ // https://github.com/tc39/proposal-object-getownpropertydescriptors var $export = require('./_export'); var ownKeys = require('./_own-keys'); @@ -11143,7 +11144,7 @@ $export($export.S, 'Object', { } }); -},{"./_create-property":95,"./_export":104,"./_object-gopd":143,"./_own-keys":153,"./_to-iobject":182}],338:[function(require,module,exports){ +},{"./_create-property":96,"./_export":105,"./_object-gopd":144,"./_own-keys":154,"./_to-iobject":183}],339:[function(require,module,exports){ // https://github.com/tc39/proposal-object-values-entries var $export = require('./_export'); var $values = require('./_object-to-array')(false); @@ -11154,7 +11155,7 @@ $export($export.S, 'Object', { } }); -},{"./_export":104,"./_object-to-array":152}],339:[function(require,module,exports){ +},{"./_export":105,"./_object-to-array":153}],340:[function(require,module,exports){ // https://github.com/tc39/proposal-promise-finally 'use strict'; var $export = require('./_export'); @@ -11176,7 +11177,7 @@ $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { ); } }); -},{"./_core":94,"./_export":104,"./_global":112,"./_promise-resolve":157,"./_species-constructor":169}],340:[function(require,module,exports){ +},{"./_core":95,"./_export":105,"./_global":113,"./_promise-resolve":158,"./_species-constructor":170}],341:[function(require,module,exports){ 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = require('./_export'); @@ -11192,7 +11193,7 @@ $export($export.P + $export.F * WEBKIT_BUG, 'String', { } }); -},{"./_export":104,"./_string-pad":174,"./_user-agent":190}],341:[function(require,module,exports){ +},{"./_export":105,"./_string-pad":175,"./_user-agent":191}],342:[function(require,module,exports){ 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = require('./_export'); @@ -11208,7 +11209,7 @@ $export($export.P + $export.F * WEBKIT_BUG, 'String', { } }); -},{"./_export":104,"./_string-pad":174,"./_user-agent":190}],342:[function(require,module,exports){ +},{"./_export":105,"./_string-pad":175,"./_user-agent":191}],343:[function(require,module,exports){ 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim require('./_string-trim')('trimLeft', function ($trim) { @@ -11217,7 +11218,7 @@ require('./_string-trim')('trimLeft', function ($trim) { }; }, 'trimStart'); -},{"./_string-trim":176}],343:[function(require,module,exports){ +},{"./_string-trim":177}],344:[function(require,module,exports){ 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim require('./_string-trim')('trimRight', function ($trim) { @@ -11226,10 +11227,10 @@ require('./_string-trim')('trimRight', function ($trim) { }; }, 'trimEnd'); -},{"./_string-trim":176}],344:[function(require,module,exports){ +},{"./_string-trim":177}],345:[function(require,module,exports){ require('./_wks-define')('asyncIterator'); -},{"./_wks-define":192}],345:[function(require,module,exports){ +},{"./_wks-define":193}],346:[function(require,module,exports){ var $iterators = require('./es6.array.iterator'); var getKeys = require('./_object-keys'); var redefine = require('./_redefine'); @@ -11289,7 +11290,7 @@ for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++ } } -},{"./_global":112,"./_hide":114,"./_iterators":130,"./_object-keys":149,"./_redefine":160,"./_wks":194,"./es6.array.iterator":206}],346:[function(require,module,exports){ +},{"./_global":113,"./_hide":115,"./_iterators":131,"./_object-keys":150,"./_redefine":161,"./_wks":195,"./es6.array.iterator":207}],347:[function(require,module,exports){ var $export = require('./_export'); var $task = require('./_task'); $export($export.G + $export.B, { @@ -11297,7 +11298,7 @@ $export($export.G + $export.B, { clearImmediate: $task.clear }); -},{"./_export":104,"./_task":178}],347:[function(require,module,exports){ +},{"./_export":105,"./_task":179}],348:[function(require,module,exports){ // ie9- setTimeout & setInterval additional parameters fix var global = require('./_global'); var $export = require('./_export'); @@ -11319,13 +11320,13 @@ $export($export.G + $export.B + $export.F * MSIE, { setInterval: wrap(global.setInterval) }); -},{"./_export":104,"./_global":112,"./_user-agent":190}],348:[function(require,module,exports){ +},{"./_export":105,"./_global":113,"./_user-agent":191}],349:[function(require,module,exports){ require('../modules/web.timers'); require('../modules/web.immediate'); require('../modules/web.dom.iterable'); module.exports = require('../modules/_core'); -},{"../modules/_core":94,"../modules/web.dom.iterable":345,"../modules/web.immediate":346,"../modules/web.timers":347}],349:[function(require,module,exports){ +},{"../modules/_core":95,"../modules/web.dom.iterable":346,"../modules/web.immediate":347,"../modules/web.timers":348}],350:[function(require,module,exports){ 'use strict'; var assign = require('object.assign'); @@ -11345,9 +11346,8 @@ var objectKeys = require('object-keys'); var whichBoxedPrimitive = require('which-boxed-primitive'); var whichCollection = require('which-collection'); var whichTypedArray = require('which-typed-array'); +var byteLength = require('array-buffer-byte-length'); -var byteLength = callBound('ArrayBuffer.prototype.byteLength', true) - || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property var sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); var $getTime = callBound('Date.prototype.getTime'); @@ -11642,9 +11642,16 @@ function objEquiv(a, b, opts, channel) { var aWhich = whichTypedArray(a); var bWhich = whichTypedArray(b); - if ((aWhich || bWhich) && aWhich !== bWhich) { + if (aWhich !== bWhich) { return false; } + if (aWhich || bWhich) { // && would work too, because both are true or both false here + if (a.length !== b.length) { return false; } + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { return false; } + } + return true; + } var aIsBuffer = isBuffer(a); var bIsBuffer = isBuffer(b); @@ -11713,7 +11720,69 @@ module.exports = function deepEqual(a, b, opts) { return internalDeepEqual(a, b, opts, getSideChannel()); }; -},{"call-bind/callBound":42,"es-get-iterator":351,"get-intrinsic":356,"is-arguments":367,"is-array-buffer":368,"is-date-object":372,"is-regex":376,"is-shared-array-buffer":378,"isarray":384,"object-is":387,"object-keys":391,"object.assign":394,"regexp.prototype.flags":401,"side-channel":404,"which-boxed-primitive":409,"which-collection":410,"which-typed-array":411}],350:[function(require,module,exports){ +},{"array-buffer-byte-length":21,"call-bind/callBound":43,"es-get-iterator":353,"get-intrinsic":358,"is-arguments":369,"is-array-buffer":370,"is-date-object":374,"is-regex":378,"is-shared-array-buffer":380,"isarray":386,"object-is":389,"object-keys":393,"object.assign":396,"regexp.prototype.flags":403,"side-channel":407,"which-boxed-primitive":412,"which-collection":413,"which-typed-array":414}],351:[function(require,module,exports){ +'use strict'; + +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var gopd = require('gopd'); + +/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + +},{"get-intrinsic":358,"gopd":359,"has-property-descriptors":361}],352:[function(require,module,exports){ 'use strict'; var keys = require('object-keys'); @@ -11721,15 +11790,13 @@ var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbo var toStr = Object.prototype.toString; var concat = Array.prototype.concat; -var origDefineProperty = Object.defineProperty; +var defineDataProperty = require('define-data-property'); var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; -var hasPropertyDescriptors = require('has-property-descriptors')(); - -var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; +var supportsDescriptors = require('has-property-descriptors')(); var defineProperty = function (object, name, value, predicate) { if (name in object) { @@ -11741,15 +11808,11 @@ var defineProperty = function (object, name, value, predicate) { return; } } + if (supportsDescriptors) { - origDefineProperty(object, name, { - configurable: true, - enumerable: false, - value: value, - writable: true - }); + defineDataProperty(object, name, value, true); } else { - object[name] = value; // eslint-disable-line no-param-reassign + defineDataProperty(object, name, value); } }; @@ -11768,7 +11831,7 @@ defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; -},{"has-property-descriptors":359,"object-keys":391}],351:[function(require,module,exports){ +},{"define-data-property":351,"has-property-descriptors":361,"object-keys":393}],353:[function(require,module,exports){ (function (process){(function (){ 'use strict'; @@ -11961,7 +12024,7 @@ if (require('has-symbols')() || require('has-symbols/shams')()) { } }).call(this)}).call(this,require('_process')) -},{"_process":398,"call-bind/callBound":42,"get-intrinsic":356,"has-symbols":361,"has-symbols/shams":362,"is-arguments":367,"is-map":373,"is-set":377,"is-string":379,"isarray":384,"stop-iteration-iterator":405}],352:[function(require,module,exports){ +},{"_process":400,"call-bind/callBound":43,"get-intrinsic":358,"has-symbols":363,"has-symbols/shams":364,"is-arguments":369,"is-map":375,"is-set":379,"is-string":381,"isarray":386,"stop-iteration-iterator":408}],354:[function(require,module,exports){ 'use strict'; var isCallable = require('is-callable'); @@ -12025,7 +12088,7 @@ var forEach = function forEach(list, iterator, thisArg) { module.exports = forEach; -},{"is-callable":371}],353:[function(require,module,exports){ +},{"is-callable":373}],355:[function(require,module,exports){ 'use strict'; /* eslint no-invalid-this: 1 */ @@ -12079,14 +12142,14 @@ module.exports = function bind(that) { return bound; }; -},{}],354:[function(require,module,exports){ +},{}],356:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); module.exports = Function.prototype.bind || implementation; -},{"./implementation":353}],355:[function(require,module,exports){ +},{"./implementation":355}],357:[function(require,module,exports){ 'use strict'; var functionsHaveNames = function functionsHaveNames() { @@ -12119,7 +12182,7 @@ functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() module.exports = functionsHaveNames; -},{}],356:[function(require,module,exports){ +},{}],358:[function(require,module,exports){ 'use strict'; var undefined; @@ -12472,7 +12535,7 @@ module.exports = function GetIntrinsic(name, allowMissing) { return value; }; -},{"function-bind":354,"has":364,"has-proto":360,"has-symbols":361}],357:[function(require,module,exports){ +},{"function-bind":356,"has":366,"has-proto":362,"has-symbols":363}],359:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -12490,7 +12553,7 @@ if ($gOPD) { module.exports = $gOPD; -},{"get-intrinsic":356}],358:[function(require,module,exports){ +},{"get-intrinsic":358}],360:[function(require,module,exports){ 'use strict'; var $BigInt = typeof BigInt !== 'undefined' && BigInt; @@ -12502,7 +12565,7 @@ module.exports = function hasNativeBigInts() { && typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers }; -},{}],359:[function(require,module,exports){ +},{}],361:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -12537,7 +12600,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu module.exports = hasPropertyDescriptors; -},{"get-intrinsic":356}],360:[function(require,module,exports){ +},{"get-intrinsic":358}],362:[function(require,module,exports){ 'use strict'; var test = { @@ -12550,7 +12613,7 @@ module.exports = function hasProto() { return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); }; -},{}],361:[function(require,module,exports){ +},{}],363:[function(require,module,exports){ 'use strict'; var origSymbol = typeof Symbol !== 'undefined' && Symbol; @@ -12565,7 +12628,7 @@ module.exports = function hasNativeSymbols() { return hasSymbolSham(); }; -},{"./shams":362}],362:[function(require,module,exports){ +},{"./shams":364}],364:[function(require,module,exports){ 'use strict'; /* eslint complexity: [2, 18], max-statements: [2, 33] */ @@ -12609,7 +12672,7 @@ module.exports = function hasSymbols() { return true; }; -},{}],363:[function(require,module,exports){ +},{}],365:[function(require,module,exports){ 'use strict'; var hasSymbols = require('has-symbols/shams'); @@ -12618,14 +12681,17 @@ module.exports = function hasToStringTagShams() { return hasSymbols() && !!Symbol.toStringTag; }; -},{"has-symbols/shams":362}],364:[function(require,module,exports){ +},{"has-symbols/shams":364}],366:[function(require,module,exports){ 'use strict'; -var bind = require('function-bind'); +var hasOwnProperty = {}.hasOwnProperty; +var call = Function.prototype.call; -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); +module.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) { + return call.call(hasOwnProperty, O, P); +}; -},{"function-bind":354}],365:[function(require,module,exports){ +},{}],367:[function(require,module,exports){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m @@ -12712,7 +12778,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],366:[function(require,module,exports){ +},{}],368:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -12776,7 +12842,7 @@ if (Object.freeze) { module.exports = SLOT; -},{"get-intrinsic":356,"has":364,"side-channel":404}],367:[function(require,module,exports){ +},{"get-intrinsic":358,"has":366,"side-channel":407}],369:[function(require,module,exports){ 'use strict'; var hasToStringTag = require('has-tostringtag/shams')(); @@ -12811,7 +12877,7 @@ isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; -},{"call-bind/callBound":42,"has-tostringtag/shams":363}],368:[function(require,module,exports){ +},{"call-bind/callBound":43,"has-tostringtag/shams":365}],370:[function(require,module,exports){ 'use strict'; var callBind = require('call-bind'); @@ -12856,7 +12922,7 @@ module.exports = $byteLength || $abSlice return false; }; -},{"call-bind":43,"call-bind/callBound":42,"get-intrinsic":356,"is-typed-array":381}],369:[function(require,module,exports){ +},{"call-bind":44,"call-bind/callBound":43,"get-intrinsic":358,"is-typed-array":383}],371:[function(require,module,exports){ 'use strict'; var hasBigInts = require('has-bigints')(); @@ -12896,7 +12962,7 @@ if (hasBigInts) { }; } -},{"has-bigints":358}],370:[function(require,module,exports){ +},{"has-bigints":360}],372:[function(require,module,exports){ 'use strict'; var callBound = require('call-bind/callBound'); @@ -12924,7 +12990,7 @@ module.exports = function isBoolean(value) { return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass; }; -},{"call-bind/callBound":42,"has-tostringtag/shams":363}],371:[function(require,module,exports){ +},{"call-bind/callBound":43,"has-tostringtag/shams":365}],373:[function(require,module,exports){ 'use strict'; var fnToStr = Function.prototype.toString; @@ -13027,7 +13093,7 @@ module.exports = reflectApply return tryFunctionObject(value); }; -},{}],372:[function(require,module,exports){ +},{}],374:[function(require,module,exports){ 'use strict'; var getDay = Date.prototype.getDay; @@ -13051,7 +13117,7 @@ module.exports = function isDateObject(value) { return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; }; -},{"has-tostringtag/shams":363}],373:[function(require,module,exports){ +},{"has-tostringtag/shams":365}],375:[function(require,module,exports){ 'use strict'; var $Map = typeof Map === 'function' && Map.prototype ? Map : null; @@ -13095,7 +13161,7 @@ module.exports = exported || function isMap(x) { return false; }; -},{}],374:[function(require,module,exports){ +},{}],376:[function(require,module,exports){ (function (process){(function (){ // Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md 'use strict'; @@ -13103,7 +13169,7 @@ module.exports = exported || function isMap(x) { exports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node); }).call(this)}).call(this,require('_process')) -},{"_process":398}],375:[function(require,module,exports){ +},{"_process":400}],377:[function(require,module,exports){ 'use strict'; var numToStr = Number.prototype.toString; @@ -13129,7 +13195,7 @@ module.exports = function isNumberObject(value) { return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass; }; -},{"has-tostringtag/shams":363}],376:[function(require,module,exports){ +},{"has-tostringtag/shams":365}],378:[function(require,module,exports){ 'use strict'; var callBound = require('call-bind/callBound'); @@ -13189,7 +13255,7 @@ module.exports = hasToStringTag return $toString(value) === regexClass; }; -},{"call-bind/callBound":42,"has-tostringtag/shams":363}],377:[function(require,module,exports){ +},{"call-bind/callBound":43,"has-tostringtag/shams":365}],379:[function(require,module,exports){ 'use strict'; var $Map = typeof Map === 'function' && Map.prototype ? Map : null; @@ -13233,7 +13299,7 @@ module.exports = exported || function isSet(x) { return false; }; -},{}],378:[function(require,module,exports){ +},{}],380:[function(require,module,exports){ 'use strict'; var callBound = require('call-bind/callBound'); @@ -13256,7 +13322,7 @@ module.exports = $byteLength return false; }; -},{"call-bind/callBound":42}],379:[function(require,module,exports){ +},{"call-bind/callBound":43}],381:[function(require,module,exports){ 'use strict'; var strValue = String.prototype.valueOf; @@ -13282,7 +13348,7 @@ module.exports = function isString(value) { return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; }; -},{"has-tostringtag/shams":363}],380:[function(require,module,exports){ +},{"has-tostringtag/shams":365}],382:[function(require,module,exports){ 'use strict'; var toStr = Object.prototype.toString; @@ -13319,7 +13385,7 @@ if (hasSymbols) { }; } -},{"has-symbols":361}],381:[function(require,module,exports){ +},{"has-symbols":363}],383:[function(require,module,exports){ 'use strict'; var whichTypedArray = require('which-typed-array'); @@ -13328,7 +13394,7 @@ module.exports = function isTypedArray(value) { return !!whichTypedArray(value); }; -},{"which-typed-array":411}],382:[function(require,module,exports){ +},{"which-typed-array":414}],384:[function(require,module,exports){ 'use strict'; var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null; @@ -13372,7 +13438,7 @@ module.exports = exported || function isWeakMap(x) { return false; }; -},{}],383:[function(require,module,exports){ +},{}],385:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -13410,14 +13476,14 @@ if ($setHas) { }; } -},{"call-bind/callBound":42,"get-intrinsic":356}],384:[function(require,module,exports){ +},{"call-bind/callBound":43,"get-intrinsic":358}],386:[function(require,module,exports){ var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; -},{}],385:[function(require,module,exports){ +},{}],387:[function(require,module,exports){ var hasMap = typeof Map === 'function' && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; @@ -13935,7 +14001,7 @@ function arrObjKeys(obj, inspect) { return xs; } -},{"./util.inspect":40}],386:[function(require,module,exports){ +},{"./util.inspect":41}],388:[function(require,module,exports){ 'use strict'; var numberIsNaN = function (value) { @@ -13956,7 +14022,7 @@ module.exports = function is(a, b) { }; -},{}],387:[function(require,module,exports){ +},{}],389:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -13976,7 +14042,7 @@ define(polyfill, { module.exports = polyfill; -},{"./implementation":386,"./polyfill":388,"./shim":389,"call-bind":43,"define-properties":350}],388:[function(require,module,exports){ +},{"./implementation":388,"./polyfill":390,"./shim":391,"call-bind":44,"define-properties":352}],390:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -13985,7 +14051,7 @@ module.exports = function getPolyfill() { return typeof Object.is === 'function' ? Object.is : implementation; }; -},{"./implementation":386}],389:[function(require,module,exports){ +},{"./implementation":388}],391:[function(require,module,exports){ 'use strict'; var getPolyfill = require('./polyfill'); @@ -14001,7 +14067,7 @@ module.exports = function shimObjectIs() { return polyfill; }; -},{"./polyfill":388,"define-properties":350}],390:[function(require,module,exports){ +},{"./polyfill":390,"define-properties":352}],392:[function(require,module,exports){ 'use strict'; var keysShim; @@ -14125,7 +14191,7 @@ if (!Object.keys) { } module.exports = keysShim; -},{"./isArguments":392}],391:[function(require,module,exports){ +},{"./isArguments":394}],393:[function(require,module,exports){ 'use strict'; var slice = Array.prototype.slice; @@ -14159,7 +14225,7 @@ keysShim.shim = function shimObjectKeys() { module.exports = keysShim; -},{"./implementation":390,"./isArguments":392}],392:[function(require,module,exports){ +},{"./implementation":392,"./isArguments":394}],394:[function(require,module,exports){ 'use strict'; var toStr = Object.prototype.toString; @@ -14178,7 +14244,7 @@ module.exports = function isArguments(value) { return isArgs; }; -},{}],393:[function(require,module,exports){ +},{}],395:[function(require,module,exports){ 'use strict'; // modified from https://github.com/es-shims/es6-shim @@ -14226,7 +14292,7 @@ module.exports = function assign(target, source1) { return to; // step 4 }; -},{"call-bind/callBound":42,"has-symbols/shams":362,"object-keys":391}],394:[function(require,module,exports){ +},{"call-bind/callBound":43,"has-symbols/shams":364,"object-keys":393}],396:[function(require,module,exports){ 'use strict'; var defineProperties = require('define-properties'); @@ -14250,7 +14316,7 @@ defineProperties(bound, { module.exports = bound; -},{"./implementation":393,"./polyfill":395,"./shim":396,"call-bind":43,"define-properties":350}],395:[function(require,module,exports){ +},{"./implementation":395,"./polyfill":397,"./shim":398,"call-bind":44,"define-properties":352}],397:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -14307,7 +14373,7 @@ module.exports = function getPolyfill() { return Object.assign; }; -},{"./implementation":393}],396:[function(require,module,exports){ +},{"./implementation":395}],398:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -14323,7 +14389,7 @@ module.exports = function shimAssign() { return polyfill; }; -},{"./polyfill":395,"define-properties":350}],397:[function(require,module,exports){ +},{"./polyfill":397,"define-properties":352}],399:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; @@ -14401,7 +14467,7 @@ function now() { } exports.now = now; -},{}],398:[function(require,module,exports){ +},{}],400:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -14587,7 +14653,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],399:[function(require,module,exports){ +},{}],401:[function(require,module,exports){ /** * Copyright (c) 2014-present, Facebook, Inc. * @@ -15350,15 +15416,15 @@ try { } } -},{}],400:[function(require,module,exports){ +},{}],402:[function(require,module,exports){ 'use strict'; -var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); +var setFunctionName = require('set-function-name'); var $Object = Object; var $TypeError = TypeError; -module.exports = function flags() { +module.exports = setFunctionName(function flags() { if (this != null && this !== $Object(this)) { throw new $TypeError('RegExp.prototype.flags getter called on non-object'); } @@ -15388,13 +15454,10 @@ module.exports = function flags() { result += 'y'; } return result; -}; +}, 'get flags', true); -if (functionsHaveConfigurableNames && Object.defineProperty) { - Object.defineProperty(module.exports, 'name', { value: 'get flags' }); -} -},{"functions-have-names":355}],401:[function(require,module,exports){ +},{"set-function-name":406}],403:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -15414,7 +15477,7 @@ define(flagsBound, { module.exports = flagsBound; -},{"./implementation":400,"./polyfill":402,"./shim":403,"call-bind":43,"define-properties":350}],402:[function(require,module,exports){ +},{"./implementation":402,"./polyfill":404,"./shim":405,"call-bind":44,"define-properties":352}],404:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -15452,7 +15515,7 @@ module.exports = function getPolyfill() { return implementation; }; -},{"./implementation":400,"define-properties":350}],403:[function(require,module,exports){ +},{"./implementation":402,"define-properties":352}],405:[function(require,module,exports){ 'use strict'; var supportsDescriptors = require('define-properties').supportsDescriptors; @@ -15480,7 +15543,31 @@ module.exports = function shimFlags() { return polyfill; }; -},{"./polyfill":402,"define-properties":350}],404:[function(require,module,exports){ +},{"./polyfill":404,"define-properties":352}],406:[function(require,module,exports){ +'use strict'; + +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +var $TypeError = TypeError; + +module.exports = function setFunctionName(fn, name) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + var loose = arguments.length > 2 && !!arguments[2]; + if (!loose || functionsHaveConfigurableNames) { + if (hasDescriptors) { + define(fn, 'name', name, true, true); + } else { + define(fn, 'name', name); + } + } + return fn; +}; + +},{"define-data-property":351,"functions-have-names":357,"has-property-descriptors":361}],407:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -15606,7 +15693,7 @@ module.exports = function getSideChannel() { return channel; }; -},{"call-bind/callBound":42,"get-intrinsic":356,"object-inspect":385}],405:[function(require,module,exports){ +},{"call-bind/callBound":43,"get-intrinsic":358,"object-inspect":387}],408:[function(require,module,exports){ 'use strict'; var SLOT = require('internal-slot'); @@ -15648,7 +15735,7 @@ module.exports = function getStopIterationIterator(origIterator) { return siIterator; }; -},{"internal-slot":366}],406:[function(require,module,exports){ +},{"internal-slot":368}],409:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -15700,7 +15787,7 @@ function addBrowser(fn) { * @link https://stackoverflow.com/a/26193516/3443137 */ } -},{}],407:[function(require,module,exports){ +},{}],410:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -15761,7 +15848,7 @@ function getSize() { return LISTENERS.size; } }).call(this)}).call(this,require('_process')) -},{"./browser.js":406,"./node.js":408,"_process":398}],408:[function(require,module,exports){ +},{"./browser.js":409,"./node.js":411,"_process":400}],411:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -15800,7 +15887,7 @@ function addNode(fn) { }); } }).call(this)}).call(this,require('_process')) -},{"_process":398}],409:[function(require,module,exports){ +},{"_process":400}],412:[function(require,module,exports){ 'use strict'; var isString = require('is-string'); @@ -15832,7 +15919,7 @@ module.exports = function whichBoxedPrimitive(value) { } }; -},{"is-bigint":369,"is-boolean-object":370,"is-number-object":375,"is-string":379,"is-symbol":380}],410:[function(require,module,exports){ +},{"is-bigint":371,"is-boolean-object":372,"is-number-object":377,"is-string":381,"is-symbol":382}],413:[function(require,module,exports){ 'use strict'; var isMap = require('is-map'); @@ -15858,7 +15945,7 @@ module.exports = function whichCollection(value) { return false; }; -},{"is-map":373,"is-set":377,"is-weakmap":382,"is-weakset":383}],411:[function(require,module,exports){ +},{"is-map":375,"is-set":379,"is-weakmap":384,"is-weakset":385}],414:[function(require,module,exports){ (function (global){(function (){ 'use strict'; @@ -15951,7 +16038,7 @@ module.exports = function whichTypedArray(value) { }; }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"available-typed-arrays":38,"call-bind":43,"call-bind/callBound":42,"for-each":352,"gopd":357,"has-tostringtag/shams":363}],412:[function(require,module,exports){ +},{"available-typed-arrays":39,"call-bind":44,"call-bind/callBound":43,"for-each":354,"gopd":359,"has-tostringtag/shams":365}],415:[function(require,module,exports){ "use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); @@ -16325,7 +16412,7 @@ try { console.log('error in run-function:'); console.error(error); } -},{"../../":2,"./util.js":413,"@babel/polyfill":14,"@babel/runtime/helpers/asyncToGenerator":16,"@babel/runtime/helpers/interopRequireDefault":17,"@babel/runtime/regenerator":20,"async-test-util":24}],413:[function(require,module,exports){ +},{"../../":2,"./util.js":416,"@babel/polyfill":14,"@babel/runtime/helpers/asyncToGenerator":16,"@babel/runtime/helpers/interopRequireDefault":17,"@babel/runtime/regenerator":20,"async-test-util":25}],416:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -16344,4 +16431,4 @@ function getParameterByName(name, url) { if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); } -},{}]},{},[412]); +},{}]},{},[415]); diff --git a/docs/iframe.js b/docs/iframe.js index d2d68789..23dcaced 100644 --- a/docs/iframe.js +++ b/docs/iframe.js @@ -14,10 +14,9 @@ var _options = require("./options.js"); * Contains all open channels, * used in tests to ensure everything is closed. */ -var OPEN_BROADCAST_CHANNELS = new Set(); -exports.OPEN_BROADCAST_CHANNELS = OPEN_BROADCAST_CHANNELS; +var OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set(); var lastId = 0; -var BroadcastChannel = function BroadcastChannel(name, options) { +var BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) { // identifier of the channel to debug stuff this.id = lastId++; OPEN_BROADCAST_CHANNELS.add(this); @@ -74,7 +73,6 @@ var BroadcastChannel = function BroadcastChannel(name, options) { * window.BroadcastChannel with this * See methods/native.js */ -exports.BroadcastChannel = BroadcastChannel; BroadcastChannel._pubkey = true; /** @@ -404,7 +402,7 @@ var _leaderElectionUtil = require("./leader-election-util.js"); * A faster version of the leader elector that uses the WebLock API * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API */ -var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { +var LeaderElectionWebLock = exports.LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { var _this = this; this.broadcastChannel = broadcastChannel; broadcastChannel._befC.push(function () { @@ -424,7 +422,6 @@ var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, opt // lock name this.lN = 'pubkey-bc||' + broadcastChannel.method.type + '||' + broadcastChannel.name; }; -exports.LeaderElectionWebLock = LeaderElectionWebLock; LeaderElectionWebLock.prototype = { hasLeader: function hasLeader() { var _this2 = this; @@ -872,8 +869,7 @@ var _options = require("../options.js"); * @link https://rxdb.info/slow-indexeddb.html */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var DB_PREFIX = 'pubkey.broadcast-channel-0-'; var OBJECT_STORE_ID = 'messages'; @@ -881,12 +877,10 @@ var OBJECT_STORE_ID = 'messages'; * Use relaxed durability for faster performance on all transactions. * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/ */ -var TRANSACTION_SETTINGS = { +var TRANSACTION_SETTINGS = exports.TRANSACTION_SETTINGS = { durability: 'relaxed' }; -exports.TRANSACTION_SETTINGS = TRANSACTION_SETTINGS; -var type = 'idb'; -exports.type = type; +var type = exports.type = 'idb'; function getIdb() { if (typeof indexedDB !== 'undefined') return indexedDB; if (typeof window !== 'undefined') { @@ -1198,7 +1192,7 @@ function canBeUsed() { function averageResponseTime(options) { return options.idb.fallbackInterval * 2; } -var IndexedDBMethod = { +var IndexedDBMethod = exports.IndexedDBMethod = { create: create, close: close, onMessage: onMessage, @@ -1208,7 +1202,6 @@ var IndexedDBMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.IndexedDBMethod = IndexedDBMethod; },{"../options.js":12,"../util.js":13,"oblivious-set":321}],9:[function(require,module,exports){ "use strict"; @@ -1239,16 +1232,14 @@ var _util = require("../util.js"); * @link https://caniuse.com/#feat=indexeddb */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var KEY_PREFIX = 'pubkey.broadcastChannel-'; -var type = 'localstorage'; +var type = exports.type = 'localstorage'; /** * copied from crosstab * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 */ -exports.type = type; function getLocalStorage() { var localStorage; if (typeof window === 'undefined') return null; @@ -1371,7 +1362,7 @@ function averageResponseTime() { } return defaultTime; } -var LocalstorageMethod = { +var LocalstorageMethod = exports.LocalstorageMethod = { create: create, close: close, onMessage: onMessage, @@ -1381,7 +1372,6 @@ var LocalstorageMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.LocalstorageMethod = LocalstorageMethod; },{"../options.js":12,"../util.js":13,"oblivious-set":321}],10:[function(require,module,exports){ "use strict"; @@ -1398,10 +1388,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'native'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'native'; function create(channelName) { var state = { messagesCallback: null, @@ -1444,7 +1432,7 @@ function canBeUsed() { function averageResponseTime() { return 150; } -var NativeMethod = { +var NativeMethod = exports.NativeMethod = { create: create, close: close, onMessage: onMessage, @@ -1454,7 +1442,6 @@ var NativeMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.NativeMethod = NativeMethod; },{"../util.js":13}],11:[function(require,module,exports){ "use strict"; @@ -1471,10 +1458,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'simulate'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { @@ -1513,7 +1498,7 @@ function canBeUsed() { function averageResponseTime() { return 5; } -var SimulateMethod = { +var SimulateMethod = exports.SimulateMethod = { create: create, close: close, onMessage: onMessage, @@ -1523,7 +1508,6 @@ var SimulateMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.SimulateMethod = SimulateMethod; },{"../util.js":13}],12:[function(require,module,exports){ "use strict"; @@ -1583,12 +1567,9 @@ exports.supportsWebLockAPI = supportsWebLockAPI; function isPromise(obj) { return obj && typeof obj.then === 'function'; } -var PROMISE_RESOLVED_FALSE = Promise.resolve(false); -exports.PROMISE_RESOLVED_FALSE = PROMISE_RESOLVED_FALSE; -var PROMISE_RESOLVED_TRUE = Promise.resolve(true); -exports.PROMISE_RESOLVED_TRUE = PROMISE_RESOLVED_TRUE; -var PROMISE_RESOLVED_VOID = Promise.resolve(); -exports.PROMISE_RESOLVED_VOID = PROMISE_RESOLVED_VOID; +var PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false); +var PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true); +var PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve(); function sleep(time, resolveWith) { if (!time) time = 0; return new Promise(function (res) { @@ -1685,14 +1666,14 @@ require("core-js/web"); require("regenerator-runtime/runtime"); },{"core-js/es6":17,"core-js/fn/array/flat-map":18,"core-js/fn/array/includes":19,"core-js/fn/object/entries":20,"core-js/fn/object/get-own-property-descriptors":21,"core-js/fn/object/values":22,"core-js/fn/promise/finally":23,"core-js/fn/string/pad-end":24,"core-js/fn/string/pad-start":25,"core-js/fn/string/trim-end":26,"core-js/fn/string/trim-start":27,"core-js/fn/symbol/async-iterator":28,"core-js/web":320,"regenerator-runtime/runtime":323}],16:[function(require,module,exports){ -function _typeof(obj) { +function _typeof(o) { "@babel/helpers - typeof"; - return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); } module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],17:[function(require,module,exports){ diff --git a/docs/index.js b/docs/index.js index 4a9469b9..8863357d 100644 --- a/docs/index.js +++ b/docs/index.js @@ -14,10 +14,9 @@ var _options = require("./options.js"); * Contains all open channels, * used in tests to ensure everything is closed. */ -var OPEN_BROADCAST_CHANNELS = new Set(); -exports.OPEN_BROADCAST_CHANNELS = OPEN_BROADCAST_CHANNELS; +var OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set(); var lastId = 0; -var BroadcastChannel = function BroadcastChannel(name, options) { +var BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) { // identifier of the channel to debug stuff this.id = lastId++; OPEN_BROADCAST_CHANNELS.add(this); @@ -74,7 +73,6 @@ var BroadcastChannel = function BroadcastChannel(name, options) { * window.BroadcastChannel with this * See methods/native.js */ -exports.BroadcastChannel = BroadcastChannel; BroadcastChannel._pubkey = true; /** @@ -404,7 +402,7 @@ var _leaderElectionUtil = require("./leader-election-util.js"); * A faster version of the leader elector that uses the WebLock API * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API */ -var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { +var LeaderElectionWebLock = exports.LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { var _this = this; this.broadcastChannel = broadcastChannel; broadcastChannel._befC.push(function () { @@ -424,7 +422,6 @@ var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, opt // lock name this.lN = 'pubkey-bc||' + broadcastChannel.method.type + '||' + broadcastChannel.name; }; -exports.LeaderElectionWebLock = LeaderElectionWebLock; LeaderElectionWebLock.prototype = { hasLeader: function hasLeader() { var _this2 = this; @@ -872,8 +869,7 @@ var _options = require("../options.js"); * @link https://rxdb.info/slow-indexeddb.html */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var DB_PREFIX = 'pubkey.broadcast-channel-0-'; var OBJECT_STORE_ID = 'messages'; @@ -881,12 +877,10 @@ var OBJECT_STORE_ID = 'messages'; * Use relaxed durability for faster performance on all transactions. * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/ */ -var TRANSACTION_SETTINGS = { +var TRANSACTION_SETTINGS = exports.TRANSACTION_SETTINGS = { durability: 'relaxed' }; -exports.TRANSACTION_SETTINGS = TRANSACTION_SETTINGS; -var type = 'idb'; -exports.type = type; +var type = exports.type = 'idb'; function getIdb() { if (typeof indexedDB !== 'undefined') return indexedDB; if (typeof window !== 'undefined') { @@ -1198,7 +1192,7 @@ function canBeUsed() { function averageResponseTime(options) { return options.idb.fallbackInterval * 2; } -var IndexedDBMethod = { +var IndexedDBMethod = exports.IndexedDBMethod = { create: create, close: close, onMessage: onMessage, @@ -1208,7 +1202,6 @@ var IndexedDBMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.IndexedDBMethod = IndexedDBMethod; },{"../options.js":12,"../util.js":13,"oblivious-set":321}],9:[function(require,module,exports){ "use strict"; @@ -1239,16 +1232,14 @@ var _util = require("../util.js"); * @link https://caniuse.com/#feat=indexeddb */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var KEY_PREFIX = 'pubkey.broadcastChannel-'; -var type = 'localstorage'; +var type = exports.type = 'localstorage'; /** * copied from crosstab * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 */ -exports.type = type; function getLocalStorage() { var localStorage; if (typeof window === 'undefined') return null; @@ -1371,7 +1362,7 @@ function averageResponseTime() { } return defaultTime; } -var LocalstorageMethod = { +var LocalstorageMethod = exports.LocalstorageMethod = { create: create, close: close, onMessage: onMessage, @@ -1381,7 +1372,6 @@ var LocalstorageMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.LocalstorageMethod = LocalstorageMethod; },{"../options.js":12,"../util.js":13,"oblivious-set":321}],10:[function(require,module,exports){ "use strict"; @@ -1398,10 +1388,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'native'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'native'; function create(channelName) { var state = { messagesCallback: null, @@ -1444,7 +1432,7 @@ function canBeUsed() { function averageResponseTime() { return 150; } -var NativeMethod = { +var NativeMethod = exports.NativeMethod = { create: create, close: close, onMessage: onMessage, @@ -1454,7 +1442,6 @@ var NativeMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.NativeMethod = NativeMethod; },{"../util.js":13}],11:[function(require,module,exports){ "use strict"; @@ -1471,10 +1458,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'simulate'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { @@ -1513,7 +1498,7 @@ function canBeUsed() { function averageResponseTime() { return 5; } -var SimulateMethod = { +var SimulateMethod = exports.SimulateMethod = { create: create, close: close, onMessage: onMessage, @@ -1523,7 +1508,6 @@ var SimulateMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.SimulateMethod = SimulateMethod; },{"../util.js":13}],12:[function(require,module,exports){ "use strict"; @@ -1583,12 +1567,9 @@ exports.supportsWebLockAPI = supportsWebLockAPI; function isPromise(obj) { return obj && typeof obj.then === 'function'; } -var PROMISE_RESOLVED_FALSE = Promise.resolve(false); -exports.PROMISE_RESOLVED_FALSE = PROMISE_RESOLVED_FALSE; -var PROMISE_RESOLVED_TRUE = Promise.resolve(true); -exports.PROMISE_RESOLVED_TRUE = PROMISE_RESOLVED_TRUE; -var PROMISE_RESOLVED_VOID = Promise.resolve(); -exports.PROMISE_RESOLVED_VOID = PROMISE_RESOLVED_VOID; +var PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false); +var PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true); +var PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve(); function sleep(time, resolveWith) { if (!time) time = 0; return new Promise(function (res) { @@ -1685,14 +1666,14 @@ require("core-js/web"); require("regenerator-runtime/runtime"); },{"core-js/es6":17,"core-js/fn/array/flat-map":18,"core-js/fn/array/includes":19,"core-js/fn/object/entries":20,"core-js/fn/object/get-own-property-descriptors":21,"core-js/fn/object/values":22,"core-js/fn/promise/finally":23,"core-js/fn/string/pad-end":24,"core-js/fn/string/pad-start":25,"core-js/fn/string/trim-end":26,"core-js/fn/string/trim-start":27,"core-js/fn/symbol/async-iterator":28,"core-js/web":320,"regenerator-runtime/runtime":323}],16:[function(require,module,exports){ -function _typeof(obj) { +function _typeof(o) { "@babel/helpers - typeof"; - return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); } module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],17:[function(require,module,exports){ diff --git a/docs/leader-iframe.js b/docs/leader-iframe.js index 0c27ed2c..14b742e9 100644 --- a/docs/leader-iframe.js +++ b/docs/leader-iframe.js @@ -14,10 +14,9 @@ var _options = require("./options.js"); * Contains all open channels, * used in tests to ensure everything is closed. */ -var OPEN_BROADCAST_CHANNELS = new Set(); -exports.OPEN_BROADCAST_CHANNELS = OPEN_BROADCAST_CHANNELS; +var OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set(); var lastId = 0; -var BroadcastChannel = function BroadcastChannel(name, options) { +var BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) { // identifier of the channel to debug stuff this.id = lastId++; OPEN_BROADCAST_CHANNELS.add(this); @@ -74,7 +73,6 @@ var BroadcastChannel = function BroadcastChannel(name, options) { * window.BroadcastChannel with this * See methods/native.js */ -exports.BroadcastChannel = BroadcastChannel; BroadcastChannel._pubkey = true; /** @@ -404,7 +402,7 @@ var _leaderElectionUtil = require("./leader-election-util.js"); * A faster version of the leader elector that uses the WebLock API * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API */ -var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { +var LeaderElectionWebLock = exports.LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { var _this = this; this.broadcastChannel = broadcastChannel; broadcastChannel._befC.push(function () { @@ -424,7 +422,6 @@ var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, opt // lock name this.lN = 'pubkey-bc||' + broadcastChannel.method.type + '||' + broadcastChannel.name; }; -exports.LeaderElectionWebLock = LeaderElectionWebLock; LeaderElectionWebLock.prototype = { hasLeader: function hasLeader() { var _this2 = this; @@ -872,8 +869,7 @@ var _options = require("../options.js"); * @link https://rxdb.info/slow-indexeddb.html */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var DB_PREFIX = 'pubkey.broadcast-channel-0-'; var OBJECT_STORE_ID = 'messages'; @@ -881,12 +877,10 @@ var OBJECT_STORE_ID = 'messages'; * Use relaxed durability for faster performance on all transactions. * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/ */ -var TRANSACTION_SETTINGS = { +var TRANSACTION_SETTINGS = exports.TRANSACTION_SETTINGS = { durability: 'relaxed' }; -exports.TRANSACTION_SETTINGS = TRANSACTION_SETTINGS; -var type = 'idb'; -exports.type = type; +var type = exports.type = 'idb'; function getIdb() { if (typeof indexedDB !== 'undefined') return indexedDB; if (typeof window !== 'undefined') { @@ -1198,7 +1192,7 @@ function canBeUsed() { function averageResponseTime(options) { return options.idb.fallbackInterval * 2; } -var IndexedDBMethod = { +var IndexedDBMethod = exports.IndexedDBMethod = { create: create, close: close, onMessage: onMessage, @@ -1208,7 +1202,6 @@ var IndexedDBMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.IndexedDBMethod = IndexedDBMethod; },{"../options.js":12,"../util.js":13,"oblivious-set":321}],9:[function(require,module,exports){ "use strict"; @@ -1239,16 +1232,14 @@ var _util = require("../util.js"); * @link https://caniuse.com/#feat=indexeddb */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var KEY_PREFIX = 'pubkey.broadcastChannel-'; -var type = 'localstorage'; +var type = exports.type = 'localstorage'; /** * copied from crosstab * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 */ -exports.type = type; function getLocalStorage() { var localStorage; if (typeof window === 'undefined') return null; @@ -1371,7 +1362,7 @@ function averageResponseTime() { } return defaultTime; } -var LocalstorageMethod = { +var LocalstorageMethod = exports.LocalstorageMethod = { create: create, close: close, onMessage: onMessage, @@ -1381,7 +1372,6 @@ var LocalstorageMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.LocalstorageMethod = LocalstorageMethod; },{"../options.js":12,"../util.js":13,"oblivious-set":321}],10:[function(require,module,exports){ "use strict"; @@ -1398,10 +1388,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'native'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'native'; function create(channelName) { var state = { messagesCallback: null, @@ -1444,7 +1432,7 @@ function canBeUsed() { function averageResponseTime() { return 150; } -var NativeMethod = { +var NativeMethod = exports.NativeMethod = { create: create, close: close, onMessage: onMessage, @@ -1454,7 +1442,6 @@ var NativeMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.NativeMethod = NativeMethod; },{"../util.js":13}],11:[function(require,module,exports){ "use strict"; @@ -1471,10 +1458,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'simulate'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { @@ -1513,7 +1498,7 @@ function canBeUsed() { function averageResponseTime() { return 5; } -var SimulateMethod = { +var SimulateMethod = exports.SimulateMethod = { create: create, close: close, onMessage: onMessage, @@ -1523,7 +1508,6 @@ var SimulateMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.SimulateMethod = SimulateMethod; },{"../util.js":13}],12:[function(require,module,exports){ "use strict"; @@ -1583,12 +1567,9 @@ exports.supportsWebLockAPI = supportsWebLockAPI; function isPromise(obj) { return obj && typeof obj.then === 'function'; } -var PROMISE_RESOLVED_FALSE = Promise.resolve(false); -exports.PROMISE_RESOLVED_FALSE = PROMISE_RESOLVED_FALSE; -var PROMISE_RESOLVED_TRUE = Promise.resolve(true); -exports.PROMISE_RESOLVED_TRUE = PROMISE_RESOLVED_TRUE; -var PROMISE_RESOLVED_VOID = Promise.resolve(); -exports.PROMISE_RESOLVED_VOID = PROMISE_RESOLVED_VOID; +var PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false); +var PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true); +var PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve(); function sleep(time, resolveWith) { if (!time) time = 0; return new Promise(function (res) { @@ -1685,14 +1666,14 @@ require("core-js/web"); require("regenerator-runtime/runtime"); },{"core-js/es6":17,"core-js/fn/array/flat-map":18,"core-js/fn/array/includes":19,"core-js/fn/object/entries":20,"core-js/fn/object/get-own-property-descriptors":21,"core-js/fn/object/values":22,"core-js/fn/promise/finally":23,"core-js/fn/string/pad-end":24,"core-js/fn/string/pad-start":25,"core-js/fn/string/trim-end":26,"core-js/fn/string/trim-start":27,"core-js/fn/symbol/async-iterator":28,"core-js/web":320,"regenerator-runtime/runtime":323}],16:[function(require,module,exports){ -function _typeof(obj) { +function _typeof(o) { "@babel/helpers - typeof"; - return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); } module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],17:[function(require,module,exports){ diff --git a/docs/worker.js b/docs/worker.js index b95874b0..6c9f4e61 100644 --- a/docs/worker.js +++ b/docs/worker.js @@ -14,10 +14,9 @@ var _options = require("./options.js"); * Contains all open channels, * used in tests to ensure everything is closed. */ -var OPEN_BROADCAST_CHANNELS = new Set(); -exports.OPEN_BROADCAST_CHANNELS = OPEN_BROADCAST_CHANNELS; +var OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set(); var lastId = 0; -var BroadcastChannel = function BroadcastChannel(name, options) { +var BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) { // identifier of the channel to debug stuff this.id = lastId++; OPEN_BROADCAST_CHANNELS.add(this); @@ -74,7 +73,6 @@ var BroadcastChannel = function BroadcastChannel(name, options) { * window.BroadcastChannel with this * See methods/native.js */ -exports.BroadcastChannel = BroadcastChannel; BroadcastChannel._pubkey = true; /** @@ -391,7 +389,7 @@ function beLeader(leaderElector) { leaderElector._lstns.push(isLeaderListener); return sendLeaderMessage(leaderElector, 'tell'); } -},{"unload":403}],5:[function(require,module,exports){ +},{"unload":406}],5:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -404,7 +402,7 @@ var _leaderElectionUtil = require("./leader-election-util.js"); * A faster version of the leader elector that uses the WebLock API * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API */ -var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { +var LeaderElectionWebLock = exports.LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) { var _this = this; this.broadcastChannel = broadcastChannel; broadcastChannel._befC.push(function () { @@ -424,7 +422,6 @@ var LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, opt // lock name this.lN = 'pubkey-bc||' + broadcastChannel.method.type + '||' + broadcastChannel.name; }; -exports.LeaderElectionWebLock = LeaderElectionWebLock; LeaderElectionWebLock.prototype = { hasLeader: function hasLeader() { var _this2 = this; @@ -872,8 +869,7 @@ var _options = require("../options.js"); * @link https://rxdb.info/slow-indexeddb.html */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var DB_PREFIX = 'pubkey.broadcast-channel-0-'; var OBJECT_STORE_ID = 'messages'; @@ -881,12 +877,10 @@ var OBJECT_STORE_ID = 'messages'; * Use relaxed durability for faster performance on all transactions. * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/ */ -var TRANSACTION_SETTINGS = { +var TRANSACTION_SETTINGS = exports.TRANSACTION_SETTINGS = { durability: 'relaxed' }; -exports.TRANSACTION_SETTINGS = TRANSACTION_SETTINGS; -var type = 'idb'; -exports.type = type; +var type = exports.type = 'idb'; function getIdb() { if (typeof indexedDB !== 'undefined') return indexedDB; if (typeof window !== 'undefined') { @@ -1198,7 +1192,7 @@ function canBeUsed() { function averageResponseTime(options) { return options.idb.fallbackInterval * 2; } -var IndexedDBMethod = { +var IndexedDBMethod = exports.IndexedDBMethod = { create: create, close: close, onMessage: onMessage, @@ -1208,8 +1202,7 @@ var IndexedDBMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.IndexedDBMethod = IndexedDBMethod; -},{"../options.js":12,"../util.js":13,"oblivious-set":393}],9:[function(require,module,exports){ +},{"../options.js":12,"../util.js":13,"oblivious-set":395}],9:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1239,16 +1232,14 @@ var _util = require("../util.js"); * @link https://caniuse.com/#feat=indexeddb */ -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; +var microSeconds = exports.microSeconds = _util.microSeconds; var KEY_PREFIX = 'pubkey.broadcastChannel-'; -var type = 'localstorage'; +var type = exports.type = 'localstorage'; /** * copied from crosstab * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 */ -exports.type = type; function getLocalStorage() { var localStorage; if (typeof window === 'undefined') return null; @@ -1371,7 +1362,7 @@ function averageResponseTime() { } return defaultTime; } -var LocalstorageMethod = { +var LocalstorageMethod = exports.LocalstorageMethod = { create: create, close: close, onMessage: onMessage, @@ -1381,8 +1372,7 @@ var LocalstorageMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.LocalstorageMethod = LocalstorageMethod; -},{"../options.js":12,"../util.js":13,"oblivious-set":393}],10:[function(require,module,exports){ +},{"../options.js":12,"../util.js":13,"oblivious-set":395}],10:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1398,10 +1388,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'native'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'native'; function create(channelName) { var state = { messagesCallback: null, @@ -1444,7 +1432,7 @@ function canBeUsed() { function averageResponseTime() { return 150; } -var NativeMethod = { +var NativeMethod = exports.NativeMethod = { create: create, close: close, onMessage: onMessage, @@ -1454,7 +1442,6 @@ var NativeMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.NativeMethod = NativeMethod; },{"../util.js":13}],11:[function(require,module,exports){ "use strict"; @@ -1471,10 +1458,8 @@ exports.onMessage = onMessage; exports.postMessage = postMessage; exports.type = void 0; var _util = require("../util.js"); -var microSeconds = _util.microSeconds; -exports.microSeconds = microSeconds; -var type = 'simulate'; -exports.type = type; +var microSeconds = exports.microSeconds = _util.microSeconds; +var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { @@ -1513,7 +1498,7 @@ function canBeUsed() { function averageResponseTime() { return 5; } -var SimulateMethod = { +var SimulateMethod = exports.SimulateMethod = { create: create, close: close, onMessage: onMessage, @@ -1523,7 +1508,6 @@ var SimulateMethod = { averageResponseTime: averageResponseTime, microSeconds: microSeconds }; -exports.SimulateMethod = SimulateMethod; },{"../util.js":13}],12:[function(require,module,exports){ "use strict"; @@ -1583,12 +1567,9 @@ exports.supportsWebLockAPI = supportsWebLockAPI; function isPromise(obj) { return obj && typeof obj.then === 'function'; } -var PROMISE_RESOLVED_FALSE = Promise.resolve(false); -exports.PROMISE_RESOLVED_FALSE = PROMISE_RESOLVED_FALSE; -var PROMISE_RESOLVED_TRUE = Promise.resolve(true); -exports.PROMISE_RESOLVED_TRUE = PROMISE_RESOLVED_TRUE; -var PROMISE_RESOLVED_VOID = Promise.resolve(); -exports.PROMISE_RESOLVED_VOID = PROMISE_RESOLVED_VOID; +var PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false); +var PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true); +var PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve(); function sleep(time, resolveWith) { if (!time) time = 0; return new Promise(function (res) { @@ -1654,7 +1635,7 @@ if (_global["default"]._babelPolyfill && typeof console !== "undefined" && conso } _global["default"]._babelPolyfill = true; -},{"./noConflict":15,"core-js/library/fn/global":53}],15:[function(require,module,exports){ +},{"./noConflict":15,"core-js/library/fn/global":54}],15:[function(require,module,exports){ "use strict"; require("core-js/es6"); @@ -1684,20 +1665,35 @@ require("core-js/fn/promise/finally"); require("core-js/web"); require("regenerator-runtime/runtime"); -},{"core-js/es6":41,"core-js/fn/array/flat-map":42,"core-js/fn/array/includes":43,"core-js/fn/object/entries":44,"core-js/fn/object/get-own-property-descriptors":45,"core-js/fn/object/values":46,"core-js/fn/promise/finally":47,"core-js/fn/string/pad-end":48,"core-js/fn/string/pad-start":49,"core-js/fn/string/trim-end":50,"core-js/fn/string/trim-start":51,"core-js/fn/symbol/async-iterator":52,"core-js/web":344,"regenerator-runtime/runtime":395}],16:[function(require,module,exports){ -function _typeof(obj) { +},{"core-js/es6":42,"core-js/fn/array/flat-map":43,"core-js/fn/array/includes":44,"core-js/fn/object/entries":45,"core-js/fn/object/get-own-property-descriptors":46,"core-js/fn/object/values":47,"core-js/fn/promise/finally":48,"core-js/fn/string/pad-end":49,"core-js/fn/string/pad-start":50,"core-js/fn/string/trim-end":51,"core-js/fn/string/trim-start":52,"core-js/fn/symbol/async-iterator":53,"core-js/web":345,"regenerator-runtime/runtime":397}],16:[function(require,module,exports){ +function _typeof(o) { "@babel/helpers - typeof"; - return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); } module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],17:[function(require,module,exports){ 'use strict'; +var callBound = require('call-bind/callBound'); +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); + +var isArrayBuffer = require('is-array-buffer'); + +module.exports = function byteLength(ab) { + if (!isArrayBuffer(ab)) { + return NaN; + } + return $byteLength ? $byteLength(ab) : ab.byteLength; +}; // in node < 0.11, byteLength is an own nonconfigurable property + +},{"call-bind/callBound":39,"is-array-buffer":366}],18:[function(require,module,exports){ +'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); @@ -1761,7 +1757,7 @@ function assertThrows(test) { } else rej(nonThrown); }); } -},{"./is-promise":21,"./utils":29}],18:[function(require,module,exports){ +},{"./is-promise":22,"./utils":30}],19:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -1775,7 +1771,7 @@ var _clone2 = _interopRequireDefault(_clone); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = _clone2['default']; -},{"clone":40}],19:[function(require,module,exports){ +},{"clone":41}],20:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -1789,7 +1785,7 @@ var _deepEqual2 = _interopRequireDefault(_deepEqual); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = _deepEqual2['default']; -},{"deep-equal":345}],20:[function(require,module,exports){ +},{"deep-equal":346}],21:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -1892,7 +1888,7 @@ exports.resolveValues = _resolveValues2['default']; exports.performanceNow = _performanceNow2['default']; exports.isPromise = _isPromise2['default']; exports.promisify = _promisify2['default']; -},{"./assert-throws":17,"./clone":18,"./deep-equal":19,"./is-promise":21,"./performance-now":22,"./promisify":23,"./random-boolean":24,"./random-number":25,"./random-string":26,"./resolve-values":27,"./run-forever":28,"./wait":33,"./wait-forever":30,"./wait-resolveable":31,"./wait-until":32}],21:[function(require,module,exports){ +},{"./assert-throws":18,"./clone":19,"./deep-equal":20,"./is-promise":22,"./performance-now":23,"./promisify":24,"./random-boolean":25,"./random-number":26,"./random-string":27,"./resolve-values":28,"./run-forever":29,"./wait":34,"./wait-forever":31,"./wait-resolveable":32,"./wait-until":33}],22:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -1908,7 +1904,7 @@ function isPromise(value) { } catch (err) {} return false; } -},{}],22:[function(require,module,exports){ +},{}],23:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -1941,7 +1937,7 @@ function performanceNow() { return perf.now(); } -},{"./require-on-node-only":36,"is-node":370}],23:[function(require,module,exports){ +},{"./require-on-node-only":37,"is-node":372}],24:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -1970,7 +1966,7 @@ function promisify(value) { return Promise.resolve(value); } } -},{"./is-promise":21}],24:[function(require,module,exports){ +},{"./is-promise":22}],25:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1984,7 +1980,7 @@ exports["default"] = randomBoolean; function randomBoolean() { return Math.random() >= 0.5; } -},{}],25:[function(require,module,exports){ +},{}],26:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -2003,7 +1999,7 @@ function randomNumber() { return Math.floor(Math.random() * (max - min + 1)) + min; } -},{}],26:[function(require,module,exports){ +},{}],27:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2023,7 +2019,7 @@ function randomString() { text += charset.charAt(Math.floor(Math.random() * charset.length)); }return text; } -},{}],27:[function(require,module,exports){ +},{}],28:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2052,7 +2048,7 @@ function resolveValues(obj) { return ret; }); } -},{"./promisify":23}],28:[function(require,module,exports){ +},{"./promisify":24}],29:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2087,7 +2083,7 @@ function runForever(predicate) { runLoop(); }); } -},{"./promisify":23,"./wait":33}],29:[function(require,module,exports){ +},{"./promisify":24,"./wait":34}],30:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2117,7 +2113,7 @@ function ensureInSetTimeoutLimit(timeoutInMilliseconds) { } return timeoutInMilliseconds; } -},{}],30:[function(require,module,exports){ +},{}],31:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -2134,7 +2130,7 @@ function waitForever(fun) { return new Promise(function (res) {}); } -},{}],31:[function(require,module,exports){ +},{}],32:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2161,7 +2157,7 @@ function waitResolveable() { }); return ret; } -},{"./utils":29}],32:[function(require,module,exports){ +},{"./utils":30}],33:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2227,7 +2223,7 @@ function waitUntil(fun) { runLoopOnce(); }); } -},{"./promisify":23,"./wait":33}],33:[function(require,module,exports){ +},{"./promisify":24,"./wait":34}],34:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -2249,7 +2245,7 @@ function wait() { return setTimeout(res, (0, _utils.ensureInSetTimeoutLimit)(ms)); }); } -},{"./utils":29}],34:[function(require,module,exports){ +},{"./utils":30}],35:[function(require,module,exports){ (function (global){(function (){ 'use strict'; @@ -2280,7 +2276,7 @@ module.exports = function availableTypedArrays() { }; }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],35:[function(require,module,exports){ +},{}],36:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -2432,9 +2428,9 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],36:[function(require,module,exports){ - },{}],37:[function(require,module,exports){ + +},{}],38:[function(require,module,exports){ (function (Buffer){(function (){ /*! * The buffer module from node.js, for the browser. @@ -4215,7 +4211,7 @@ function numberIsNaN (obj) { } }).call(this)}).call(this,require("buffer").Buffer) -},{"base64-js":35,"buffer":37,"ieee754":361}],38:[function(require,module,exports){ +},{"base64-js":36,"buffer":38,"ieee754":363}],39:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -4232,7 +4228,7 @@ module.exports = function callBoundIntrinsic(name, allowMissing) { return intrinsic; }; -},{"./":39,"get-intrinsic":352}],39:[function(require,module,exports){ +},{"./":40,"get-intrinsic":354}],40:[function(require,module,exports){ 'use strict'; var bind = require('function-bind'); @@ -4281,7 +4277,7 @@ if ($defineProperty) { module.exports.apply = applyBind; } -},{"function-bind":350,"get-intrinsic":352}],40:[function(require,module,exports){ +},{"function-bind":352,"get-intrinsic":354}],41:[function(require,module,exports){ (function (Buffer){(function (){ var clone = (function() { 'use strict'; @@ -4542,7 +4538,7 @@ if (typeof module === 'object' && module.exports) { } }).call(this)}).call(this,require("buffer").Buffer) -},{"buffer":37}],41:[function(require,module,exports){ +},{"buffer":38}],42:[function(require,module,exports){ require('../modules/es6.symbol'); require('../modules/es6.object.create'); require('../modules/es6.object.define-property'); @@ -4683,74 +4679,74 @@ require('../modules/es6.reflect.set'); require('../modules/es6.reflect.set-prototype-of'); module.exports = require('../modules/_core'); -},{"../modules/_core":90,"../modules/es6.array.copy-within":192,"../modules/es6.array.every":193,"../modules/es6.array.fill":194,"../modules/es6.array.filter":195,"../modules/es6.array.find":197,"../modules/es6.array.find-index":196,"../modules/es6.array.for-each":198,"../modules/es6.array.from":199,"../modules/es6.array.index-of":200,"../modules/es6.array.is-array":201,"../modules/es6.array.iterator":202,"../modules/es6.array.join":203,"../modules/es6.array.last-index-of":204,"../modules/es6.array.map":205,"../modules/es6.array.of":206,"../modules/es6.array.reduce":208,"../modules/es6.array.reduce-right":207,"../modules/es6.array.slice":209,"../modules/es6.array.some":210,"../modules/es6.array.sort":211,"../modules/es6.array.species":212,"../modules/es6.date.now":213,"../modules/es6.date.to-iso-string":214,"../modules/es6.date.to-json":215,"../modules/es6.date.to-primitive":216,"../modules/es6.date.to-string":217,"../modules/es6.function.bind":218,"../modules/es6.function.has-instance":219,"../modules/es6.function.name":220,"../modules/es6.map":221,"../modules/es6.math.acosh":222,"../modules/es6.math.asinh":223,"../modules/es6.math.atanh":224,"../modules/es6.math.cbrt":225,"../modules/es6.math.clz32":226,"../modules/es6.math.cosh":227,"../modules/es6.math.expm1":228,"../modules/es6.math.fround":229,"../modules/es6.math.hypot":230,"../modules/es6.math.imul":231,"../modules/es6.math.log10":232,"../modules/es6.math.log1p":233,"../modules/es6.math.log2":234,"../modules/es6.math.sign":235,"../modules/es6.math.sinh":236,"../modules/es6.math.tanh":237,"../modules/es6.math.trunc":238,"../modules/es6.number.constructor":239,"../modules/es6.number.epsilon":240,"../modules/es6.number.is-finite":241,"../modules/es6.number.is-integer":242,"../modules/es6.number.is-nan":243,"../modules/es6.number.is-safe-integer":244,"../modules/es6.number.max-safe-integer":245,"../modules/es6.number.min-safe-integer":246,"../modules/es6.number.parse-float":247,"../modules/es6.number.parse-int":248,"../modules/es6.number.to-fixed":249,"../modules/es6.number.to-precision":250,"../modules/es6.object.assign":251,"../modules/es6.object.create":252,"../modules/es6.object.define-properties":253,"../modules/es6.object.define-property":254,"../modules/es6.object.freeze":255,"../modules/es6.object.get-own-property-descriptor":256,"../modules/es6.object.get-own-property-names":257,"../modules/es6.object.get-prototype-of":258,"../modules/es6.object.is":262,"../modules/es6.object.is-extensible":259,"../modules/es6.object.is-frozen":260,"../modules/es6.object.is-sealed":261,"../modules/es6.object.keys":263,"../modules/es6.object.prevent-extensions":264,"../modules/es6.object.seal":265,"../modules/es6.object.set-prototype-of":266,"../modules/es6.object.to-string":267,"../modules/es6.parse-float":268,"../modules/es6.parse-int":269,"../modules/es6.promise":270,"../modules/es6.reflect.apply":271,"../modules/es6.reflect.construct":272,"../modules/es6.reflect.define-property":273,"../modules/es6.reflect.delete-property":274,"../modules/es6.reflect.enumerate":275,"../modules/es6.reflect.get":278,"../modules/es6.reflect.get-own-property-descriptor":276,"../modules/es6.reflect.get-prototype-of":277,"../modules/es6.reflect.has":279,"../modules/es6.reflect.is-extensible":280,"../modules/es6.reflect.own-keys":281,"../modules/es6.reflect.prevent-extensions":282,"../modules/es6.reflect.set":284,"../modules/es6.reflect.set-prototype-of":283,"../modules/es6.regexp.constructor":285,"../modules/es6.regexp.exec":286,"../modules/es6.regexp.flags":287,"../modules/es6.regexp.match":288,"../modules/es6.regexp.replace":289,"../modules/es6.regexp.search":290,"../modules/es6.regexp.split":291,"../modules/es6.regexp.to-string":292,"../modules/es6.set":293,"../modules/es6.string.anchor":294,"../modules/es6.string.big":295,"../modules/es6.string.blink":296,"../modules/es6.string.bold":297,"../modules/es6.string.code-point-at":298,"../modules/es6.string.ends-with":299,"../modules/es6.string.fixed":300,"../modules/es6.string.fontcolor":301,"../modules/es6.string.fontsize":302,"../modules/es6.string.from-code-point":303,"../modules/es6.string.includes":304,"../modules/es6.string.italics":305,"../modules/es6.string.iterator":306,"../modules/es6.string.link":307,"../modules/es6.string.raw":308,"../modules/es6.string.repeat":309,"../modules/es6.string.small":310,"../modules/es6.string.starts-with":311,"../modules/es6.string.strike":312,"../modules/es6.string.sub":313,"../modules/es6.string.sup":314,"../modules/es6.string.trim":315,"../modules/es6.symbol":316,"../modules/es6.typed.array-buffer":317,"../modules/es6.typed.data-view":318,"../modules/es6.typed.float32-array":319,"../modules/es6.typed.float64-array":320,"../modules/es6.typed.int16-array":321,"../modules/es6.typed.int32-array":322,"../modules/es6.typed.int8-array":323,"../modules/es6.typed.uint16-array":324,"../modules/es6.typed.uint32-array":325,"../modules/es6.typed.uint8-array":326,"../modules/es6.typed.uint8-clamped-array":327,"../modules/es6.weak-map":328,"../modules/es6.weak-set":329}],42:[function(require,module,exports){ +},{"../modules/_core":91,"../modules/es6.array.copy-within":193,"../modules/es6.array.every":194,"../modules/es6.array.fill":195,"../modules/es6.array.filter":196,"../modules/es6.array.find":198,"../modules/es6.array.find-index":197,"../modules/es6.array.for-each":199,"../modules/es6.array.from":200,"../modules/es6.array.index-of":201,"../modules/es6.array.is-array":202,"../modules/es6.array.iterator":203,"../modules/es6.array.join":204,"../modules/es6.array.last-index-of":205,"../modules/es6.array.map":206,"../modules/es6.array.of":207,"../modules/es6.array.reduce":209,"../modules/es6.array.reduce-right":208,"../modules/es6.array.slice":210,"../modules/es6.array.some":211,"../modules/es6.array.sort":212,"../modules/es6.array.species":213,"../modules/es6.date.now":214,"../modules/es6.date.to-iso-string":215,"../modules/es6.date.to-json":216,"../modules/es6.date.to-primitive":217,"../modules/es6.date.to-string":218,"../modules/es6.function.bind":219,"../modules/es6.function.has-instance":220,"../modules/es6.function.name":221,"../modules/es6.map":222,"../modules/es6.math.acosh":223,"../modules/es6.math.asinh":224,"../modules/es6.math.atanh":225,"../modules/es6.math.cbrt":226,"../modules/es6.math.clz32":227,"../modules/es6.math.cosh":228,"../modules/es6.math.expm1":229,"../modules/es6.math.fround":230,"../modules/es6.math.hypot":231,"../modules/es6.math.imul":232,"../modules/es6.math.log10":233,"../modules/es6.math.log1p":234,"../modules/es6.math.log2":235,"../modules/es6.math.sign":236,"../modules/es6.math.sinh":237,"../modules/es6.math.tanh":238,"../modules/es6.math.trunc":239,"../modules/es6.number.constructor":240,"../modules/es6.number.epsilon":241,"../modules/es6.number.is-finite":242,"../modules/es6.number.is-integer":243,"../modules/es6.number.is-nan":244,"../modules/es6.number.is-safe-integer":245,"../modules/es6.number.max-safe-integer":246,"../modules/es6.number.min-safe-integer":247,"../modules/es6.number.parse-float":248,"../modules/es6.number.parse-int":249,"../modules/es6.number.to-fixed":250,"../modules/es6.number.to-precision":251,"../modules/es6.object.assign":252,"../modules/es6.object.create":253,"../modules/es6.object.define-properties":254,"../modules/es6.object.define-property":255,"../modules/es6.object.freeze":256,"../modules/es6.object.get-own-property-descriptor":257,"../modules/es6.object.get-own-property-names":258,"../modules/es6.object.get-prototype-of":259,"../modules/es6.object.is":263,"../modules/es6.object.is-extensible":260,"../modules/es6.object.is-frozen":261,"../modules/es6.object.is-sealed":262,"../modules/es6.object.keys":264,"../modules/es6.object.prevent-extensions":265,"../modules/es6.object.seal":266,"../modules/es6.object.set-prototype-of":267,"../modules/es6.object.to-string":268,"../modules/es6.parse-float":269,"../modules/es6.parse-int":270,"../modules/es6.promise":271,"../modules/es6.reflect.apply":272,"../modules/es6.reflect.construct":273,"../modules/es6.reflect.define-property":274,"../modules/es6.reflect.delete-property":275,"../modules/es6.reflect.enumerate":276,"../modules/es6.reflect.get":279,"../modules/es6.reflect.get-own-property-descriptor":277,"../modules/es6.reflect.get-prototype-of":278,"../modules/es6.reflect.has":280,"../modules/es6.reflect.is-extensible":281,"../modules/es6.reflect.own-keys":282,"../modules/es6.reflect.prevent-extensions":283,"../modules/es6.reflect.set":285,"../modules/es6.reflect.set-prototype-of":284,"../modules/es6.regexp.constructor":286,"../modules/es6.regexp.exec":287,"../modules/es6.regexp.flags":288,"../modules/es6.regexp.match":289,"../modules/es6.regexp.replace":290,"../modules/es6.regexp.search":291,"../modules/es6.regexp.split":292,"../modules/es6.regexp.to-string":293,"../modules/es6.set":294,"../modules/es6.string.anchor":295,"../modules/es6.string.big":296,"../modules/es6.string.blink":297,"../modules/es6.string.bold":298,"../modules/es6.string.code-point-at":299,"../modules/es6.string.ends-with":300,"../modules/es6.string.fixed":301,"../modules/es6.string.fontcolor":302,"../modules/es6.string.fontsize":303,"../modules/es6.string.from-code-point":304,"../modules/es6.string.includes":305,"../modules/es6.string.italics":306,"../modules/es6.string.iterator":307,"../modules/es6.string.link":308,"../modules/es6.string.raw":309,"../modules/es6.string.repeat":310,"../modules/es6.string.small":311,"../modules/es6.string.starts-with":312,"../modules/es6.string.strike":313,"../modules/es6.string.sub":314,"../modules/es6.string.sup":315,"../modules/es6.string.trim":316,"../modules/es6.symbol":317,"../modules/es6.typed.array-buffer":318,"../modules/es6.typed.data-view":319,"../modules/es6.typed.float32-array":320,"../modules/es6.typed.float64-array":321,"../modules/es6.typed.int16-array":322,"../modules/es6.typed.int32-array":323,"../modules/es6.typed.int8-array":324,"../modules/es6.typed.uint16-array":325,"../modules/es6.typed.uint32-array":326,"../modules/es6.typed.uint8-array":327,"../modules/es6.typed.uint8-clamped-array":328,"../modules/es6.weak-map":329,"../modules/es6.weak-set":330}],43:[function(require,module,exports){ require('../../modules/es7.array.flat-map'); module.exports = require('../../modules/_core').Array.flatMap; -},{"../../modules/_core":90,"../../modules/es7.array.flat-map":330}],43:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es7.array.flat-map":331}],44:[function(require,module,exports){ require('../../modules/es7.array.includes'); module.exports = require('../../modules/_core').Array.includes; -},{"../../modules/_core":90,"../../modules/es7.array.includes":331}],44:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es7.array.includes":332}],45:[function(require,module,exports){ require('../../modules/es7.object.entries'); module.exports = require('../../modules/_core').Object.entries; -},{"../../modules/_core":90,"../../modules/es7.object.entries":332}],45:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es7.object.entries":333}],46:[function(require,module,exports){ require('../../modules/es7.object.get-own-property-descriptors'); module.exports = require('../../modules/_core').Object.getOwnPropertyDescriptors; -},{"../../modules/_core":90,"../../modules/es7.object.get-own-property-descriptors":333}],46:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es7.object.get-own-property-descriptors":334}],47:[function(require,module,exports){ require('../../modules/es7.object.values'); module.exports = require('../../modules/_core').Object.values; -},{"../../modules/_core":90,"../../modules/es7.object.values":334}],47:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es7.object.values":335}],48:[function(require,module,exports){ 'use strict'; require('../../modules/es6.promise'); require('../../modules/es7.promise.finally'); module.exports = require('../../modules/_core').Promise['finally']; -},{"../../modules/_core":90,"../../modules/es6.promise":270,"../../modules/es7.promise.finally":335}],48:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es6.promise":271,"../../modules/es7.promise.finally":336}],49:[function(require,module,exports){ require('../../modules/es7.string.pad-end'); module.exports = require('../../modules/_core').String.padEnd; -},{"../../modules/_core":90,"../../modules/es7.string.pad-end":336}],49:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es7.string.pad-end":337}],50:[function(require,module,exports){ require('../../modules/es7.string.pad-start'); module.exports = require('../../modules/_core').String.padStart; -},{"../../modules/_core":90,"../../modules/es7.string.pad-start":337}],50:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es7.string.pad-start":338}],51:[function(require,module,exports){ require('../../modules/es7.string.trim-right'); module.exports = require('../../modules/_core').String.trimRight; -},{"../../modules/_core":90,"../../modules/es7.string.trim-right":339}],51:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es7.string.trim-right":340}],52:[function(require,module,exports){ require('../../modules/es7.string.trim-left'); module.exports = require('../../modules/_core').String.trimLeft; -},{"../../modules/_core":90,"../../modules/es7.string.trim-left":338}],52:[function(require,module,exports){ +},{"../../modules/_core":91,"../../modules/es7.string.trim-left":339}],53:[function(require,module,exports){ require('../../modules/es7.symbol.async-iterator'); module.exports = require('../../modules/_wks-ext').f('asyncIterator'); -},{"../../modules/_wks-ext":189,"../../modules/es7.symbol.async-iterator":340}],53:[function(require,module,exports){ +},{"../../modules/_wks-ext":190,"../../modules/es7.symbol.async-iterator":341}],54:[function(require,module,exports){ require('../modules/es7.global'); module.exports = require('../modules/_core').global; -},{"../modules/_core":56,"../modules/es7.global":70}],54:[function(require,module,exports){ +},{"../modules/_core":57,"../modules/es7.global":71}],55:[function(require,module,exports){ module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; -},{}],55:[function(require,module,exports){ +},{}],56:[function(require,module,exports){ var isObject = require('./_is-object'); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; -},{"./_is-object":66}],56:[function(require,module,exports){ +},{"./_is-object":67}],57:[function(require,module,exports){ var core = module.exports = { version: '2.6.12' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef -},{}],57:[function(require,module,exports){ +},{}],58:[function(require,module,exports){ // optional / simple context binding var aFunction = require('./_a-function'); module.exports = function (fn, that, length) { @@ -4772,13 +4768,13 @@ module.exports = function (fn, that, length) { }; }; -},{"./_a-function":54}],58:[function(require,module,exports){ +},{"./_a-function":55}],59:[function(require,module,exports){ // Thank's IE8 for his funny defineProperty module.exports = !require('./_fails')(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); -},{"./_fails":61}],59:[function(require,module,exports){ +},{"./_fails":62}],60:[function(require,module,exports){ var isObject = require('./_is-object'); var document = require('./_global').document; // typeof document.createElement is 'object' in old IE @@ -4787,7 +4783,7 @@ module.exports = function (it) { return is ? document.createElement(it) : {}; }; -},{"./_global":62,"./_is-object":66}],60:[function(require,module,exports){ +},{"./_global":63,"./_is-object":67}],61:[function(require,module,exports){ var global = require('./_global'); var core = require('./_core'); var ctx = require('./_ctx'); @@ -4851,7 +4847,7 @@ $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; -},{"./_core":56,"./_ctx":57,"./_global":62,"./_has":63,"./_hide":64}],61:[function(require,module,exports){ +},{"./_core":57,"./_ctx":58,"./_global":63,"./_has":64,"./_hide":65}],62:[function(require,module,exports){ module.exports = function (exec) { try { return !!exec(); @@ -4860,7 +4856,7 @@ module.exports = function (exec) { } }; -},{}],62:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self @@ -4868,13 +4864,13 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef -},{}],63:[function(require,module,exports){ +},{}],64:[function(require,module,exports){ var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; -},{}],64:[function(require,module,exports){ +},{}],65:[function(require,module,exports){ var dP = require('./_object-dp'); var createDesc = require('./_property-desc'); module.exports = require('./_descriptors') ? function (object, key, value) { @@ -4884,17 +4880,17 @@ module.exports = require('./_descriptors') ? function (object, key, value) { return object; }; -},{"./_descriptors":58,"./_object-dp":67,"./_property-desc":68}],65:[function(require,module,exports){ +},{"./_descriptors":59,"./_object-dp":68,"./_property-desc":69}],66:[function(require,module,exports){ module.exports = !require('./_descriptors') && !require('./_fails')(function () { return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; }); -},{"./_descriptors":58,"./_dom-create":59,"./_fails":61}],66:[function(require,module,exports){ +},{"./_descriptors":59,"./_dom-create":60,"./_fails":62}],67:[function(require,module,exports){ module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; -},{}],67:[function(require,module,exports){ +},{}],68:[function(require,module,exports){ var anObject = require('./_an-object'); var IE8_DOM_DEFINE = require('./_ie8-dom-define'); var toPrimitive = require('./_to-primitive'); @@ -4912,7 +4908,7 @@ exports.f = require('./_descriptors') ? Object.defineProperty : function defineP return O; }; -},{"./_an-object":55,"./_descriptors":58,"./_ie8-dom-define":65,"./_to-primitive":69}],68:[function(require,module,exports){ +},{"./_an-object":56,"./_descriptors":59,"./_ie8-dom-define":66,"./_to-primitive":70}],69:[function(require,module,exports){ module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), @@ -4922,7 +4918,7 @@ module.exports = function (bitmap, value) { }; }; -},{}],69:[function(require,module,exports){ +},{}],70:[function(require,module,exports){ // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = require('./_is-object'); // instead of the ES6 spec version, we didn't implement @@toPrimitive case @@ -4936,22 +4932,22 @@ module.exports = function (it, S) { throw TypeError("Can't convert object to primitive value"); }; -},{"./_is-object":66}],70:[function(require,module,exports){ +},{"./_is-object":67}],71:[function(require,module,exports){ // https://github.com/tc39/proposal-global var $export = require('./_export'); $export($export.G, { global: require('./_global') }); -},{"./_export":60,"./_global":62}],71:[function(require,module,exports){ -arguments[4][54][0].apply(exports,arguments) -},{"dup":54}],72:[function(require,module,exports){ +},{"./_export":61,"./_global":63}],72:[function(require,module,exports){ +arguments[4][55][0].apply(exports,arguments) +},{"dup":55}],73:[function(require,module,exports){ var cof = require('./_cof'); module.exports = function (it, msg) { if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); return +it; }; -},{"./_cof":86}],73:[function(require,module,exports){ +},{"./_cof":87}],74:[function(require,module,exports){ // 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES = require('./_wks')('unscopables'); var ArrayProto = Array.prototype; @@ -4960,7 +4956,7 @@ module.exports = function (key) { ArrayProto[UNSCOPABLES][key] = true; }; -},{"./_hide":110,"./_wks":190}],74:[function(require,module,exports){ +},{"./_hide":111,"./_wks":191}],75:[function(require,module,exports){ 'use strict'; var at = require('./_string-at')(true); @@ -4970,16 +4966,16 @@ module.exports = function (S, index, unicode) { return index + (unicode ? at(S, index).length : 1); }; -},{"./_string-at":167}],75:[function(require,module,exports){ +},{"./_string-at":168}],76:[function(require,module,exports){ module.exports = function (it, Constructor, name, forbiddenField) { if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { throw TypeError(name + ': incorrect invocation!'); } return it; }; -},{}],76:[function(require,module,exports){ -arguments[4][55][0].apply(exports,arguments) -},{"./_is-object":119,"dup":55}],77:[function(require,module,exports){ +},{}],77:[function(require,module,exports){ +arguments[4][56][0].apply(exports,arguments) +},{"./_is-object":120,"dup":56}],78:[function(require,module,exports){ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = require('./_to-object'); @@ -5007,7 +5003,7 @@ module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* } return O; }; -},{"./_to-absolute-index":175,"./_to-length":179,"./_to-object":180}],78:[function(require,module,exports){ +},{"./_to-absolute-index":176,"./_to-length":180,"./_to-object":181}],79:[function(require,module,exports){ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = require('./_to-object'); @@ -5024,7 +5020,7 @@ module.exports = function fill(value /* , start = 0, end = @length */) { return O; }; -},{"./_to-absolute-index":175,"./_to-length":179,"./_to-object":180}],79:[function(require,module,exports){ +},{"./_to-absolute-index":176,"./_to-length":180,"./_to-object":181}],80:[function(require,module,exports){ // false -> Array#indexOf // true -> Array#includes var toIObject = require('./_to-iobject'); @@ -5049,7 +5045,7 @@ module.exports = function (IS_INCLUDES) { }; }; -},{"./_to-absolute-index":175,"./_to-iobject":178,"./_to-length":179}],80:[function(require,module,exports){ +},{"./_to-absolute-index":176,"./_to-iobject":179,"./_to-length":180}],81:[function(require,module,exports){ // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter @@ -5095,7 +5091,7 @@ module.exports = function (TYPE, $create) { }; }; -},{"./_array-species-create":83,"./_ctx":92,"./_iobject":115,"./_to-length":179,"./_to-object":180}],81:[function(require,module,exports){ +},{"./_array-species-create":84,"./_ctx":93,"./_iobject":116,"./_to-length":180,"./_to-object":181}],82:[function(require,module,exports){ var aFunction = require('./_a-function'); var toObject = require('./_to-object'); var IObject = require('./_iobject'); @@ -5125,7 +5121,7 @@ module.exports = function (that, callbackfn, aLen, memo, isRight) { return memo; }; -},{"./_a-function":71,"./_iobject":115,"./_to-length":179,"./_to-object":180}],82:[function(require,module,exports){ +},{"./_a-function":72,"./_iobject":116,"./_to-length":180,"./_to-object":181}],83:[function(require,module,exports){ var isObject = require('./_is-object'); var isArray = require('./_is-array'); var SPECIES = require('./_wks')('species'); @@ -5143,7 +5139,7 @@ module.exports = function (original) { } return C === undefined ? Array : C; }; -},{"./_is-array":117,"./_is-object":119,"./_wks":190}],83:[function(require,module,exports){ +},{"./_is-array":118,"./_is-object":120,"./_wks":191}],84:[function(require,module,exports){ // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = require('./_array-species-constructor'); @@ -5151,7 +5147,7 @@ module.exports = function (original, length) { return new (speciesConstructor(original))(length); }; -},{"./_array-species-constructor":82}],84:[function(require,module,exports){ +},{"./_array-species-constructor":83}],85:[function(require,module,exports){ 'use strict'; var aFunction = require('./_a-function'); var isObject = require('./_is-object'); @@ -5178,7 +5174,7 @@ module.exports = Function.bind || function bind(that /* , ...args */) { return bound; }; -},{"./_a-function":71,"./_invoke":114,"./_is-object":119}],85:[function(require,module,exports){ +},{"./_a-function":72,"./_invoke":115,"./_is-object":120}],86:[function(require,module,exports){ // getting tag from 19.1.3.6 Object.prototype.toString() var cof = require('./_cof'); var TAG = require('./_wks')('toStringTag'); @@ -5203,14 +5199,14 @@ module.exports = function (it) { : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; -},{"./_cof":86,"./_wks":190}],86:[function(require,module,exports){ +},{"./_cof":87,"./_wks":191}],87:[function(require,module,exports){ var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; -},{}],87:[function(require,module,exports){ +},{}],88:[function(require,module,exports){ 'use strict'; var dP = require('./_object-dp').f; var create = require('./_object-create'); @@ -5356,7 +5352,7 @@ module.exports = { } }; -},{"./_an-instance":75,"./_ctx":92,"./_descriptors":96,"./_for-of":106,"./_iter-define":123,"./_iter-step":125,"./_meta":132,"./_object-create":136,"./_object-dp":137,"./_redefine-all":155,"./_set-species":161,"./_validate-collection":187}],88:[function(require,module,exports){ +},{"./_an-instance":76,"./_ctx":93,"./_descriptors":97,"./_for-of":107,"./_iter-define":124,"./_iter-step":126,"./_meta":133,"./_object-create":137,"./_object-dp":138,"./_redefine-all":156,"./_set-species":162,"./_validate-collection":188}],89:[function(require,module,exports){ 'use strict'; var redefineAll = require('./_redefine-all'); var getWeak = require('./_meta').getWeak; @@ -5443,7 +5439,7 @@ module.exports = { ufstore: uncaughtFrozenStore }; -},{"./_an-instance":75,"./_an-object":76,"./_array-methods":80,"./_for-of":106,"./_has":109,"./_is-object":119,"./_meta":132,"./_redefine-all":155,"./_validate-collection":187}],89:[function(require,module,exports){ +},{"./_an-instance":76,"./_an-object":77,"./_array-methods":81,"./_for-of":107,"./_has":110,"./_is-object":120,"./_meta":133,"./_redefine-all":156,"./_validate-collection":188}],90:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var $export = require('./_export'); @@ -5530,9 +5526,9 @@ module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { return C; }; -},{"./_an-instance":75,"./_export":100,"./_fails":102,"./_for-of":106,"./_global":108,"./_inherit-if-required":113,"./_is-object":119,"./_iter-detect":124,"./_meta":132,"./_redefine":156,"./_redefine-all":155,"./_set-to-string-tag":162}],90:[function(require,module,exports){ -arguments[4][56][0].apply(exports,arguments) -},{"dup":56}],91:[function(require,module,exports){ +},{"./_an-instance":76,"./_export":101,"./_fails":103,"./_for-of":107,"./_global":109,"./_inherit-if-required":114,"./_is-object":120,"./_iter-detect":125,"./_meta":133,"./_redefine":157,"./_redefine-all":156,"./_set-to-string-tag":163}],91:[function(require,module,exports){ +arguments[4][57][0].apply(exports,arguments) +},{"dup":57}],92:[function(require,module,exports){ 'use strict'; var $defineProperty = require('./_object-dp'); var createDesc = require('./_property-desc'); @@ -5542,9 +5538,9 @@ module.exports = function (object, index, value) { else object[index] = value; }; -},{"./_object-dp":137,"./_property-desc":154}],92:[function(require,module,exports){ -arguments[4][57][0].apply(exports,arguments) -},{"./_a-function":71,"dup":57}],93:[function(require,module,exports){ +},{"./_object-dp":138,"./_property-desc":155}],93:[function(require,module,exports){ +arguments[4][58][0].apply(exports,arguments) +},{"./_a-function":72,"dup":58}],94:[function(require,module,exports){ 'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var fails = require('./_fails'); @@ -5572,7 +5568,7 @@ module.exports = (fails(function () { ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; } : $toISOString; -},{"./_fails":102}],94:[function(require,module,exports){ +},{"./_fails":103}],95:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); var toPrimitive = require('./_to-primitive'); @@ -5583,24 +5579,24 @@ module.exports = function (hint) { return toPrimitive(anObject(this), hint != NUMBER); }; -},{"./_an-object":76,"./_to-primitive":181}],95:[function(require,module,exports){ +},{"./_an-object":77,"./_to-primitive":182}],96:[function(require,module,exports){ // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; -},{}],96:[function(require,module,exports){ -arguments[4][58][0].apply(exports,arguments) -},{"./_fails":102,"dup":58}],97:[function(require,module,exports){ +},{}],97:[function(require,module,exports){ arguments[4][59][0].apply(exports,arguments) -},{"./_global":108,"./_is-object":119,"dup":59}],98:[function(require,module,exports){ +},{"./_fails":103,"dup":59}],98:[function(require,module,exports){ +arguments[4][60][0].apply(exports,arguments) +},{"./_global":109,"./_is-object":120,"dup":60}],99:[function(require,module,exports){ // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); -},{}],99:[function(require,module,exports){ +},{}],100:[function(require,module,exports){ // all enumerable object keys, includes symbols var getKeys = require('./_object-keys'); var gOPS = require('./_object-gops'); @@ -5617,7 +5613,7 @@ module.exports = function (it) { } return result; }; -},{"./_object-gops":142,"./_object-keys":145,"./_object-pie":146}],100:[function(require,module,exports){ +},{"./_object-gops":143,"./_object-keys":146,"./_object-pie":147}],101:[function(require,module,exports){ var global = require('./_global'); var core = require('./_core'); var hide = require('./_hide'); @@ -5662,7 +5658,7 @@ $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; -},{"./_core":90,"./_ctx":92,"./_global":108,"./_hide":110,"./_redefine":156}],101:[function(require,module,exports){ +},{"./_core":91,"./_ctx":93,"./_global":109,"./_hide":111,"./_redefine":157}],102:[function(require,module,exports){ var MATCH = require('./_wks')('match'); module.exports = function (KEY) { var re = /./; @@ -5676,9 +5672,9 @@ module.exports = function (KEY) { } return true; }; -},{"./_wks":190}],102:[function(require,module,exports){ -arguments[4][61][0].apply(exports,arguments) -},{"dup":61}],103:[function(require,module,exports){ +},{"./_wks":191}],103:[function(require,module,exports){ +arguments[4][62][0].apply(exports,arguments) +},{"dup":62}],104:[function(require,module,exports){ 'use strict'; require('./es6.regexp.exec'); var redefine = require('./_redefine'); @@ -5776,7 +5772,7 @@ module.exports = function (KEY, length, exec) { } }; -},{"./_defined":95,"./_fails":102,"./_hide":110,"./_redefine":156,"./_regexp-exec":158,"./_wks":190,"./es6.regexp.exec":286}],104:[function(require,module,exports){ +},{"./_defined":96,"./_fails":103,"./_hide":111,"./_redefine":157,"./_regexp-exec":159,"./_wks":191,"./es6.regexp.exec":287}],105:[function(require,module,exports){ 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = require('./_an-object'); @@ -5791,7 +5787,7 @@ module.exports = function () { return result; }; -},{"./_an-object":76}],105:[function(require,module,exports){ +},{"./_an-object":77}],106:[function(require,module,exports){ 'use strict'; // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray var isArray = require('./_is-array'); @@ -5832,7 +5828,7 @@ function flattenIntoArray(target, original, source, sourceLen, start, depth, map module.exports = flattenIntoArray; -},{"./_ctx":92,"./_is-array":117,"./_is-object":119,"./_to-length":179,"./_wks":190}],106:[function(require,module,exports){ +},{"./_ctx":93,"./_is-array":118,"./_is-object":120,"./_to-length":180,"./_wks":191}],107:[function(require,module,exports){ var ctx = require('./_ctx'); var call = require('./_iter-call'); var isArrayIter = require('./_is-array-iter'); @@ -5859,22 +5855,22 @@ var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) exports.BREAK = BREAK; exports.RETURN = RETURN; -},{"./_an-object":76,"./_ctx":92,"./_is-array-iter":116,"./_iter-call":121,"./_to-length":179,"./core.get-iterator-method":191}],107:[function(require,module,exports){ +},{"./_an-object":77,"./_ctx":93,"./_is-array-iter":117,"./_iter-call":122,"./_to-length":180,"./core.get-iterator-method":192}],108:[function(require,module,exports){ module.exports = require('./_shared')('native-function-to-string', Function.toString); -},{"./_shared":164}],108:[function(require,module,exports){ -arguments[4][62][0].apply(exports,arguments) -},{"dup":62}],109:[function(require,module,exports){ +},{"./_shared":165}],109:[function(require,module,exports){ arguments[4][63][0].apply(exports,arguments) },{"dup":63}],110:[function(require,module,exports){ arguments[4][64][0].apply(exports,arguments) -},{"./_descriptors":96,"./_object-dp":137,"./_property-desc":154,"dup":64}],111:[function(require,module,exports){ +},{"dup":64}],111:[function(require,module,exports){ +arguments[4][65][0].apply(exports,arguments) +},{"./_descriptors":97,"./_object-dp":138,"./_property-desc":155,"dup":65}],112:[function(require,module,exports){ var document = require('./_global').document; module.exports = document && document.documentElement; -},{"./_global":108}],112:[function(require,module,exports){ -arguments[4][65][0].apply(exports,arguments) -},{"./_descriptors":96,"./_dom-create":97,"./_fails":102,"dup":65}],113:[function(require,module,exports){ +},{"./_global":109}],113:[function(require,module,exports){ +arguments[4][66][0].apply(exports,arguments) +},{"./_descriptors":97,"./_dom-create":98,"./_fails":103,"dup":66}],114:[function(require,module,exports){ var isObject = require('./_is-object'); var setPrototypeOf = require('./_set-proto').set; module.exports = function (that, target, C) { @@ -5885,7 +5881,7 @@ module.exports = function (that, target, C) { } return that; }; -},{"./_is-object":119,"./_set-proto":160}],114:[function(require,module,exports){ +},{"./_is-object":120,"./_set-proto":161}],115:[function(require,module,exports){ // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function (fn, args, that) { var un = that === undefined; @@ -5903,7 +5899,7 @@ module.exports = function (fn, args, that) { } return fn.apply(that, args); }; -},{}],115:[function(require,module,exports){ +},{}],116:[function(require,module,exports){ // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = require('./_cof'); // eslint-disable-next-line no-prototype-builtins @@ -5911,7 +5907,7 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; -},{"./_cof":86}],116:[function(require,module,exports){ +},{"./_cof":87}],117:[function(require,module,exports){ // check on default Array iterator var Iterators = require('./_iterators'); var ITERATOR = require('./_wks')('iterator'); @@ -5921,14 +5917,14 @@ module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; -},{"./_iterators":126,"./_wks":190}],117:[function(require,module,exports){ +},{"./_iterators":127,"./_wks":191}],118:[function(require,module,exports){ // 7.2.2 IsArray(argument) var cof = require('./_cof'); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; -},{"./_cof":86}],118:[function(require,module,exports){ +},{"./_cof":87}],119:[function(require,module,exports){ // 20.1.2.3 Number.isInteger(number) var isObject = require('./_is-object'); var floor = Math.floor; @@ -5936,9 +5932,9 @@ module.exports = function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; -},{"./_is-object":119}],119:[function(require,module,exports){ -arguments[4][66][0].apply(exports,arguments) -},{"dup":66}],120:[function(require,module,exports){ +},{"./_is-object":120}],120:[function(require,module,exports){ +arguments[4][67][0].apply(exports,arguments) +},{"dup":67}],121:[function(require,module,exports){ // 7.2.8 IsRegExp(argument) var isObject = require('./_is-object'); var cof = require('./_cof'); @@ -5948,7 +5944,7 @@ module.exports = function (it) { return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; -},{"./_cof":86,"./_is-object":119,"./_wks":190}],121:[function(require,module,exports){ +},{"./_cof":87,"./_is-object":120,"./_wks":191}],122:[function(require,module,exports){ // call something on iterator step with safe closing on error var anObject = require('./_an-object'); module.exports = function (iterator, fn, value, entries) { @@ -5962,7 +5958,7 @@ module.exports = function (iterator, fn, value, entries) { } }; -},{"./_an-object":76}],122:[function(require,module,exports){ +},{"./_an-object":77}],123:[function(require,module,exports){ 'use strict'; var create = require('./_object-create'); var descriptor = require('./_property-desc'); @@ -5977,7 +5973,7 @@ module.exports = function (Constructor, NAME, next) { setToStringTag(Constructor, NAME + ' Iterator'); }; -},{"./_hide":110,"./_object-create":136,"./_property-desc":154,"./_set-to-string-tag":162,"./_wks":190}],123:[function(require,module,exports){ +},{"./_hide":111,"./_object-create":137,"./_property-desc":155,"./_set-to-string-tag":163,"./_wks":191}],124:[function(require,module,exports){ 'use strict'; var LIBRARY = require('./_library'); var $export = require('./_export'); @@ -6048,7 +6044,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE return methods; }; -},{"./_export":100,"./_hide":110,"./_iter-create":122,"./_iterators":126,"./_library":127,"./_object-gpo":143,"./_redefine":156,"./_set-to-string-tag":162,"./_wks":190}],124:[function(require,module,exports){ +},{"./_export":101,"./_hide":111,"./_iter-create":123,"./_iterators":127,"./_library":128,"./_object-gpo":144,"./_redefine":157,"./_set-to-string-tag":163,"./_wks":191}],125:[function(require,module,exports){ var ITERATOR = require('./_wks')('iterator'); var SAFE_CLOSING = false; @@ -6072,18 +6068,18 @@ module.exports = function (exec, skipClosing) { return safe; }; -},{"./_wks":190}],125:[function(require,module,exports){ +},{"./_wks":191}],126:[function(require,module,exports){ module.exports = function (done, value) { return { value: value, done: !!done }; }; -},{}],126:[function(require,module,exports){ +},{}],127:[function(require,module,exports){ module.exports = {}; -},{}],127:[function(require,module,exports){ +},{}],128:[function(require,module,exports){ module.exports = false; -},{}],128:[function(require,module,exports){ +},{}],129:[function(require,module,exports){ // 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 @@ -6095,7 +6091,7 @@ module.exports = (!$expm1 return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1; -},{}],129:[function(require,module,exports){ +},{}],130:[function(require,module,exports){ // 20.2.2.16 Math.fround(x) var sign = require('./_math-sign'); var pow = Math.pow; @@ -6120,20 +6116,20 @@ module.exports = Math.fround || function fround(x) { return $sign * result; }; -},{"./_math-sign":131}],130:[function(require,module,exports){ +},{"./_math-sign":132}],131:[function(require,module,exports){ // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x) { return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; -},{}],131:[function(require,module,exports){ +},{}],132:[function(require,module,exports){ // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x) { // eslint-disable-next-line no-self-compare return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; -},{}],132:[function(require,module,exports){ +},{}],133:[function(require,module,exports){ var META = require('./_uid')('meta'); var isObject = require('./_is-object'); var has = require('./_has'); @@ -6188,7 +6184,7 @@ var meta = module.exports = { onFreeze: onFreeze }; -},{"./_fails":102,"./_has":109,"./_is-object":119,"./_object-dp":137,"./_uid":185}],133:[function(require,module,exports){ +},{"./_fails":103,"./_has":110,"./_is-object":120,"./_object-dp":138,"./_uid":186}],134:[function(require,module,exports){ var global = require('./_global'); var macrotask = require('./_task').set; var Observer = global.MutationObserver || global.WebKitMutationObserver; @@ -6259,7 +6255,7 @@ module.exports = function () { }; }; -},{"./_cof":86,"./_global":108,"./_task":174}],134:[function(require,module,exports){ +},{"./_cof":87,"./_global":109,"./_task":175}],135:[function(require,module,exports){ 'use strict'; // 25.4.1.5 NewPromiseCapability(C) var aFunction = require('./_a-function'); @@ -6279,7 +6275,7 @@ module.exports.f = function (C) { return new PromiseCapability(C); }; -},{"./_a-function":71}],135:[function(require,module,exports){ +},{"./_a-function":72}],136:[function(require,module,exports){ 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var DESCRIPTORS = require('./_descriptors'); @@ -6319,7 +6315,7 @@ module.exports = !$assign || require('./_fails')(function () { } return T; } : $assign; -},{"./_descriptors":96,"./_fails":102,"./_iobject":115,"./_object-gops":142,"./_object-keys":145,"./_object-pie":146,"./_to-object":180}],136:[function(require,module,exports){ +},{"./_descriptors":97,"./_fails":103,"./_iobject":116,"./_object-gops":143,"./_object-keys":146,"./_object-pie":147,"./_to-object":181}],137:[function(require,module,exports){ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = require('./_an-object'); var dPs = require('./_object-dps'); @@ -6362,9 +6358,9 @@ module.exports = Object.create || function create(O, Properties) { return Properties === undefined ? result : dPs(result, Properties); }; -},{"./_an-object":76,"./_dom-create":97,"./_enum-bug-keys":98,"./_html":111,"./_object-dps":138,"./_shared-key":163}],137:[function(require,module,exports){ -arguments[4][67][0].apply(exports,arguments) -},{"./_an-object":76,"./_descriptors":96,"./_ie8-dom-define":112,"./_to-primitive":181,"dup":67}],138:[function(require,module,exports){ +},{"./_an-object":77,"./_dom-create":98,"./_enum-bug-keys":99,"./_html":112,"./_object-dps":139,"./_shared-key":164}],138:[function(require,module,exports){ +arguments[4][68][0].apply(exports,arguments) +},{"./_an-object":77,"./_descriptors":97,"./_ie8-dom-define":113,"./_to-primitive":182,"dup":68}],139:[function(require,module,exports){ var dP = require('./_object-dp'); var anObject = require('./_an-object'); var getKeys = require('./_object-keys'); @@ -6379,7 +6375,7 @@ module.exports = require('./_descriptors') ? Object.defineProperties : function return O; }; -},{"./_an-object":76,"./_descriptors":96,"./_object-dp":137,"./_object-keys":145}],139:[function(require,module,exports){ +},{"./_an-object":77,"./_descriptors":97,"./_object-dp":138,"./_object-keys":146}],140:[function(require,module,exports){ var pIE = require('./_object-pie'); var createDesc = require('./_property-desc'); var toIObject = require('./_to-iobject'); @@ -6397,7 +6393,7 @@ exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; -},{"./_descriptors":96,"./_has":109,"./_ie8-dom-define":112,"./_object-pie":146,"./_property-desc":154,"./_to-iobject":178,"./_to-primitive":181}],140:[function(require,module,exports){ +},{"./_descriptors":97,"./_has":110,"./_ie8-dom-define":113,"./_object-pie":147,"./_property-desc":155,"./_to-iobject":179,"./_to-primitive":182}],141:[function(require,module,exports){ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = require('./_to-iobject'); var gOPN = require('./_object-gopn').f; @@ -6418,7 +6414,7 @@ module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; -},{"./_object-gopn":141,"./_to-iobject":178}],141:[function(require,module,exports){ +},{"./_object-gopn":142,"./_to-iobject":179}],142:[function(require,module,exports){ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = require('./_object-keys-internal'); var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); @@ -6427,10 +6423,10 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; -},{"./_enum-bug-keys":98,"./_object-keys-internal":144}],142:[function(require,module,exports){ +},{"./_enum-bug-keys":99,"./_object-keys-internal":145}],143:[function(require,module,exports){ exports.f = Object.getOwnPropertySymbols; -},{}],143:[function(require,module,exports){ +},{}],144:[function(require,module,exports){ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = require('./_has'); var toObject = require('./_to-object'); @@ -6445,7 +6441,7 @@ module.exports = Object.getPrototypeOf || function (O) { } return O instanceof Object ? ObjectProto : null; }; -},{"./_has":109,"./_shared-key":163,"./_to-object":180}],144:[function(require,module,exports){ +},{"./_has":110,"./_shared-key":164,"./_to-object":181}],145:[function(require,module,exports){ var has = require('./_has'); var toIObject = require('./_to-iobject'); var arrayIndexOf = require('./_array-includes')(false); @@ -6464,7 +6460,7 @@ module.exports = function (object, names) { return result; }; -},{"./_array-includes":79,"./_has":109,"./_shared-key":163,"./_to-iobject":178}],145:[function(require,module,exports){ +},{"./_array-includes":80,"./_has":110,"./_shared-key":164,"./_to-iobject":179}],146:[function(require,module,exports){ // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = require('./_object-keys-internal'); var enumBugKeys = require('./_enum-bug-keys'); @@ -6473,10 +6469,10 @@ module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; -},{"./_enum-bug-keys":98,"./_object-keys-internal":144}],146:[function(require,module,exports){ +},{"./_enum-bug-keys":99,"./_object-keys-internal":145}],147:[function(require,module,exports){ exports.f = {}.propertyIsEnumerable; -},{}],147:[function(require,module,exports){ +},{}],148:[function(require,module,exports){ // most Object methods by ES6 should accept primitives var $export = require('./_export'); var core = require('./_core'); @@ -6488,7 +6484,7 @@ module.exports = function (KEY, exec) { $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; -},{"./_core":90,"./_export":100,"./_fails":102}],148:[function(require,module,exports){ +},{"./_core":91,"./_export":101,"./_fails":103}],149:[function(require,module,exports){ var DESCRIPTORS = require('./_descriptors'); var getKeys = require('./_object-keys'); var toIObject = require('./_to-iobject'); @@ -6511,7 +6507,7 @@ module.exports = function (isEntries) { }; }; -},{"./_descriptors":96,"./_object-keys":145,"./_object-pie":146,"./_to-iobject":178}],149:[function(require,module,exports){ +},{"./_descriptors":97,"./_object-keys":146,"./_object-pie":147,"./_to-iobject":179}],150:[function(require,module,exports){ // all object keys, includes non-enumerable and symbols var gOPN = require('./_object-gopn'); var gOPS = require('./_object-gops'); @@ -6523,7 +6519,7 @@ module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { return getSymbols ? keys.concat(getSymbols(it)) : keys; }; -},{"./_an-object":76,"./_global":108,"./_object-gopn":141,"./_object-gops":142}],150:[function(require,module,exports){ +},{"./_an-object":77,"./_global":109,"./_object-gopn":142,"./_object-gops":143}],151:[function(require,module,exports){ var $parseFloat = require('./_global').parseFloat; var $trim = require('./_string-trim').trim; @@ -6533,7 +6529,7 @@ module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat; -},{"./_global":108,"./_string-trim":172,"./_string-ws":173}],151:[function(require,module,exports){ +},{"./_global":109,"./_string-trim":173,"./_string-ws":174}],152:[function(require,module,exports){ var $parseInt = require('./_global').parseInt; var $trim = require('./_string-trim').trim; var ws = require('./_string-ws'); @@ -6544,7 +6540,7 @@ module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? f return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt; -},{"./_global":108,"./_string-trim":172,"./_string-ws":173}],152:[function(require,module,exports){ +},{"./_global":109,"./_string-trim":173,"./_string-ws":174}],153:[function(require,module,exports){ module.exports = function (exec) { try { return { e: false, v: exec() }; @@ -6553,7 +6549,7 @@ module.exports = function (exec) { } }; -},{}],153:[function(require,module,exports){ +},{}],154:[function(require,module,exports){ var anObject = require('./_an-object'); var isObject = require('./_is-object'); var newPromiseCapability = require('./_new-promise-capability'); @@ -6567,16 +6563,16 @@ module.exports = function (C, x) { return promiseCapability.promise; }; -},{"./_an-object":76,"./_is-object":119,"./_new-promise-capability":134}],154:[function(require,module,exports){ -arguments[4][68][0].apply(exports,arguments) -},{"dup":68}],155:[function(require,module,exports){ +},{"./_an-object":77,"./_is-object":120,"./_new-promise-capability":135}],155:[function(require,module,exports){ +arguments[4][69][0].apply(exports,arguments) +},{"dup":69}],156:[function(require,module,exports){ var redefine = require('./_redefine'); module.exports = function (target, src, safe) { for (var key in src) redefine(target, key, src[key], safe); return target; }; -},{"./_redefine":156}],156:[function(require,module,exports){ +},{"./_redefine":157}],157:[function(require,module,exports){ var global = require('./_global'); var hide = require('./_hide'); var has = require('./_has'); @@ -6609,7 +6605,7 @@ require('./_core').inspectSource = function (it) { return typeof this == 'function' && this[SRC] || $toString.call(this); }); -},{"./_core":90,"./_function-to-string":107,"./_global":108,"./_has":109,"./_hide":110,"./_uid":185}],157:[function(require,module,exports){ +},{"./_core":91,"./_function-to-string":108,"./_global":109,"./_has":110,"./_hide":111,"./_uid":186}],158:[function(require,module,exports){ 'use strict'; var classof = require('./_classof'); @@ -6632,7 +6628,7 @@ module.exports = function (R, S) { return builtinExec.call(R, S); }; -},{"./_classof":85}],158:[function(require,module,exports){ +},{"./_classof":86}],159:[function(require,module,exports){ 'use strict'; var regexpFlags = require('./_flags'); @@ -6692,14 +6688,14 @@ if (PATCH) { module.exports = patchedExec; -},{"./_flags":104}],159:[function(require,module,exports){ +},{"./_flags":105}],160:[function(require,module,exports){ // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y) { // eslint-disable-next-line no-self-compare return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; -},{}],160:[function(require,module,exports){ +},{}],161:[function(require,module,exports){ // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = require('./_is-object'); @@ -6726,7 +6722,7 @@ module.exports = { check: check }; -},{"./_an-object":76,"./_ctx":92,"./_is-object":119,"./_object-gopd":139}],161:[function(require,module,exports){ +},{"./_an-object":77,"./_ctx":93,"./_is-object":120,"./_object-gopd":140}],162:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var dP = require('./_object-dp'); @@ -6741,7 +6737,7 @@ module.exports = function (KEY) { }); }; -},{"./_descriptors":96,"./_global":108,"./_object-dp":137,"./_wks":190}],162:[function(require,module,exports){ +},{"./_descriptors":97,"./_global":109,"./_object-dp":138,"./_wks":191}],163:[function(require,module,exports){ var def = require('./_object-dp').f; var has = require('./_has'); var TAG = require('./_wks')('toStringTag'); @@ -6750,14 +6746,14 @@ module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; -},{"./_has":109,"./_object-dp":137,"./_wks":190}],163:[function(require,module,exports){ +},{"./_has":110,"./_object-dp":138,"./_wks":191}],164:[function(require,module,exports){ var shared = require('./_shared')('keys'); var uid = require('./_uid'); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; -},{"./_shared":164,"./_uid":185}],164:[function(require,module,exports){ +},{"./_shared":165,"./_uid":186}],165:[function(require,module,exports){ var core = require('./_core'); var global = require('./_global'); var SHARED = '__core-js_shared__'; @@ -6771,7 +6767,7 @@ var store = global[SHARED] || (global[SHARED] = {}); copyright: '© 2020 Denis Pushkarev (zloirock.ru)' }); -},{"./_core":90,"./_global":108,"./_library":127}],165:[function(require,module,exports){ +},{"./_core":91,"./_global":109,"./_library":128}],166:[function(require,module,exports){ // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = require('./_an-object'); var aFunction = require('./_a-function'); @@ -6782,7 +6778,7 @@ module.exports = function (O, D) { return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; -},{"./_a-function":71,"./_an-object":76,"./_wks":190}],166:[function(require,module,exports){ +},{"./_a-function":72,"./_an-object":77,"./_wks":191}],167:[function(require,module,exports){ 'use strict'; var fails = require('./_fails'); @@ -6793,7 +6789,7 @@ module.exports = function (method, arg) { }); }; -},{"./_fails":102}],167:[function(require,module,exports){ +},{"./_fails":103}],168:[function(require,module,exports){ var toInteger = require('./_to-integer'); var defined = require('./_defined'); // true -> String#at @@ -6812,7 +6808,7 @@ module.exports = function (TO_STRING) { }; }; -},{"./_defined":95,"./_to-integer":177}],168:[function(require,module,exports){ +},{"./_defined":96,"./_to-integer":178}],169:[function(require,module,exports){ // helper for String#{startsWith, endsWith, includes} var isRegExp = require('./_is-regexp'); var defined = require('./_defined'); @@ -6822,7 +6818,7 @@ module.exports = function (that, searchString, NAME) { return String(defined(that)); }; -},{"./_defined":95,"./_is-regexp":120}],169:[function(require,module,exports){ +},{"./_defined":96,"./_is-regexp":121}],170:[function(require,module,exports){ var $export = require('./_export'); var fails = require('./_fails'); var defined = require('./_defined'); @@ -6843,7 +6839,7 @@ module.exports = function (NAME, exec) { }), 'String', O); }; -},{"./_defined":95,"./_export":100,"./_fails":102}],170:[function(require,module,exports){ +},{"./_defined":96,"./_export":101,"./_fails":103}],171:[function(require,module,exports){ // https://github.com/tc39/proposal-string-pad-start-end var toLength = require('./_to-length'); var repeat = require('./_string-repeat'); @@ -6861,7 +6857,7 @@ module.exports = function (that, maxLength, fillString, left) { return left ? stringFiller + S : S + stringFiller; }; -},{"./_defined":95,"./_string-repeat":171,"./_to-length":179}],171:[function(require,module,exports){ +},{"./_defined":96,"./_string-repeat":172,"./_to-length":180}],172:[function(require,module,exports){ 'use strict'; var toInteger = require('./_to-integer'); var defined = require('./_defined'); @@ -6875,7 +6871,7 @@ module.exports = function repeat(count) { return res; }; -},{"./_defined":95,"./_to-integer":177}],172:[function(require,module,exports){ +},{"./_defined":96,"./_to-integer":178}],173:[function(require,module,exports){ var $export = require('./_export'); var defined = require('./_defined'); var fails = require('./_fails'); @@ -6907,11 +6903,11 @@ var trim = exporter.trim = function (string, TYPE) { module.exports = exporter; -},{"./_defined":95,"./_export":100,"./_fails":102,"./_string-ws":173}],173:[function(require,module,exports){ +},{"./_defined":96,"./_export":101,"./_fails":103,"./_string-ws":174}],174:[function(require,module,exports){ module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; -},{}],174:[function(require,module,exports){ +},{}],175:[function(require,module,exports){ var ctx = require('./_ctx'); var invoke = require('./_invoke'); var html = require('./_html'); @@ -6997,7 +6993,7 @@ module.exports = { clear: clearTask }; -},{"./_cof":86,"./_ctx":92,"./_dom-create":97,"./_global":108,"./_html":111,"./_invoke":114}],175:[function(require,module,exports){ +},{"./_cof":87,"./_ctx":93,"./_dom-create":98,"./_global":109,"./_html":112,"./_invoke":115}],176:[function(require,module,exports){ var toInteger = require('./_to-integer'); var max = Math.max; var min = Math.min; @@ -7006,7 +7002,7 @@ module.exports = function (index, length) { return index < 0 ? max(index + length, 0) : min(index, length); }; -},{"./_to-integer":177}],176:[function(require,module,exports){ +},{"./_to-integer":178}],177:[function(require,module,exports){ // https://tc39.github.io/ecma262/#sec-toindex var toInteger = require('./_to-integer'); var toLength = require('./_to-length'); @@ -7018,7 +7014,7 @@ module.exports = function (it) { return length; }; -},{"./_to-integer":177,"./_to-length":179}],177:[function(require,module,exports){ +},{"./_to-integer":178,"./_to-length":180}],178:[function(require,module,exports){ // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; @@ -7026,7 +7022,7 @@ module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; -},{}],178:[function(require,module,exports){ +},{}],179:[function(require,module,exports){ // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = require('./_iobject'); var defined = require('./_defined'); @@ -7034,7 +7030,7 @@ module.exports = function (it) { return IObject(defined(it)); }; -},{"./_defined":95,"./_iobject":115}],179:[function(require,module,exports){ +},{"./_defined":96,"./_iobject":116}],180:[function(require,module,exports){ // 7.1.15 ToLength var toInteger = require('./_to-integer'); var min = Math.min; @@ -7042,16 +7038,16 @@ module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; -},{"./_to-integer":177}],180:[function(require,module,exports){ +},{"./_to-integer":178}],181:[function(require,module,exports){ // 7.1.13 ToObject(argument) var defined = require('./_defined'); module.exports = function (it) { return Object(defined(it)); }; -},{"./_defined":95}],181:[function(require,module,exports){ -arguments[4][69][0].apply(exports,arguments) -},{"./_is-object":119,"dup":69}],182:[function(require,module,exports){ +},{"./_defined":96}],182:[function(require,module,exports){ +arguments[4][70][0].apply(exports,arguments) +},{"./_is-object":120,"dup":70}],183:[function(require,module,exports){ 'use strict'; if (require('./_descriptors')) { var LIBRARY = require('./_library'); @@ -7533,7 +7529,7 @@ if (require('./_descriptors')) { }; } else module.exports = function () { /* empty */ }; -},{"./_an-instance":75,"./_array-copy-within":77,"./_array-fill":78,"./_array-includes":79,"./_array-methods":80,"./_classof":85,"./_ctx":92,"./_descriptors":96,"./_export":100,"./_fails":102,"./_global":108,"./_has":109,"./_hide":110,"./_is-array-iter":116,"./_is-object":119,"./_iter-detect":124,"./_iterators":126,"./_library":127,"./_object-create":136,"./_object-dp":137,"./_object-gopd":139,"./_object-gopn":141,"./_object-gpo":143,"./_property-desc":154,"./_redefine-all":155,"./_set-species":161,"./_species-constructor":165,"./_to-absolute-index":175,"./_to-index":176,"./_to-integer":177,"./_to-length":179,"./_to-object":180,"./_to-primitive":181,"./_typed":184,"./_typed-buffer":183,"./_uid":185,"./_wks":190,"./core.get-iterator-method":191,"./es6.array.iterator":202}],183:[function(require,module,exports){ +},{"./_an-instance":76,"./_array-copy-within":78,"./_array-fill":79,"./_array-includes":80,"./_array-methods":81,"./_classof":86,"./_ctx":93,"./_descriptors":97,"./_export":101,"./_fails":103,"./_global":109,"./_has":110,"./_hide":111,"./_is-array-iter":117,"./_is-object":120,"./_iter-detect":125,"./_iterators":127,"./_library":128,"./_object-create":137,"./_object-dp":138,"./_object-gopd":140,"./_object-gopn":142,"./_object-gpo":144,"./_property-desc":155,"./_redefine-all":156,"./_set-species":162,"./_species-constructor":166,"./_to-absolute-index":176,"./_to-index":177,"./_to-integer":178,"./_to-length":180,"./_to-object":181,"./_to-primitive":182,"./_typed":185,"./_typed-buffer":184,"./_uid":186,"./_wks":191,"./core.get-iterator-method":192,"./es6.array.iterator":203}],184:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var DESCRIPTORS = require('./_descriptors'); @@ -7811,7 +7807,7 @@ hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView; -},{"./_an-instance":75,"./_array-fill":78,"./_descriptors":96,"./_fails":102,"./_global":108,"./_hide":110,"./_library":127,"./_object-dp":137,"./_object-gopn":141,"./_redefine-all":155,"./_set-to-string-tag":162,"./_to-index":176,"./_to-integer":177,"./_to-length":179,"./_typed":184}],184:[function(require,module,exports){ +},{"./_an-instance":76,"./_array-fill":79,"./_descriptors":97,"./_fails":103,"./_global":109,"./_hide":111,"./_library":128,"./_object-dp":138,"./_object-gopn":142,"./_redefine-all":156,"./_set-to-string-tag":163,"./_to-index":177,"./_to-integer":178,"./_to-length":180,"./_typed":185}],185:[function(require,module,exports){ var global = require('./_global'); var hide = require('./_hide'); var uid = require('./_uid'); @@ -7841,27 +7837,27 @@ module.exports = { VIEW: VIEW }; -},{"./_global":108,"./_hide":110,"./_uid":185}],185:[function(require,module,exports){ +},{"./_global":109,"./_hide":111,"./_uid":186}],186:[function(require,module,exports){ var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; -},{}],186:[function(require,module,exports){ +},{}],187:[function(require,module,exports){ var global = require('./_global'); var navigator = global.navigator; module.exports = navigator && navigator.userAgent || ''; -},{"./_global":108}],187:[function(require,module,exports){ +},{"./_global":109}],188:[function(require,module,exports){ var isObject = require('./_is-object'); module.exports = function (it, TYPE) { if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); return it; }; -},{"./_is-object":119}],188:[function(require,module,exports){ +},{"./_is-object":120}],189:[function(require,module,exports){ var global = require('./_global'); var core = require('./_core'); var LIBRARY = require('./_library'); @@ -7872,10 +7868,10 @@ module.exports = function (name) { if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; -},{"./_core":90,"./_global":108,"./_library":127,"./_object-dp":137,"./_wks-ext":189}],189:[function(require,module,exports){ +},{"./_core":91,"./_global":109,"./_library":128,"./_object-dp":138,"./_wks-ext":190}],190:[function(require,module,exports){ exports.f = require('./_wks'); -},{"./_wks":190}],190:[function(require,module,exports){ +},{"./_wks":191}],191:[function(require,module,exports){ var store = require('./_shared')('wks'); var uid = require('./_uid'); var Symbol = require('./_global').Symbol; @@ -7888,7 +7884,7 @@ var $exports = module.exports = function (name) { $exports.store = store; -},{"./_global":108,"./_shared":164,"./_uid":185}],191:[function(require,module,exports){ +},{"./_global":109,"./_shared":165,"./_uid":186}],192:[function(require,module,exports){ var classof = require('./_classof'); var ITERATOR = require('./_wks')('iterator'); var Iterators = require('./_iterators'); @@ -7898,7 +7894,7 @@ module.exports = require('./_core').getIteratorMethod = function (it) { || Iterators[classof(it)]; }; -},{"./_classof":85,"./_core":90,"./_iterators":126,"./_wks":190}],192:[function(require,module,exports){ +},{"./_classof":86,"./_core":91,"./_iterators":127,"./_wks":191}],193:[function(require,module,exports){ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var $export = require('./_export'); @@ -7906,7 +7902,7 @@ $export($export.P, 'Array', { copyWithin: require('./_array-copy-within') }); require('./_add-to-unscopables')('copyWithin'); -},{"./_add-to-unscopables":73,"./_array-copy-within":77,"./_export":100}],193:[function(require,module,exports){ +},{"./_add-to-unscopables":74,"./_array-copy-within":78,"./_export":101}],194:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $every = require('./_array-methods')(4); @@ -7918,7 +7914,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].every, true), 'A } }); -},{"./_array-methods":80,"./_export":100,"./_strict-method":166}],194:[function(require,module,exports){ +},{"./_array-methods":81,"./_export":101,"./_strict-method":167}],195:[function(require,module,exports){ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var $export = require('./_export'); @@ -7926,7 +7922,7 @@ $export($export.P, 'Array', { fill: require('./_array-fill') }); require('./_add-to-unscopables')('fill'); -},{"./_add-to-unscopables":73,"./_array-fill":78,"./_export":100}],195:[function(require,module,exports){ +},{"./_add-to-unscopables":74,"./_array-fill":79,"./_export":101}],196:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $filter = require('./_array-methods')(2); @@ -7938,7 +7934,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].filter, true), ' } }); -},{"./_array-methods":80,"./_export":100,"./_strict-method":166}],196:[function(require,module,exports){ +},{"./_array-methods":81,"./_export":101,"./_strict-method":167}],197:[function(require,module,exports){ 'use strict'; // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) var $export = require('./_export'); @@ -7954,7 +7950,7 @@ $export($export.P + $export.F * forced, 'Array', { }); require('./_add-to-unscopables')(KEY); -},{"./_add-to-unscopables":73,"./_array-methods":80,"./_export":100}],197:[function(require,module,exports){ +},{"./_add-to-unscopables":74,"./_array-methods":81,"./_export":101}],198:[function(require,module,exports){ 'use strict'; // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) var $export = require('./_export'); @@ -7970,7 +7966,7 @@ $export($export.P + $export.F * forced, 'Array', { }); require('./_add-to-unscopables')(KEY); -},{"./_add-to-unscopables":73,"./_array-methods":80,"./_export":100}],198:[function(require,module,exports){ +},{"./_add-to-unscopables":74,"./_array-methods":81,"./_export":101}],199:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $forEach = require('./_array-methods')(0); @@ -7983,7 +7979,7 @@ $export($export.P + $export.F * !STRICT, 'Array', { } }); -},{"./_array-methods":80,"./_export":100,"./_strict-method":166}],199:[function(require,module,exports){ +},{"./_array-methods":81,"./_export":101,"./_strict-method":167}],200:[function(require,module,exports){ 'use strict'; var ctx = require('./_ctx'); var $export = require('./_export'); @@ -8022,7 +8018,7 @@ $export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Arr } }); -},{"./_create-property":91,"./_ctx":92,"./_export":100,"./_is-array-iter":116,"./_iter-call":121,"./_iter-detect":124,"./_to-length":179,"./_to-object":180,"./core.get-iterator-method":191}],200:[function(require,module,exports){ +},{"./_create-property":92,"./_ctx":93,"./_export":101,"./_is-array-iter":117,"./_iter-call":122,"./_iter-detect":125,"./_to-length":180,"./_to-object":181,"./core.get-iterator-method":192}],201:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $indexOf = require('./_array-includes')(false); @@ -8039,13 +8035,13 @@ $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($ } }); -},{"./_array-includes":79,"./_export":100,"./_strict-method":166}],201:[function(require,module,exports){ +},{"./_array-includes":80,"./_export":101,"./_strict-method":167}],202:[function(require,module,exports){ // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) var $export = require('./_export'); $export($export.S, 'Array', { isArray: require('./_is-array') }); -},{"./_export":100,"./_is-array":117}],202:[function(require,module,exports){ +},{"./_export":101,"./_is-array":118}],203:[function(require,module,exports){ 'use strict'; var addToUnscopables = require('./_add-to-unscopables'); var step = require('./_iter-step'); @@ -8081,7 +8077,7 @@ addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); -},{"./_add-to-unscopables":73,"./_iter-define":123,"./_iter-step":125,"./_iterators":126,"./_to-iobject":178}],203:[function(require,module,exports){ +},{"./_add-to-unscopables":74,"./_iter-define":124,"./_iter-step":126,"./_iterators":127,"./_to-iobject":179}],204:[function(require,module,exports){ 'use strict'; // 22.1.3.13 Array.prototype.join(separator) var $export = require('./_export'); @@ -8095,7 +8091,7 @@ $export($export.P + $export.F * (require('./_iobject') != Object || !require('./ } }); -},{"./_export":100,"./_iobject":115,"./_strict-method":166,"./_to-iobject":178}],204:[function(require,module,exports){ +},{"./_export":101,"./_iobject":116,"./_strict-method":167,"./_to-iobject":179}],205:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var toIObject = require('./_to-iobject'); @@ -8119,7 +8115,7 @@ $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($ } }); -},{"./_export":100,"./_strict-method":166,"./_to-integer":177,"./_to-iobject":178,"./_to-length":179}],205:[function(require,module,exports){ +},{"./_export":101,"./_strict-method":167,"./_to-integer":178,"./_to-iobject":179,"./_to-length":180}],206:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $map = require('./_array-methods')(1); @@ -8131,7 +8127,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Arr } }); -},{"./_array-methods":80,"./_export":100,"./_strict-method":166}],206:[function(require,module,exports){ +},{"./_array-methods":81,"./_export":101,"./_strict-method":167}],207:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var createProperty = require('./_create-property'); @@ -8152,7 +8148,7 @@ $export($export.S + $export.F * require('./_fails')(function () { } }); -},{"./_create-property":91,"./_export":100,"./_fails":102}],207:[function(require,module,exports){ +},{"./_create-property":92,"./_export":101,"./_fails":103}],208:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $reduce = require('./_array-reduce'); @@ -8164,7 +8160,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].reduceRight, tru } }); -},{"./_array-reduce":81,"./_export":100,"./_strict-method":166}],208:[function(require,module,exports){ +},{"./_array-reduce":82,"./_export":101,"./_strict-method":167}],209:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $reduce = require('./_array-reduce'); @@ -8176,7 +8172,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].reduce, true), ' } }); -},{"./_array-reduce":81,"./_export":100,"./_strict-method":166}],209:[function(require,module,exports){ +},{"./_array-reduce":82,"./_export":101,"./_strict-method":167}],210:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var html = require('./_html'); @@ -8206,7 +8202,7 @@ $export($export.P + $export.F * require('./_fails')(function () { } }); -},{"./_cof":86,"./_export":100,"./_fails":102,"./_html":111,"./_to-absolute-index":175,"./_to-length":179}],210:[function(require,module,exports){ +},{"./_cof":87,"./_export":101,"./_fails":103,"./_html":112,"./_to-absolute-index":176,"./_to-length":180}],211:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $some = require('./_array-methods')(3); @@ -8218,7 +8214,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Ar } }); -},{"./_array-methods":80,"./_export":100,"./_strict-method":166}],211:[function(require,module,exports){ +},{"./_array-methods":81,"./_export":101,"./_strict-method":167}],212:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var aFunction = require('./_a-function'); @@ -8243,16 +8239,16 @@ $export($export.P + $export.F * (fails(function () { } }); -},{"./_a-function":71,"./_export":100,"./_fails":102,"./_strict-method":166,"./_to-object":180}],212:[function(require,module,exports){ +},{"./_a-function":72,"./_export":101,"./_fails":103,"./_strict-method":167,"./_to-object":181}],213:[function(require,module,exports){ require('./_set-species')('Array'); -},{"./_set-species":161}],213:[function(require,module,exports){ +},{"./_set-species":162}],214:[function(require,module,exports){ // 20.3.3.1 / 15.9.4.4 Date.now() var $export = require('./_export'); $export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); -},{"./_export":100}],214:[function(require,module,exports){ +},{"./_export":101}],215:[function(require,module,exports){ // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var $export = require('./_export'); var toISOString = require('./_date-to-iso-string'); @@ -8262,7 +8258,7 @@ $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'D toISOString: toISOString }); -},{"./_date-to-iso-string":93,"./_export":100}],215:[function(require,module,exports){ +},{"./_date-to-iso-string":94,"./_export":101}],216:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var toObject = require('./_to-object'); @@ -8280,13 +8276,13 @@ $export($export.P + $export.F * require('./_fails')(function () { } }); -},{"./_export":100,"./_fails":102,"./_to-object":180,"./_to-primitive":181}],216:[function(require,module,exports){ +},{"./_export":101,"./_fails":103,"./_to-object":181,"./_to-primitive":182}],217:[function(require,module,exports){ var TO_PRIMITIVE = require('./_wks')('toPrimitive'); var proto = Date.prototype; if (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); -},{"./_date-to-primitive":94,"./_hide":110,"./_wks":190}],217:[function(require,module,exports){ +},{"./_date-to-primitive":95,"./_hide":111,"./_wks":191}],218:[function(require,module,exports){ var DateProto = Date.prototype; var INVALID_DATE = 'Invalid Date'; var TO_STRING = 'toString'; @@ -8300,13 +8296,13 @@ if (new Date(NaN) + '' != INVALID_DATE) { }); } -},{"./_redefine":156}],218:[function(require,module,exports){ +},{"./_redefine":157}],219:[function(require,module,exports){ // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) var $export = require('./_export'); $export($export.P, 'Function', { bind: require('./_bind') }); -},{"./_bind":84,"./_export":100}],219:[function(require,module,exports){ +},{"./_bind":85,"./_export":101}],220:[function(require,module,exports){ 'use strict'; var isObject = require('./_is-object'); var getPrototypeOf = require('./_object-gpo'); @@ -8321,7 +8317,7 @@ if (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').f(FunctionProto, H return false; } }); -},{"./_is-object":119,"./_object-dp":137,"./_object-gpo":143,"./_wks":190}],220:[function(require,module,exports){ +},{"./_is-object":120,"./_object-dp":138,"./_object-gpo":144,"./_wks":191}],221:[function(require,module,exports){ var dP = require('./_object-dp').f; var FProto = Function.prototype; var nameRE = /^\s*function ([^ (]*)/; @@ -8339,7 +8335,7 @@ NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { } }); -},{"./_descriptors":96,"./_object-dp":137}],221:[function(require,module,exports){ +},{"./_descriptors":97,"./_object-dp":138}],222:[function(require,module,exports){ 'use strict'; var strong = require('./_collection-strong'); var validate = require('./_validate-collection'); @@ -8360,7 +8356,7 @@ module.exports = require('./_collection')(MAP, function (get) { } }, strong, true); -},{"./_collection":89,"./_collection-strong":87,"./_validate-collection":187}],222:[function(require,module,exports){ +},{"./_collection":90,"./_collection-strong":88,"./_validate-collection":188}],223:[function(require,module,exports){ // 20.2.2.3 Math.acosh(x) var $export = require('./_export'); var log1p = require('./_math-log1p'); @@ -8380,7 +8376,7 @@ $export($export.S + $export.F * !($acosh } }); -},{"./_export":100,"./_math-log1p":130}],223:[function(require,module,exports){ +},{"./_export":101,"./_math-log1p":131}],224:[function(require,module,exports){ // 20.2.2.5 Math.asinh(x) var $export = require('./_export'); var $asinh = Math.asinh; @@ -8392,7 +8388,7 @@ function asinh(x) { // Tor Browser bug: Math.asinh(0) -> -0 $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); -},{"./_export":100}],224:[function(require,module,exports){ +},{"./_export":101}],225:[function(require,module,exports){ // 20.2.2.7 Math.atanh(x) var $export = require('./_export'); var $atanh = Math.atanh; @@ -8404,7 +8400,7 @@ $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { } }); -},{"./_export":100}],225:[function(require,module,exports){ +},{"./_export":101}],226:[function(require,module,exports){ // 20.2.2.9 Math.cbrt(x) var $export = require('./_export'); var sign = require('./_math-sign'); @@ -8415,7 +8411,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":100,"./_math-sign":131}],226:[function(require,module,exports){ +},{"./_export":101,"./_math-sign":132}],227:[function(require,module,exports){ // 20.2.2.11 Math.clz32(x) var $export = require('./_export'); @@ -8425,7 +8421,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":100}],227:[function(require,module,exports){ +},{"./_export":101}],228:[function(require,module,exports){ // 20.2.2.12 Math.cosh(x) var $export = require('./_export'); var exp = Math.exp; @@ -8436,20 +8432,20 @@ $export($export.S, 'Math', { } }); -},{"./_export":100}],228:[function(require,module,exports){ +},{"./_export":101}],229:[function(require,module,exports){ // 20.2.2.14 Math.expm1(x) var $export = require('./_export'); var $expm1 = require('./_math-expm1'); $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); -},{"./_export":100,"./_math-expm1":128}],229:[function(require,module,exports){ +},{"./_export":101,"./_math-expm1":129}],230:[function(require,module,exports){ // 20.2.2.16 Math.fround(x) var $export = require('./_export'); $export($export.S, 'Math', { fround: require('./_math-fround') }); -},{"./_export":100,"./_math-fround":129}],230:[function(require,module,exports){ +},{"./_export":101,"./_math-fround":130}],231:[function(require,module,exports){ // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) var $export = require('./_export'); var abs = Math.abs; @@ -8476,7 +8472,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":100}],231:[function(require,module,exports){ +},{"./_export":101}],232:[function(require,module,exports){ // 20.2.2.18 Math.imul(x, y) var $export = require('./_export'); var $imul = Math.imul; @@ -8495,7 +8491,7 @@ $export($export.S + $export.F * require('./_fails')(function () { } }); -},{"./_export":100,"./_fails":102}],232:[function(require,module,exports){ +},{"./_export":101,"./_fails":103}],233:[function(require,module,exports){ // 20.2.2.21 Math.log10(x) var $export = require('./_export'); @@ -8505,13 +8501,13 @@ $export($export.S, 'Math', { } }); -},{"./_export":100}],233:[function(require,module,exports){ +},{"./_export":101}],234:[function(require,module,exports){ // 20.2.2.20 Math.log1p(x) var $export = require('./_export'); $export($export.S, 'Math', { log1p: require('./_math-log1p') }); -},{"./_export":100,"./_math-log1p":130}],234:[function(require,module,exports){ +},{"./_export":101,"./_math-log1p":131}],235:[function(require,module,exports){ // 20.2.2.22 Math.log2(x) var $export = require('./_export'); @@ -8521,13 +8517,13 @@ $export($export.S, 'Math', { } }); -},{"./_export":100}],235:[function(require,module,exports){ +},{"./_export":101}],236:[function(require,module,exports){ // 20.2.2.28 Math.sign(x) var $export = require('./_export'); $export($export.S, 'Math', { sign: require('./_math-sign') }); -},{"./_export":100,"./_math-sign":131}],236:[function(require,module,exports){ +},{"./_export":101,"./_math-sign":132}],237:[function(require,module,exports){ // 20.2.2.30 Math.sinh(x) var $export = require('./_export'); var expm1 = require('./_math-expm1'); @@ -8544,7 +8540,7 @@ $export($export.S + $export.F * require('./_fails')(function () { } }); -},{"./_export":100,"./_fails":102,"./_math-expm1":128}],237:[function(require,module,exports){ +},{"./_export":101,"./_fails":103,"./_math-expm1":129}],238:[function(require,module,exports){ // 20.2.2.33 Math.tanh(x) var $export = require('./_export'); var expm1 = require('./_math-expm1'); @@ -8558,7 +8554,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":100,"./_math-expm1":128}],238:[function(require,module,exports){ +},{"./_export":101,"./_math-expm1":129}],239:[function(require,module,exports){ // 20.2.2.34 Math.trunc(x) var $export = require('./_export'); @@ -8568,7 +8564,7 @@ $export($export.S, 'Math', { } }); -},{"./_export":100}],239:[function(require,module,exports){ +},{"./_export":101}],240:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var has = require('./_has'); @@ -8639,13 +8635,13 @@ if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { require('./_redefine')(global, NUMBER, $Number); } -},{"./_cof":86,"./_descriptors":96,"./_fails":102,"./_global":108,"./_has":109,"./_inherit-if-required":113,"./_object-create":136,"./_object-dp":137,"./_object-gopd":139,"./_object-gopn":141,"./_redefine":156,"./_string-trim":172,"./_to-primitive":181}],240:[function(require,module,exports){ +},{"./_cof":87,"./_descriptors":97,"./_fails":103,"./_global":109,"./_has":110,"./_inherit-if-required":114,"./_object-create":137,"./_object-dp":138,"./_object-gopd":140,"./_object-gopn":142,"./_redefine":157,"./_string-trim":173,"./_to-primitive":182}],241:[function(require,module,exports){ // 20.1.2.1 Number.EPSILON var $export = require('./_export'); $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); -},{"./_export":100}],241:[function(require,module,exports){ +},{"./_export":101}],242:[function(require,module,exports){ // 20.1.2.2 Number.isFinite(number) var $export = require('./_export'); var _isFinite = require('./_global').isFinite; @@ -8656,13 +8652,13 @@ $export($export.S, 'Number', { } }); -},{"./_export":100,"./_global":108}],242:[function(require,module,exports){ +},{"./_export":101,"./_global":109}],243:[function(require,module,exports){ // 20.1.2.3 Number.isInteger(number) var $export = require('./_export'); $export($export.S, 'Number', { isInteger: require('./_is-integer') }); -},{"./_export":100,"./_is-integer":118}],243:[function(require,module,exports){ +},{"./_export":101,"./_is-integer":119}],244:[function(require,module,exports){ // 20.1.2.4 Number.isNaN(number) var $export = require('./_export'); @@ -8673,7 +8669,7 @@ $export($export.S, 'Number', { } }); -},{"./_export":100}],244:[function(require,module,exports){ +},{"./_export":101}],245:[function(require,module,exports){ // 20.1.2.5 Number.isSafeInteger(number) var $export = require('./_export'); var isInteger = require('./_is-integer'); @@ -8685,31 +8681,31 @@ $export($export.S, 'Number', { } }); -},{"./_export":100,"./_is-integer":118}],245:[function(require,module,exports){ +},{"./_export":101,"./_is-integer":119}],246:[function(require,module,exports){ // 20.1.2.6 Number.MAX_SAFE_INTEGER var $export = require('./_export'); $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); -},{"./_export":100}],246:[function(require,module,exports){ +},{"./_export":101}],247:[function(require,module,exports){ // 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = require('./_export'); $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); -},{"./_export":100}],247:[function(require,module,exports){ +},{"./_export":101}],248:[function(require,module,exports){ var $export = require('./_export'); var $parseFloat = require('./_parse-float'); // 20.1.2.12 Number.parseFloat(string) $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); -},{"./_export":100,"./_parse-float":150}],248:[function(require,module,exports){ +},{"./_export":101,"./_parse-float":151}],249:[function(require,module,exports){ var $export = require('./_export'); var $parseInt = require('./_parse-int'); // 20.1.2.13 Number.parseInt(string, radix) $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); -},{"./_export":100,"./_parse-int":151}],249:[function(require,module,exports){ +},{"./_export":101,"./_parse-int":152}],250:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var toInteger = require('./_to-integer'); @@ -8825,7 +8821,7 @@ $export($export.P + $export.F * (!!$toFixed && ( } }); -},{"./_a-number-value":72,"./_export":100,"./_fails":102,"./_string-repeat":171,"./_to-integer":177}],250:[function(require,module,exports){ +},{"./_a-number-value":73,"./_export":101,"./_fails":103,"./_string-repeat":172,"./_to-integer":178}],251:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $fails = require('./_fails'); @@ -8845,28 +8841,28 @@ $export($export.P + $export.F * ($fails(function () { } }); -},{"./_a-number-value":72,"./_export":100,"./_fails":102}],251:[function(require,module,exports){ +},{"./_a-number-value":73,"./_export":101,"./_fails":103}],252:[function(require,module,exports){ // 19.1.3.1 Object.assign(target, source) var $export = require('./_export'); $export($export.S + $export.F, 'Object', { assign: require('./_object-assign') }); -},{"./_export":100,"./_object-assign":135}],252:[function(require,module,exports){ +},{"./_export":101,"./_object-assign":136}],253:[function(require,module,exports){ var $export = require('./_export'); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', { create: require('./_object-create') }); -},{"./_export":100,"./_object-create":136}],253:[function(require,module,exports){ +},{"./_export":101,"./_object-create":137}],254:[function(require,module,exports){ var $export = require('./_export'); // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) $export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') }); -},{"./_descriptors":96,"./_export":100,"./_object-dps":138}],254:[function(require,module,exports){ +},{"./_descriptors":97,"./_export":101,"./_object-dps":139}],255:[function(require,module,exports){ var $export = require('./_export'); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f }); -},{"./_descriptors":96,"./_export":100,"./_object-dp":137}],255:[function(require,module,exports){ +},{"./_descriptors":97,"./_export":101,"./_object-dp":138}],256:[function(require,module,exports){ // 19.1.2.5 Object.freeze(O) var isObject = require('./_is-object'); var meta = require('./_meta').onFreeze; @@ -8877,7 +8873,7 @@ require('./_object-sap')('freeze', function ($freeze) { }; }); -},{"./_is-object":119,"./_meta":132,"./_object-sap":147}],256:[function(require,module,exports){ +},{"./_is-object":120,"./_meta":133,"./_object-sap":148}],257:[function(require,module,exports){ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = require('./_to-iobject'); var $getOwnPropertyDescriptor = require('./_object-gopd').f; @@ -8888,13 +8884,13 @@ require('./_object-sap')('getOwnPropertyDescriptor', function () { }; }); -},{"./_object-gopd":139,"./_object-sap":147,"./_to-iobject":178}],257:[function(require,module,exports){ +},{"./_object-gopd":140,"./_object-sap":148,"./_to-iobject":179}],258:[function(require,module,exports){ // 19.1.2.7 Object.getOwnPropertyNames(O) require('./_object-sap')('getOwnPropertyNames', function () { return require('./_object-gopn-ext').f; }); -},{"./_object-gopn-ext":140,"./_object-sap":147}],258:[function(require,module,exports){ +},{"./_object-gopn-ext":141,"./_object-sap":148}],259:[function(require,module,exports){ // 19.1.2.9 Object.getPrototypeOf(O) var toObject = require('./_to-object'); var $getPrototypeOf = require('./_object-gpo'); @@ -8905,7 +8901,7 @@ require('./_object-sap')('getPrototypeOf', function () { }; }); -},{"./_object-gpo":143,"./_object-sap":147,"./_to-object":180}],259:[function(require,module,exports){ +},{"./_object-gpo":144,"./_object-sap":148,"./_to-object":181}],260:[function(require,module,exports){ // 19.1.2.11 Object.isExtensible(O) var isObject = require('./_is-object'); @@ -8915,7 +8911,7 @@ require('./_object-sap')('isExtensible', function ($isExtensible) { }; }); -},{"./_is-object":119,"./_object-sap":147}],260:[function(require,module,exports){ +},{"./_is-object":120,"./_object-sap":148}],261:[function(require,module,exports){ // 19.1.2.12 Object.isFrozen(O) var isObject = require('./_is-object'); @@ -8925,7 +8921,7 @@ require('./_object-sap')('isFrozen', function ($isFrozen) { }; }); -},{"./_is-object":119,"./_object-sap":147}],261:[function(require,module,exports){ +},{"./_is-object":120,"./_object-sap":148}],262:[function(require,module,exports){ // 19.1.2.13 Object.isSealed(O) var isObject = require('./_is-object'); @@ -8935,12 +8931,12 @@ require('./_object-sap')('isSealed', function ($isSealed) { }; }); -},{"./_is-object":119,"./_object-sap":147}],262:[function(require,module,exports){ +},{"./_is-object":120,"./_object-sap":148}],263:[function(require,module,exports){ // 19.1.3.10 Object.is(value1, value2) var $export = require('./_export'); $export($export.S, 'Object', { is: require('./_same-value') }); -},{"./_export":100,"./_same-value":159}],263:[function(require,module,exports){ +},{"./_export":101,"./_same-value":160}],264:[function(require,module,exports){ // 19.1.2.14 Object.keys(O) var toObject = require('./_to-object'); var $keys = require('./_object-keys'); @@ -8951,7 +8947,7 @@ require('./_object-sap')('keys', function () { }; }); -},{"./_object-keys":145,"./_object-sap":147,"./_to-object":180}],264:[function(require,module,exports){ +},{"./_object-keys":146,"./_object-sap":148,"./_to-object":181}],265:[function(require,module,exports){ // 19.1.2.15 Object.preventExtensions(O) var isObject = require('./_is-object'); var meta = require('./_meta').onFreeze; @@ -8962,7 +8958,7 @@ require('./_object-sap')('preventExtensions', function ($preventExtensions) { }; }); -},{"./_is-object":119,"./_meta":132,"./_object-sap":147}],265:[function(require,module,exports){ +},{"./_is-object":120,"./_meta":133,"./_object-sap":148}],266:[function(require,module,exports){ // 19.1.2.17 Object.seal(O) var isObject = require('./_is-object'); var meta = require('./_meta').onFreeze; @@ -8973,12 +8969,12 @@ require('./_object-sap')('seal', function ($seal) { }; }); -},{"./_is-object":119,"./_meta":132,"./_object-sap":147}],266:[function(require,module,exports){ +},{"./_is-object":120,"./_meta":133,"./_object-sap":148}],267:[function(require,module,exports){ // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = require('./_export'); $export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set }); -},{"./_export":100,"./_set-proto":160}],267:[function(require,module,exports){ +},{"./_export":101,"./_set-proto":161}],268:[function(require,module,exports){ 'use strict'; // 19.1.3.6 Object.prototype.toString() var classof = require('./_classof'); @@ -8990,19 +8986,19 @@ if (test + '' != '[object z]') { }, true); } -},{"./_classof":85,"./_redefine":156,"./_wks":190}],268:[function(require,module,exports){ +},{"./_classof":86,"./_redefine":157,"./_wks":191}],269:[function(require,module,exports){ var $export = require('./_export'); var $parseFloat = require('./_parse-float'); // 18.2.4 parseFloat(string) $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); -},{"./_export":100,"./_parse-float":150}],269:[function(require,module,exports){ +},{"./_export":101,"./_parse-float":151}],270:[function(require,module,exports){ var $export = require('./_export'); var $parseInt = require('./_parse-int'); // 18.2.5 parseInt(string, radix) $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); -},{"./_export":100,"./_parse-int":151}],270:[function(require,module,exports){ +},{"./_export":101,"./_parse-int":152}],271:[function(require,module,exports){ 'use strict'; var LIBRARY = require('./_library'); var global = require('./_global'); @@ -9290,7 +9286,7 @@ $export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(functi } }); -},{"./_a-function":71,"./_an-instance":75,"./_classof":85,"./_core":90,"./_ctx":92,"./_export":100,"./_for-of":106,"./_global":108,"./_is-object":119,"./_iter-detect":124,"./_library":127,"./_microtask":133,"./_new-promise-capability":134,"./_perform":152,"./_promise-resolve":153,"./_redefine-all":155,"./_set-species":161,"./_set-to-string-tag":162,"./_species-constructor":165,"./_task":174,"./_user-agent":186,"./_wks":190}],271:[function(require,module,exports){ +},{"./_a-function":72,"./_an-instance":76,"./_classof":86,"./_core":91,"./_ctx":93,"./_export":101,"./_for-of":107,"./_global":109,"./_is-object":120,"./_iter-detect":125,"./_library":128,"./_microtask":134,"./_new-promise-capability":135,"./_perform":153,"./_promise-resolve":154,"./_redefine-all":156,"./_set-species":162,"./_set-to-string-tag":163,"./_species-constructor":166,"./_task":175,"./_user-agent":187,"./_wks":191}],272:[function(require,module,exports){ // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) var $export = require('./_export'); var aFunction = require('./_a-function'); @@ -9308,7 +9304,7 @@ $export($export.S + $export.F * !require('./_fails')(function () { } }); -},{"./_a-function":71,"./_an-object":76,"./_export":100,"./_fails":102,"./_global":108}],272:[function(require,module,exports){ +},{"./_a-function":72,"./_an-object":77,"./_export":101,"./_fails":103,"./_global":109}],273:[function(require,module,exports){ // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) var $export = require('./_export'); var create = require('./_object-create'); @@ -9357,7 +9353,7 @@ $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { } }); -},{"./_a-function":71,"./_an-object":76,"./_bind":84,"./_export":100,"./_fails":102,"./_global":108,"./_is-object":119,"./_object-create":136}],273:[function(require,module,exports){ +},{"./_a-function":72,"./_an-object":77,"./_bind":85,"./_export":101,"./_fails":103,"./_global":109,"./_is-object":120,"./_object-create":137}],274:[function(require,module,exports){ // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) var dP = require('./_object-dp'); var $export = require('./_export'); @@ -9382,7 +9378,7 @@ $export($export.S + $export.F * require('./_fails')(function () { } }); -},{"./_an-object":76,"./_export":100,"./_fails":102,"./_object-dp":137,"./_to-primitive":181}],274:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101,"./_fails":103,"./_object-dp":138,"./_to-primitive":182}],275:[function(require,module,exports){ // 26.1.4 Reflect.deleteProperty(target, propertyKey) var $export = require('./_export'); var gOPD = require('./_object-gopd').f; @@ -9395,7 +9391,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":76,"./_export":100,"./_object-gopd":139}],275:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101,"./_object-gopd":140}],276:[function(require,module,exports){ 'use strict'; // 26.1.5 Reflect.enumerate(target) var $export = require('./_export'); @@ -9423,7 +9419,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":76,"./_export":100,"./_iter-create":122}],276:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101,"./_iter-create":123}],277:[function(require,module,exports){ // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) var gOPD = require('./_object-gopd'); var $export = require('./_export'); @@ -9435,7 +9431,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":76,"./_export":100,"./_object-gopd":139}],277:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101,"./_object-gopd":140}],278:[function(require,module,exports){ // 26.1.8 Reflect.getPrototypeOf(target) var $export = require('./_export'); var getProto = require('./_object-gpo'); @@ -9447,7 +9443,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":76,"./_export":100,"./_object-gpo":143}],278:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101,"./_object-gpo":144}],279:[function(require,module,exports){ // 26.1.6 Reflect.get(target, propertyKey [, receiver]) var gOPD = require('./_object-gopd'); var getPrototypeOf = require('./_object-gpo'); @@ -9470,7 +9466,7 @@ function get(target, propertyKey /* , receiver */) { $export($export.S, 'Reflect', { get: get }); -},{"./_an-object":76,"./_export":100,"./_has":109,"./_is-object":119,"./_object-gopd":139,"./_object-gpo":143}],279:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101,"./_has":110,"./_is-object":120,"./_object-gopd":140,"./_object-gpo":144}],280:[function(require,module,exports){ // 26.1.9 Reflect.has(target, propertyKey) var $export = require('./_export'); @@ -9480,7 +9476,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_export":100}],280:[function(require,module,exports){ +},{"./_export":101}],281:[function(require,module,exports){ // 26.1.10 Reflect.isExtensible(target) var $export = require('./_export'); var anObject = require('./_an-object'); @@ -9493,13 +9489,13 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":76,"./_export":100}],281:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101}],282:[function(require,module,exports){ // 26.1.11 Reflect.ownKeys(target) var $export = require('./_export'); $export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); -},{"./_export":100,"./_own-keys":149}],282:[function(require,module,exports){ +},{"./_export":101,"./_own-keys":150}],283:[function(require,module,exports){ // 26.1.12 Reflect.preventExtensions(target) var $export = require('./_export'); var anObject = require('./_an-object'); @@ -9517,7 +9513,7 @@ $export($export.S, 'Reflect', { } }); -},{"./_an-object":76,"./_export":100}],283:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101}],284:[function(require,module,exports){ // 26.1.14 Reflect.setPrototypeOf(target, proto) var $export = require('./_export'); var setProto = require('./_set-proto'); @@ -9534,7 +9530,7 @@ if (setProto) $export($export.S, 'Reflect', { } }); -},{"./_export":100,"./_set-proto":160}],284:[function(require,module,exports){ +},{"./_export":101,"./_set-proto":161}],285:[function(require,module,exports){ // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) var dP = require('./_object-dp'); var gOPD = require('./_object-gopd'); @@ -9569,7 +9565,7 @@ function set(target, propertyKey, V /* , receiver */) { $export($export.S, 'Reflect', { set: set }); -},{"./_an-object":76,"./_export":100,"./_has":109,"./_is-object":119,"./_object-dp":137,"./_object-gopd":139,"./_object-gpo":143,"./_property-desc":154}],285:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101,"./_has":110,"./_is-object":120,"./_object-dp":138,"./_object-gopd":140,"./_object-gpo":144,"./_property-desc":155}],286:[function(require,module,exports){ var global = require('./_global'); var inheritIfRequired = require('./_inherit-if-required'); var dP = require('./_object-dp').f; @@ -9614,7 +9610,7 @@ if (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function ( require('./_set-species')('RegExp'); -},{"./_descriptors":96,"./_fails":102,"./_flags":104,"./_global":108,"./_inherit-if-required":113,"./_is-regexp":120,"./_object-dp":137,"./_object-gopn":141,"./_redefine":156,"./_set-species":161,"./_wks":190}],286:[function(require,module,exports){ +},{"./_descriptors":97,"./_fails":103,"./_flags":105,"./_global":109,"./_inherit-if-required":114,"./_is-regexp":121,"./_object-dp":138,"./_object-gopn":142,"./_redefine":157,"./_set-species":162,"./_wks":191}],287:[function(require,module,exports){ 'use strict'; var regexpExec = require('./_regexp-exec'); require('./_export')({ @@ -9625,14 +9621,14 @@ require('./_export')({ exec: regexpExec }); -},{"./_export":100,"./_regexp-exec":158}],287:[function(require,module,exports){ +},{"./_export":101,"./_regexp-exec":159}],288:[function(require,module,exports){ // 21.2.5.3 get RegExp.prototype.flags() if (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', { configurable: true, get: require('./_flags') }); -},{"./_descriptors":96,"./_flags":104,"./_object-dp":137}],288:[function(require,module,exports){ +},{"./_descriptors":97,"./_flags":105,"./_object-dp":138}],289:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); @@ -9674,7 +9670,7 @@ require('./_fix-re-wks')('match', 1, function (defined, MATCH, $match, maybeCall ]; }); -},{"./_advance-string-index":74,"./_an-object":76,"./_fix-re-wks":103,"./_regexp-exec-abstract":157,"./_to-length":179}],289:[function(require,module,exports){ +},{"./_advance-string-index":75,"./_an-object":77,"./_fix-re-wks":104,"./_regexp-exec-abstract":158,"./_to-length":180}],290:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); @@ -9794,7 +9790,7 @@ require('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, may } }); -},{"./_advance-string-index":74,"./_an-object":76,"./_fix-re-wks":103,"./_regexp-exec-abstract":157,"./_to-integer":177,"./_to-length":179,"./_to-object":180}],290:[function(require,module,exports){ +},{"./_advance-string-index":75,"./_an-object":77,"./_fix-re-wks":104,"./_regexp-exec-abstract":158,"./_to-integer":178,"./_to-length":180,"./_to-object":181}],291:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); @@ -9827,7 +9823,7 @@ require('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search, maybeC ]; }); -},{"./_an-object":76,"./_fix-re-wks":103,"./_regexp-exec-abstract":157,"./_same-value":159}],291:[function(require,module,exports){ +},{"./_an-object":77,"./_fix-re-wks":104,"./_regexp-exec-abstract":158,"./_same-value":160}],292:[function(require,module,exports){ 'use strict'; var isRegExp = require('./_is-regexp'); @@ -9963,7 +9959,7 @@ require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCall ]; }); -},{"./_advance-string-index":74,"./_an-object":76,"./_fails":102,"./_fix-re-wks":103,"./_is-regexp":120,"./_regexp-exec":158,"./_regexp-exec-abstract":157,"./_species-constructor":165,"./_to-length":179}],292:[function(require,module,exports){ +},{"./_advance-string-index":75,"./_an-object":77,"./_fails":103,"./_fix-re-wks":104,"./_is-regexp":121,"./_regexp-exec":159,"./_regexp-exec-abstract":158,"./_species-constructor":166,"./_to-length":180}],293:[function(require,module,exports){ 'use strict'; require('./es6.regexp.flags'); var anObject = require('./_an-object'); @@ -9990,7 +9986,7 @@ if (require('./_fails')(function () { return $toString.call({ source: 'a', flags }); } -},{"./_an-object":76,"./_descriptors":96,"./_fails":102,"./_flags":104,"./_redefine":156,"./es6.regexp.flags":287}],293:[function(require,module,exports){ +},{"./_an-object":77,"./_descriptors":97,"./_fails":103,"./_flags":105,"./_redefine":157,"./es6.regexp.flags":288}],294:[function(require,module,exports){ 'use strict'; var strong = require('./_collection-strong'); var validate = require('./_validate-collection'); @@ -10006,7 +10002,7 @@ module.exports = require('./_collection')(SET, function (get) { } }, strong); -},{"./_collection":89,"./_collection-strong":87,"./_validate-collection":187}],294:[function(require,module,exports){ +},{"./_collection":90,"./_collection-strong":88,"./_validate-collection":188}],295:[function(require,module,exports){ 'use strict'; // B.2.3.2 String.prototype.anchor(name) require('./_string-html')('anchor', function (createHTML) { @@ -10015,7 +10011,7 @@ require('./_string-html')('anchor', function (createHTML) { }; }); -},{"./_string-html":169}],295:[function(require,module,exports){ +},{"./_string-html":170}],296:[function(require,module,exports){ 'use strict'; // B.2.3.3 String.prototype.big() require('./_string-html')('big', function (createHTML) { @@ -10024,7 +10020,7 @@ require('./_string-html')('big', function (createHTML) { }; }); -},{"./_string-html":169}],296:[function(require,module,exports){ +},{"./_string-html":170}],297:[function(require,module,exports){ 'use strict'; // B.2.3.4 String.prototype.blink() require('./_string-html')('blink', function (createHTML) { @@ -10033,7 +10029,7 @@ require('./_string-html')('blink', function (createHTML) { }; }); -},{"./_string-html":169}],297:[function(require,module,exports){ +},{"./_string-html":170}],298:[function(require,module,exports){ 'use strict'; // B.2.3.5 String.prototype.bold() require('./_string-html')('bold', function (createHTML) { @@ -10042,7 +10038,7 @@ require('./_string-html')('bold', function (createHTML) { }; }); -},{"./_string-html":169}],298:[function(require,module,exports){ +},{"./_string-html":170}],299:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $at = require('./_string-at')(false); @@ -10053,7 +10049,7 @@ $export($export.P, 'String', { } }); -},{"./_export":100,"./_string-at":167}],299:[function(require,module,exports){ +},{"./_export":101,"./_string-at":168}],300:[function(require,module,exports){ // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) 'use strict'; var $export = require('./_export'); @@ -10075,7 +10071,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'Strin } }); -},{"./_export":100,"./_fails-is-regexp":101,"./_string-context":168,"./_to-length":179}],300:[function(require,module,exports){ +},{"./_export":101,"./_fails-is-regexp":102,"./_string-context":169,"./_to-length":180}],301:[function(require,module,exports){ 'use strict'; // B.2.3.6 String.prototype.fixed() require('./_string-html')('fixed', function (createHTML) { @@ -10084,7 +10080,7 @@ require('./_string-html')('fixed', function (createHTML) { }; }); -},{"./_string-html":169}],301:[function(require,module,exports){ +},{"./_string-html":170}],302:[function(require,module,exports){ 'use strict'; // B.2.3.7 String.prototype.fontcolor(color) require('./_string-html')('fontcolor', function (createHTML) { @@ -10093,7 +10089,7 @@ require('./_string-html')('fontcolor', function (createHTML) { }; }); -},{"./_string-html":169}],302:[function(require,module,exports){ +},{"./_string-html":170}],303:[function(require,module,exports){ 'use strict'; // B.2.3.8 String.prototype.fontsize(size) require('./_string-html')('fontsize', function (createHTML) { @@ -10102,7 +10098,7 @@ require('./_string-html')('fontsize', function (createHTML) { }; }); -},{"./_string-html":169}],303:[function(require,module,exports){ +},{"./_string-html":170}],304:[function(require,module,exports){ var $export = require('./_export'); var toAbsoluteIndex = require('./_to-absolute-index'); var fromCharCode = String.fromCharCode; @@ -10127,7 +10123,7 @@ $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1) } }); -},{"./_export":100,"./_to-absolute-index":175}],304:[function(require,module,exports){ +},{"./_export":101,"./_to-absolute-index":176}],305:[function(require,module,exports){ // 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = require('./_export'); @@ -10141,7 +10137,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String } }); -},{"./_export":100,"./_fails-is-regexp":101,"./_string-context":168}],305:[function(require,module,exports){ +},{"./_export":101,"./_fails-is-regexp":102,"./_string-context":169}],306:[function(require,module,exports){ 'use strict'; // B.2.3.9 String.prototype.italics() require('./_string-html')('italics', function (createHTML) { @@ -10150,7 +10146,7 @@ require('./_string-html')('italics', function (createHTML) { }; }); -},{"./_string-html":169}],306:[function(require,module,exports){ +},{"./_string-html":170}],307:[function(require,module,exports){ 'use strict'; var $at = require('./_string-at')(true); @@ -10169,7 +10165,7 @@ require('./_iter-define')(String, 'String', function (iterated) { return { value: point, done: false }; }); -},{"./_iter-define":123,"./_string-at":167}],307:[function(require,module,exports){ +},{"./_iter-define":124,"./_string-at":168}],308:[function(require,module,exports){ 'use strict'; // B.2.3.10 String.prototype.link(url) require('./_string-html')('link', function (createHTML) { @@ -10178,7 +10174,7 @@ require('./_string-html')('link', function (createHTML) { }; }); -},{"./_string-html":169}],308:[function(require,module,exports){ +},{"./_string-html":170}],309:[function(require,module,exports){ var $export = require('./_export'); var toIObject = require('./_to-iobject'); var toLength = require('./_to-length'); @@ -10198,7 +10194,7 @@ $export($export.S, 'String', { } }); -},{"./_export":100,"./_to-iobject":178,"./_to-length":179}],309:[function(require,module,exports){ +},{"./_export":101,"./_to-iobject":179,"./_to-length":180}],310:[function(require,module,exports){ var $export = require('./_export'); $export($export.P, 'String', { @@ -10206,7 +10202,7 @@ $export($export.P, 'String', { repeat: require('./_string-repeat') }); -},{"./_export":100,"./_string-repeat":171}],310:[function(require,module,exports){ +},{"./_export":101,"./_string-repeat":172}],311:[function(require,module,exports){ 'use strict'; // B.2.3.11 String.prototype.small() require('./_string-html')('small', function (createHTML) { @@ -10215,7 +10211,7 @@ require('./_string-html')('small', function (createHTML) { }; }); -},{"./_string-html":169}],311:[function(require,module,exports){ +},{"./_string-html":170}],312:[function(require,module,exports){ // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) 'use strict'; var $export = require('./_export'); @@ -10235,7 +10231,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'Str } }); -},{"./_export":100,"./_fails-is-regexp":101,"./_string-context":168,"./_to-length":179}],312:[function(require,module,exports){ +},{"./_export":101,"./_fails-is-regexp":102,"./_string-context":169,"./_to-length":180}],313:[function(require,module,exports){ 'use strict'; // B.2.3.12 String.prototype.strike() require('./_string-html')('strike', function (createHTML) { @@ -10244,7 +10240,7 @@ require('./_string-html')('strike', function (createHTML) { }; }); -},{"./_string-html":169}],313:[function(require,module,exports){ +},{"./_string-html":170}],314:[function(require,module,exports){ 'use strict'; // B.2.3.13 String.prototype.sub() require('./_string-html')('sub', function (createHTML) { @@ -10253,7 +10249,7 @@ require('./_string-html')('sub', function (createHTML) { }; }); -},{"./_string-html":169}],314:[function(require,module,exports){ +},{"./_string-html":170}],315:[function(require,module,exports){ 'use strict'; // B.2.3.14 String.prototype.sup() require('./_string-html')('sup', function (createHTML) { @@ -10262,7 +10258,7 @@ require('./_string-html')('sup', function (createHTML) { }; }); -},{"./_string-html":169}],315:[function(require,module,exports){ +},{"./_string-html":170}],316:[function(require,module,exports){ 'use strict'; // 21.1.3.25 String.prototype.trim() require('./_string-trim')('trim', function ($trim) { @@ -10271,7 +10267,7 @@ require('./_string-trim')('trim', function ($trim) { }; }); -},{"./_string-trim":172}],316:[function(require,module,exports){ +},{"./_string-trim":173}],317:[function(require,module,exports){ 'use strict'; // ECMAScript 6 symbols shim var global = require('./_global'); @@ -10519,7 +10515,7 @@ setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); -},{"./_an-object":76,"./_descriptors":96,"./_enum-keys":99,"./_export":100,"./_fails":102,"./_global":108,"./_has":109,"./_hide":110,"./_is-array":117,"./_is-object":119,"./_library":127,"./_meta":132,"./_object-create":136,"./_object-dp":137,"./_object-gopd":139,"./_object-gopn":141,"./_object-gopn-ext":140,"./_object-gops":142,"./_object-keys":145,"./_object-pie":146,"./_property-desc":154,"./_redefine":156,"./_set-to-string-tag":162,"./_shared":164,"./_to-iobject":178,"./_to-object":180,"./_to-primitive":181,"./_uid":185,"./_wks":190,"./_wks-define":188,"./_wks-ext":189}],317:[function(require,module,exports){ +},{"./_an-object":77,"./_descriptors":97,"./_enum-keys":100,"./_export":101,"./_fails":103,"./_global":109,"./_has":110,"./_hide":111,"./_is-array":118,"./_is-object":120,"./_library":128,"./_meta":133,"./_object-create":137,"./_object-dp":138,"./_object-gopd":140,"./_object-gopn":142,"./_object-gopn-ext":141,"./_object-gops":143,"./_object-keys":146,"./_object-pie":147,"./_property-desc":155,"./_redefine":157,"./_set-to-string-tag":163,"./_shared":165,"./_to-iobject":179,"./_to-object":181,"./_to-primitive":182,"./_uid":186,"./_wks":191,"./_wks-define":189,"./_wks-ext":190}],318:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $typed = require('./_typed'); @@ -10567,76 +10563,76 @@ $export($export.P + $export.U + $export.F * require('./_fails')(function () { require('./_set-species')(ARRAY_BUFFER); -},{"./_an-object":76,"./_export":100,"./_fails":102,"./_global":108,"./_is-object":119,"./_set-species":161,"./_species-constructor":165,"./_to-absolute-index":175,"./_to-length":179,"./_typed":184,"./_typed-buffer":183}],318:[function(require,module,exports){ +},{"./_an-object":77,"./_export":101,"./_fails":103,"./_global":109,"./_is-object":120,"./_set-species":162,"./_species-constructor":166,"./_to-absolute-index":176,"./_to-length":180,"./_typed":185,"./_typed-buffer":184}],319:[function(require,module,exports){ var $export = require('./_export'); $export($export.G + $export.W + $export.F * !require('./_typed').ABV, { DataView: require('./_typed-buffer').DataView }); -},{"./_export":100,"./_typed":184,"./_typed-buffer":183}],319:[function(require,module,exports){ +},{"./_export":101,"./_typed":185,"./_typed-buffer":184}],320:[function(require,module,exports){ require('./_typed-array')('Float32', 4, function (init) { return function Float32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":182}],320:[function(require,module,exports){ +},{"./_typed-array":183}],321:[function(require,module,exports){ require('./_typed-array')('Float64', 8, function (init) { return function Float64Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":182}],321:[function(require,module,exports){ +},{"./_typed-array":183}],322:[function(require,module,exports){ require('./_typed-array')('Int16', 2, function (init) { return function Int16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":182}],322:[function(require,module,exports){ +},{"./_typed-array":183}],323:[function(require,module,exports){ require('./_typed-array')('Int32', 4, function (init) { return function Int32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":182}],323:[function(require,module,exports){ +},{"./_typed-array":183}],324:[function(require,module,exports){ require('./_typed-array')('Int8', 1, function (init) { return function Int8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":182}],324:[function(require,module,exports){ +},{"./_typed-array":183}],325:[function(require,module,exports){ require('./_typed-array')('Uint16', 2, function (init) { return function Uint16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":182}],325:[function(require,module,exports){ +},{"./_typed-array":183}],326:[function(require,module,exports){ require('./_typed-array')('Uint32', 4, function (init) { return function Uint32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":182}],326:[function(require,module,exports){ +},{"./_typed-array":183}],327:[function(require,module,exports){ require('./_typed-array')('Uint8', 1, function (init) { return function Uint8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); -},{"./_typed-array":182}],327:[function(require,module,exports){ +},{"./_typed-array":183}],328:[function(require,module,exports){ require('./_typed-array')('Uint8', 1, function (init) { return function Uint8ClampedArray(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }, true); -},{"./_typed-array":182}],328:[function(require,module,exports){ +},{"./_typed-array":183}],329:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var each = require('./_array-methods')(0); @@ -10698,7 +10694,7 @@ if (NATIVE_WEAK_MAP && IS_IE11) { }); } -},{"./_array-methods":80,"./_collection":89,"./_collection-weak":88,"./_global":108,"./_is-object":119,"./_meta":132,"./_object-assign":135,"./_redefine":156,"./_validate-collection":187}],329:[function(require,module,exports){ +},{"./_array-methods":81,"./_collection":90,"./_collection-weak":89,"./_global":109,"./_is-object":120,"./_meta":133,"./_object-assign":136,"./_redefine":157,"./_validate-collection":188}],330:[function(require,module,exports){ 'use strict'; var weak = require('./_collection-weak'); var validate = require('./_validate-collection'); @@ -10714,7 +10710,7 @@ require('./_collection')(WEAK_SET, function (get) { } }, weak, false, true); -},{"./_collection":89,"./_collection-weak":88,"./_validate-collection":187}],330:[function(require,module,exports){ +},{"./_collection":90,"./_collection-weak":89,"./_validate-collection":188}],331:[function(require,module,exports){ 'use strict'; // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap var $export = require('./_export'); @@ -10738,7 +10734,7 @@ $export($export.P, 'Array', { require('./_add-to-unscopables')('flatMap'); -},{"./_a-function":71,"./_add-to-unscopables":73,"./_array-species-create":83,"./_export":100,"./_flatten-into-array":105,"./_to-length":179,"./_to-object":180}],331:[function(require,module,exports){ +},{"./_a-function":72,"./_add-to-unscopables":74,"./_array-species-create":84,"./_export":101,"./_flatten-into-array":106,"./_to-length":180,"./_to-object":181}],332:[function(require,module,exports){ 'use strict'; // https://github.com/tc39/Array.prototype.includes var $export = require('./_export'); @@ -10752,7 +10748,7 @@ $export($export.P, 'Array', { require('./_add-to-unscopables')('includes'); -},{"./_add-to-unscopables":73,"./_array-includes":79,"./_export":100}],332:[function(require,module,exports){ +},{"./_add-to-unscopables":74,"./_array-includes":80,"./_export":101}],333:[function(require,module,exports){ // https://github.com/tc39/proposal-object-values-entries var $export = require('./_export'); var $entries = require('./_object-to-array')(true); @@ -10763,7 +10759,7 @@ $export($export.S, 'Object', { } }); -},{"./_export":100,"./_object-to-array":148}],333:[function(require,module,exports){ +},{"./_export":101,"./_object-to-array":149}],334:[function(require,module,exports){ // https://github.com/tc39/proposal-object-getownpropertydescriptors var $export = require('./_export'); var ownKeys = require('./_own-keys'); @@ -10787,7 +10783,7 @@ $export($export.S, 'Object', { } }); -},{"./_create-property":91,"./_export":100,"./_object-gopd":139,"./_own-keys":149,"./_to-iobject":178}],334:[function(require,module,exports){ +},{"./_create-property":92,"./_export":101,"./_object-gopd":140,"./_own-keys":150,"./_to-iobject":179}],335:[function(require,module,exports){ // https://github.com/tc39/proposal-object-values-entries var $export = require('./_export'); var $values = require('./_object-to-array')(false); @@ -10798,7 +10794,7 @@ $export($export.S, 'Object', { } }); -},{"./_export":100,"./_object-to-array":148}],335:[function(require,module,exports){ +},{"./_export":101,"./_object-to-array":149}],336:[function(require,module,exports){ // https://github.com/tc39/proposal-promise-finally 'use strict'; var $export = require('./_export'); @@ -10820,7 +10816,7 @@ $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { ); } }); -},{"./_core":90,"./_export":100,"./_global":108,"./_promise-resolve":153,"./_species-constructor":165}],336:[function(require,module,exports){ +},{"./_core":91,"./_export":101,"./_global":109,"./_promise-resolve":154,"./_species-constructor":166}],337:[function(require,module,exports){ 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = require('./_export'); @@ -10836,7 +10832,7 @@ $export($export.P + $export.F * WEBKIT_BUG, 'String', { } }); -},{"./_export":100,"./_string-pad":170,"./_user-agent":186}],337:[function(require,module,exports){ +},{"./_export":101,"./_string-pad":171,"./_user-agent":187}],338:[function(require,module,exports){ 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = require('./_export'); @@ -10852,7 +10848,7 @@ $export($export.P + $export.F * WEBKIT_BUG, 'String', { } }); -},{"./_export":100,"./_string-pad":170,"./_user-agent":186}],338:[function(require,module,exports){ +},{"./_export":101,"./_string-pad":171,"./_user-agent":187}],339:[function(require,module,exports){ 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim require('./_string-trim')('trimLeft', function ($trim) { @@ -10861,7 +10857,7 @@ require('./_string-trim')('trimLeft', function ($trim) { }; }, 'trimStart'); -},{"./_string-trim":172}],339:[function(require,module,exports){ +},{"./_string-trim":173}],340:[function(require,module,exports){ 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim require('./_string-trim')('trimRight', function ($trim) { @@ -10870,10 +10866,10 @@ require('./_string-trim')('trimRight', function ($trim) { }; }, 'trimEnd'); -},{"./_string-trim":172}],340:[function(require,module,exports){ +},{"./_string-trim":173}],341:[function(require,module,exports){ require('./_wks-define')('asyncIterator'); -},{"./_wks-define":188}],341:[function(require,module,exports){ +},{"./_wks-define":189}],342:[function(require,module,exports){ var $iterators = require('./es6.array.iterator'); var getKeys = require('./_object-keys'); var redefine = require('./_redefine'); @@ -10933,7 +10929,7 @@ for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++ } } -},{"./_global":108,"./_hide":110,"./_iterators":126,"./_object-keys":145,"./_redefine":156,"./_wks":190,"./es6.array.iterator":202}],342:[function(require,module,exports){ +},{"./_global":109,"./_hide":111,"./_iterators":127,"./_object-keys":146,"./_redefine":157,"./_wks":191,"./es6.array.iterator":203}],343:[function(require,module,exports){ var $export = require('./_export'); var $task = require('./_task'); $export($export.G + $export.B, { @@ -10941,7 +10937,7 @@ $export($export.G + $export.B, { clearImmediate: $task.clear }); -},{"./_export":100,"./_task":174}],343:[function(require,module,exports){ +},{"./_export":101,"./_task":175}],344:[function(require,module,exports){ // ie9- setTimeout & setInterval additional parameters fix var global = require('./_global'); var $export = require('./_export'); @@ -10963,13 +10959,13 @@ $export($export.G + $export.B + $export.F * MSIE, { setInterval: wrap(global.setInterval) }); -},{"./_export":100,"./_global":108,"./_user-agent":186}],344:[function(require,module,exports){ +},{"./_export":101,"./_global":109,"./_user-agent":187}],345:[function(require,module,exports){ require('../modules/web.timers'); require('../modules/web.immediate'); require('../modules/web.dom.iterable'); module.exports = require('../modules/_core'); -},{"../modules/_core":90,"../modules/web.dom.iterable":341,"../modules/web.immediate":342,"../modules/web.timers":343}],345:[function(require,module,exports){ +},{"../modules/_core":91,"../modules/web.dom.iterable":342,"../modules/web.immediate":343,"../modules/web.timers":344}],346:[function(require,module,exports){ 'use strict'; var assign = require('object.assign'); @@ -10989,9 +10985,8 @@ var objectKeys = require('object-keys'); var whichBoxedPrimitive = require('which-boxed-primitive'); var whichCollection = require('which-collection'); var whichTypedArray = require('which-typed-array'); +var byteLength = require('array-buffer-byte-length'); -var byteLength = callBound('ArrayBuffer.prototype.byteLength', true) - || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property var sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); var $getTime = callBound('Date.prototype.getTime'); @@ -11286,9 +11281,16 @@ function objEquiv(a, b, opts, channel) { var aWhich = whichTypedArray(a); var bWhich = whichTypedArray(b); - if ((aWhich || bWhich) && aWhich !== bWhich) { + if (aWhich !== bWhich) { return false; } + if (aWhich || bWhich) { // && would work too, because both are true or both false here + if (a.length !== b.length) { return false; } + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { return false; } + } + return true; + } var aIsBuffer = isBuffer(a); var bIsBuffer = isBuffer(b); @@ -11357,7 +11359,69 @@ module.exports = function deepEqual(a, b, opts) { return internalDeepEqual(a, b, opts, getSideChannel()); }; -},{"call-bind/callBound":38,"es-get-iterator":347,"get-intrinsic":352,"is-arguments":363,"is-array-buffer":364,"is-date-object":368,"is-regex":372,"is-shared-array-buffer":374,"isarray":380,"object-is":383,"object-keys":387,"object.assign":390,"regexp.prototype.flags":397,"side-channel":400,"which-boxed-primitive":405,"which-collection":406,"which-typed-array":407}],346:[function(require,module,exports){ +},{"array-buffer-byte-length":17,"call-bind/callBound":39,"es-get-iterator":349,"get-intrinsic":354,"is-arguments":365,"is-array-buffer":366,"is-date-object":370,"is-regex":374,"is-shared-array-buffer":376,"isarray":382,"object-is":385,"object-keys":389,"object.assign":392,"regexp.prototype.flags":399,"side-channel":403,"which-boxed-primitive":408,"which-collection":409,"which-typed-array":410}],347:[function(require,module,exports){ +'use strict'; + +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var gopd = require('gopd'); + +/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + +},{"get-intrinsic":354,"gopd":355,"has-property-descriptors":357}],348:[function(require,module,exports){ 'use strict'; var keys = require('object-keys'); @@ -11365,15 +11429,13 @@ var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbo var toStr = Object.prototype.toString; var concat = Array.prototype.concat; -var origDefineProperty = Object.defineProperty; +var defineDataProperty = require('define-data-property'); var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; -var hasPropertyDescriptors = require('has-property-descriptors')(); - -var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; +var supportsDescriptors = require('has-property-descriptors')(); var defineProperty = function (object, name, value, predicate) { if (name in object) { @@ -11385,15 +11447,11 @@ var defineProperty = function (object, name, value, predicate) { return; } } + if (supportsDescriptors) { - origDefineProperty(object, name, { - configurable: true, - enumerable: false, - value: value, - writable: true - }); + defineDataProperty(object, name, value, true); } else { - object[name] = value; // eslint-disable-line no-param-reassign + defineDataProperty(object, name, value); } }; @@ -11412,7 +11470,7 @@ defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; -},{"has-property-descriptors":355,"object-keys":387}],347:[function(require,module,exports){ +},{"define-data-property":347,"has-property-descriptors":357,"object-keys":389}],349:[function(require,module,exports){ (function (process){(function (){ 'use strict'; @@ -11605,7 +11663,7 @@ if (require('has-symbols')() || require('has-symbols/shams')()) { } }).call(this)}).call(this,require('_process')) -},{"_process":394,"call-bind/callBound":38,"get-intrinsic":352,"has-symbols":357,"has-symbols/shams":358,"is-arguments":363,"is-map":369,"is-set":373,"is-string":375,"isarray":380,"stop-iteration-iterator":401}],348:[function(require,module,exports){ +},{"_process":396,"call-bind/callBound":39,"get-intrinsic":354,"has-symbols":359,"has-symbols/shams":360,"is-arguments":365,"is-map":371,"is-set":375,"is-string":377,"isarray":382,"stop-iteration-iterator":404}],350:[function(require,module,exports){ 'use strict'; var isCallable = require('is-callable'); @@ -11669,7 +11727,7 @@ var forEach = function forEach(list, iterator, thisArg) { module.exports = forEach; -},{"is-callable":367}],349:[function(require,module,exports){ +},{"is-callable":369}],351:[function(require,module,exports){ 'use strict'; /* eslint no-invalid-this: 1 */ @@ -11723,14 +11781,14 @@ module.exports = function bind(that) { return bound; }; -},{}],350:[function(require,module,exports){ +},{}],352:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); module.exports = Function.prototype.bind || implementation; -},{"./implementation":349}],351:[function(require,module,exports){ +},{"./implementation":351}],353:[function(require,module,exports){ 'use strict'; var functionsHaveNames = function functionsHaveNames() { @@ -11763,7 +11821,7 @@ functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() module.exports = functionsHaveNames; -},{}],352:[function(require,module,exports){ +},{}],354:[function(require,module,exports){ 'use strict'; var undefined; @@ -12116,7 +12174,7 @@ module.exports = function GetIntrinsic(name, allowMissing) { return value; }; -},{"function-bind":350,"has":360,"has-proto":356,"has-symbols":357}],353:[function(require,module,exports){ +},{"function-bind":352,"has":362,"has-proto":358,"has-symbols":359}],355:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -12134,7 +12192,7 @@ if ($gOPD) { module.exports = $gOPD; -},{"get-intrinsic":352}],354:[function(require,module,exports){ +},{"get-intrinsic":354}],356:[function(require,module,exports){ 'use strict'; var $BigInt = typeof BigInt !== 'undefined' && BigInt; @@ -12146,7 +12204,7 @@ module.exports = function hasNativeBigInts() { && typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers }; -},{}],355:[function(require,module,exports){ +},{}],357:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -12181,7 +12239,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu module.exports = hasPropertyDescriptors; -},{"get-intrinsic":352}],356:[function(require,module,exports){ +},{"get-intrinsic":354}],358:[function(require,module,exports){ 'use strict'; var test = { @@ -12194,7 +12252,7 @@ module.exports = function hasProto() { return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); }; -},{}],357:[function(require,module,exports){ +},{}],359:[function(require,module,exports){ 'use strict'; var origSymbol = typeof Symbol !== 'undefined' && Symbol; @@ -12209,7 +12267,7 @@ module.exports = function hasNativeSymbols() { return hasSymbolSham(); }; -},{"./shams":358}],358:[function(require,module,exports){ +},{"./shams":360}],360:[function(require,module,exports){ 'use strict'; /* eslint complexity: [2, 18], max-statements: [2, 33] */ @@ -12253,7 +12311,7 @@ module.exports = function hasSymbols() { return true; }; -},{}],359:[function(require,module,exports){ +},{}],361:[function(require,module,exports){ 'use strict'; var hasSymbols = require('has-symbols/shams'); @@ -12262,14 +12320,17 @@ module.exports = function hasToStringTagShams() { return hasSymbols() && !!Symbol.toStringTag; }; -},{"has-symbols/shams":358}],360:[function(require,module,exports){ +},{"has-symbols/shams":360}],362:[function(require,module,exports){ 'use strict'; -var bind = require('function-bind'); +var hasOwnProperty = {}.hasOwnProperty; +var call = Function.prototype.call; -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); +module.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) { + return call.call(hasOwnProperty, O, P); +}; -},{"function-bind":350}],361:[function(require,module,exports){ +},{}],363:[function(require,module,exports){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m @@ -12356,7 +12417,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],362:[function(require,module,exports){ +},{}],364:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -12420,7 +12481,7 @@ if (Object.freeze) { module.exports = SLOT; -},{"get-intrinsic":352,"has":360,"side-channel":400}],363:[function(require,module,exports){ +},{"get-intrinsic":354,"has":362,"side-channel":403}],365:[function(require,module,exports){ 'use strict'; var hasToStringTag = require('has-tostringtag/shams')(); @@ -12455,7 +12516,7 @@ isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; -},{"call-bind/callBound":38,"has-tostringtag/shams":359}],364:[function(require,module,exports){ +},{"call-bind/callBound":39,"has-tostringtag/shams":361}],366:[function(require,module,exports){ 'use strict'; var callBind = require('call-bind'); @@ -12500,7 +12561,7 @@ module.exports = $byteLength || $abSlice return false; }; -},{"call-bind":39,"call-bind/callBound":38,"get-intrinsic":352,"is-typed-array":377}],365:[function(require,module,exports){ +},{"call-bind":40,"call-bind/callBound":39,"get-intrinsic":354,"is-typed-array":379}],367:[function(require,module,exports){ 'use strict'; var hasBigInts = require('has-bigints')(); @@ -12540,7 +12601,7 @@ if (hasBigInts) { }; } -},{"has-bigints":354}],366:[function(require,module,exports){ +},{"has-bigints":356}],368:[function(require,module,exports){ 'use strict'; var callBound = require('call-bind/callBound'); @@ -12568,7 +12629,7 @@ module.exports = function isBoolean(value) { return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass; }; -},{"call-bind/callBound":38,"has-tostringtag/shams":359}],367:[function(require,module,exports){ +},{"call-bind/callBound":39,"has-tostringtag/shams":361}],369:[function(require,module,exports){ 'use strict'; var fnToStr = Function.prototype.toString; @@ -12671,7 +12732,7 @@ module.exports = reflectApply return tryFunctionObject(value); }; -},{}],368:[function(require,module,exports){ +},{}],370:[function(require,module,exports){ 'use strict'; var getDay = Date.prototype.getDay; @@ -12695,7 +12756,7 @@ module.exports = function isDateObject(value) { return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; }; -},{"has-tostringtag/shams":359}],369:[function(require,module,exports){ +},{"has-tostringtag/shams":361}],371:[function(require,module,exports){ 'use strict'; var $Map = typeof Map === 'function' && Map.prototype ? Map : null; @@ -12739,7 +12800,7 @@ module.exports = exported || function isMap(x) { return false; }; -},{}],370:[function(require,module,exports){ +},{}],372:[function(require,module,exports){ (function (process){(function (){ // Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md 'use strict'; @@ -12747,7 +12808,7 @@ module.exports = exported || function isMap(x) { exports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node); }).call(this)}).call(this,require('_process')) -},{"_process":394}],371:[function(require,module,exports){ +},{"_process":396}],373:[function(require,module,exports){ 'use strict'; var numToStr = Number.prototype.toString; @@ -12773,7 +12834,7 @@ module.exports = function isNumberObject(value) { return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass; }; -},{"has-tostringtag/shams":359}],372:[function(require,module,exports){ +},{"has-tostringtag/shams":361}],374:[function(require,module,exports){ 'use strict'; var callBound = require('call-bind/callBound'); @@ -12833,7 +12894,7 @@ module.exports = hasToStringTag return $toString(value) === regexClass; }; -},{"call-bind/callBound":38,"has-tostringtag/shams":359}],373:[function(require,module,exports){ +},{"call-bind/callBound":39,"has-tostringtag/shams":361}],375:[function(require,module,exports){ 'use strict'; var $Map = typeof Map === 'function' && Map.prototype ? Map : null; @@ -12877,7 +12938,7 @@ module.exports = exported || function isSet(x) { return false; }; -},{}],374:[function(require,module,exports){ +},{}],376:[function(require,module,exports){ 'use strict'; var callBound = require('call-bind/callBound'); @@ -12900,7 +12961,7 @@ module.exports = $byteLength return false; }; -},{"call-bind/callBound":38}],375:[function(require,module,exports){ +},{"call-bind/callBound":39}],377:[function(require,module,exports){ 'use strict'; var strValue = String.prototype.valueOf; @@ -12926,7 +12987,7 @@ module.exports = function isString(value) { return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; }; -},{"has-tostringtag/shams":359}],376:[function(require,module,exports){ +},{"has-tostringtag/shams":361}],378:[function(require,module,exports){ 'use strict'; var toStr = Object.prototype.toString; @@ -12963,7 +13024,7 @@ if (hasSymbols) { }; } -},{"has-symbols":357}],377:[function(require,module,exports){ +},{"has-symbols":359}],379:[function(require,module,exports){ 'use strict'; var whichTypedArray = require('which-typed-array'); @@ -12972,7 +13033,7 @@ module.exports = function isTypedArray(value) { return !!whichTypedArray(value); }; -},{"which-typed-array":407}],378:[function(require,module,exports){ +},{"which-typed-array":410}],380:[function(require,module,exports){ 'use strict'; var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null; @@ -13016,7 +13077,7 @@ module.exports = exported || function isWeakMap(x) { return false; }; -},{}],379:[function(require,module,exports){ +},{}],381:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -13054,14 +13115,14 @@ if ($setHas) { }; } -},{"call-bind/callBound":38,"get-intrinsic":352}],380:[function(require,module,exports){ +},{"call-bind/callBound":39,"get-intrinsic":354}],382:[function(require,module,exports){ var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; -},{}],381:[function(require,module,exports){ +},{}],383:[function(require,module,exports){ var hasMap = typeof Map === 'function' && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; @@ -13579,7 +13640,7 @@ function arrObjKeys(obj, inspect) { return xs; } -},{"./util.inspect":36}],382:[function(require,module,exports){ +},{"./util.inspect":37}],384:[function(require,module,exports){ 'use strict'; var numberIsNaN = function (value) { @@ -13600,7 +13661,7 @@ module.exports = function is(a, b) { }; -},{}],383:[function(require,module,exports){ +},{}],385:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -13620,7 +13681,7 @@ define(polyfill, { module.exports = polyfill; -},{"./implementation":382,"./polyfill":384,"./shim":385,"call-bind":39,"define-properties":346}],384:[function(require,module,exports){ +},{"./implementation":384,"./polyfill":386,"./shim":387,"call-bind":40,"define-properties":348}],386:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -13629,7 +13690,7 @@ module.exports = function getPolyfill() { return typeof Object.is === 'function' ? Object.is : implementation; }; -},{"./implementation":382}],385:[function(require,module,exports){ +},{"./implementation":384}],387:[function(require,module,exports){ 'use strict'; var getPolyfill = require('./polyfill'); @@ -13645,7 +13706,7 @@ module.exports = function shimObjectIs() { return polyfill; }; -},{"./polyfill":384,"define-properties":346}],386:[function(require,module,exports){ +},{"./polyfill":386,"define-properties":348}],388:[function(require,module,exports){ 'use strict'; var keysShim; @@ -13769,7 +13830,7 @@ if (!Object.keys) { } module.exports = keysShim; -},{"./isArguments":388}],387:[function(require,module,exports){ +},{"./isArguments":390}],389:[function(require,module,exports){ 'use strict'; var slice = Array.prototype.slice; @@ -13803,7 +13864,7 @@ keysShim.shim = function shimObjectKeys() { module.exports = keysShim; -},{"./implementation":386,"./isArguments":388}],388:[function(require,module,exports){ +},{"./implementation":388,"./isArguments":390}],390:[function(require,module,exports){ 'use strict'; var toStr = Object.prototype.toString; @@ -13822,7 +13883,7 @@ module.exports = function isArguments(value) { return isArgs; }; -},{}],389:[function(require,module,exports){ +},{}],391:[function(require,module,exports){ 'use strict'; // modified from https://github.com/es-shims/es6-shim @@ -13870,7 +13931,7 @@ module.exports = function assign(target, source1) { return to; // step 4 }; -},{"call-bind/callBound":38,"has-symbols/shams":358,"object-keys":387}],390:[function(require,module,exports){ +},{"call-bind/callBound":39,"has-symbols/shams":360,"object-keys":389}],392:[function(require,module,exports){ 'use strict'; var defineProperties = require('define-properties'); @@ -13894,7 +13955,7 @@ defineProperties(bound, { module.exports = bound; -},{"./implementation":389,"./polyfill":391,"./shim":392,"call-bind":39,"define-properties":346}],391:[function(require,module,exports){ +},{"./implementation":391,"./polyfill":393,"./shim":394,"call-bind":40,"define-properties":348}],393:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -13951,7 +14012,7 @@ module.exports = function getPolyfill() { return Object.assign; }; -},{"./implementation":389}],392:[function(require,module,exports){ +},{"./implementation":391}],394:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -13967,7 +14028,7 @@ module.exports = function shimAssign() { return polyfill; }; -},{"./polyfill":391,"define-properties":346}],393:[function(require,module,exports){ +},{"./polyfill":393,"define-properties":348}],395:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; @@ -14045,7 +14106,7 @@ function now() { } exports.now = now; -},{}],394:[function(require,module,exports){ +},{}],396:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -14231,7 +14292,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],395:[function(require,module,exports){ +},{}],397:[function(require,module,exports){ /** * Copyright (c) 2014-present, Facebook, Inc. * @@ -14994,15 +15055,15 @@ try { } } -},{}],396:[function(require,module,exports){ +},{}],398:[function(require,module,exports){ 'use strict'; -var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); +var setFunctionName = require('set-function-name'); var $Object = Object; var $TypeError = TypeError; -module.exports = function flags() { +module.exports = setFunctionName(function flags() { if (this != null && this !== $Object(this)) { throw new $TypeError('RegExp.prototype.flags getter called on non-object'); } @@ -15032,13 +15093,10 @@ module.exports = function flags() { result += 'y'; } return result; -}; +}, 'get flags', true); -if (functionsHaveConfigurableNames && Object.defineProperty) { - Object.defineProperty(module.exports, 'name', { value: 'get flags' }); -} -},{"functions-have-names":351}],397:[function(require,module,exports){ +},{"set-function-name":402}],399:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -15058,7 +15116,7 @@ define(flagsBound, { module.exports = flagsBound; -},{"./implementation":396,"./polyfill":398,"./shim":399,"call-bind":39,"define-properties":346}],398:[function(require,module,exports){ +},{"./implementation":398,"./polyfill":400,"./shim":401,"call-bind":40,"define-properties":348}],400:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -15096,7 +15154,7 @@ module.exports = function getPolyfill() { return implementation; }; -},{"./implementation":396,"define-properties":346}],399:[function(require,module,exports){ +},{"./implementation":398,"define-properties":348}],401:[function(require,module,exports){ 'use strict'; var supportsDescriptors = require('define-properties').supportsDescriptors; @@ -15124,7 +15182,31 @@ module.exports = function shimFlags() { return polyfill; }; -},{"./polyfill":398,"define-properties":346}],400:[function(require,module,exports){ +},{"./polyfill":400,"define-properties":348}],402:[function(require,module,exports){ +'use strict'; + +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +var $TypeError = TypeError; + +module.exports = function setFunctionName(fn, name) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + var loose = arguments.length > 2 && !!arguments[2]; + if (!loose || functionsHaveConfigurableNames) { + if (hasDescriptors) { + define(fn, 'name', name, true, true); + } else { + define(fn, 'name', name); + } + } + return fn; +}; + +},{"define-data-property":347,"functions-have-names":353,"has-property-descriptors":357}],403:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -15250,7 +15332,7 @@ module.exports = function getSideChannel() { return channel; }; -},{"call-bind/callBound":38,"get-intrinsic":352,"object-inspect":381}],401:[function(require,module,exports){ +},{"call-bind/callBound":39,"get-intrinsic":354,"object-inspect":383}],404:[function(require,module,exports){ 'use strict'; var SLOT = require('internal-slot'); @@ -15292,7 +15374,7 @@ module.exports = function getStopIterationIterator(origIterator) { return siIterator; }; -},{"internal-slot":362}],402:[function(require,module,exports){ +},{"internal-slot":364}],405:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -15344,7 +15426,7 @@ function addBrowser(fn) { * @link https://stackoverflow.com/a/26193516/3443137 */ } -},{}],403:[function(require,module,exports){ +},{}],406:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -15405,7 +15487,7 @@ function getSize() { return LISTENERS.size; } }).call(this)}).call(this,require('_process')) -},{"./browser.js":402,"./node.js":404,"_process":394}],404:[function(require,module,exports){ +},{"./browser.js":405,"./node.js":407,"_process":396}],407:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -15444,7 +15526,7 @@ function addNode(fn) { }); } }).call(this)}).call(this,require('_process')) -},{"_process":394}],405:[function(require,module,exports){ +},{"_process":396}],408:[function(require,module,exports){ 'use strict'; var isString = require('is-string'); @@ -15476,7 +15558,7 @@ module.exports = function whichBoxedPrimitive(value) { } }; -},{"is-bigint":365,"is-boolean-object":366,"is-number-object":371,"is-string":375,"is-symbol":376}],406:[function(require,module,exports){ +},{"is-bigint":367,"is-boolean-object":368,"is-number-object":373,"is-string":377,"is-symbol":378}],409:[function(require,module,exports){ 'use strict'; var isMap = require('is-map'); @@ -15502,7 +15584,7 @@ module.exports = function whichCollection(value) { return false; }; -},{"is-map":369,"is-set":373,"is-weakmap":378,"is-weakset":379}],407:[function(require,module,exports){ +},{"is-map":371,"is-set":375,"is-weakmap":380,"is-weakset":381}],410:[function(require,module,exports){ (function (global){(function (){ 'use strict'; @@ -15595,7 +15677,7 @@ module.exports = function whichTypedArray(value) { }; }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"available-typed-arrays":34,"call-bind":39,"call-bind/callBound":38,"for-each":348,"gopd":353,"has-tostringtag/shams":359}],408:[function(require,module,exports){ +},{"available-typed-arrays":35,"call-bind":40,"call-bind/callBound":39,"for-each":350,"gopd":355,"has-tostringtag/shams":361}],411:[function(require,module,exports){ "use strict"; /* eslint-disable */ @@ -15667,4 +15749,4 @@ self.addEventListener('message', function (e) { } ; }, false); -},{"../../":2,"@babel/polyfill":14,"async-test-util":20}]},{},[408]); +},{"../../":2,"@babel/polyfill":14,"async-test-util":21}]},{},[411]); diff --git a/package.json b/package.json index 3bd79c35..453b5f32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "broadcast-channel", - "version": "5.3.0", + "version": "5.4.0", "description": "A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers and NodeJs and iframes", "exports": { ".": { From b346d48e3d14d69ad85ef603c41997da629b9e6c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 00:50:45 +0000 Subject: [PATCH 35/82] chore(deps): update babel monorepo to v7.23.2 --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 453b5f32..c0bdbcf9 100644 --- a/package.json +++ b/package.json @@ -91,20 +91,20 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.23.1", + "@babel/runtime": "7.23.2", "oblivious-set": "1.1.1", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { "@babel/cli": "7.23.0", - "@babel/core": "7.23.0", + "@babel/core": "7.23.2", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.22.5", "@babel/plugin-transform-property-literals": "7.22.5", - "@babel/plugin-transform-runtime": "7.22.15", + "@babel/plugin-transform-runtime": "7.23.2", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.22.20", + "@babel/preset-env": "7.23.2", "@babel/types": "7.23.0", "@types/core-js": "2.5.6", "assert": "2.1.0", From af179d37e32a50bbb58ca819e424a2ba99d46279 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 15 Oct 2023 19:51:58 +0000 Subject: [PATCH 36/82] chore(deps): update dependency rollup to v4.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c0bdbcf9..b88bb896 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.5", - "rollup": "4.0.2", + "rollup": "4.1.3", "@rollup/plugin-terser": "0.4.4", "testcafe": "3.3.0", "ts-node": "10.9.1", From 17cc2a71f26282bd20761b7facd6eb83756aa24e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 15 Oct 2023 21:47:10 +0000 Subject: [PATCH 37/82] chore(deps): update dependency webpack to v5.89.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b88bb896..f4c93f27 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ "typescript": "5.2.2", "uglify-js": "3.17.4", "watchify": "4.0.0", - "webpack": "5.88.2", + "webpack": "5.89.0", "webpack-cli": "5.1.4" } } From 894e6dc48f688473515b313449390ef2bf8e04e0 Mon Sep 17 00:00:00 2001 From: Daniel Meyer <8926560+pubkey@users.noreply.github.com> Date: Mon, 16 Oct 2023 23:01:46 +0200 Subject: [PATCH 38/82] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f4c93f27..8f0afeea 100644 --- a/package.json +++ b/package.json @@ -70,8 +70,8 @@ "size:rollup": "npm run build && rollup --config ./config/rollup.config.mjs && echo \"Build-Size Rollup (minified+gzip):\" && gzip-size --raw ./test_tmp/rollup.bundle.js", "lint": "eslint src test config --cache", "clear": "rimraf -rf ./dist && rimraf -rf ./gen", - "build:es6node": "rimraf -rf dist/esnode && cross-env NODE_ENV=es6 babel src --out-dir dist/esnode && echo '{ \"type\": \"module\" }' > dist/esnode/package.json", - "build:es6browser": "rimraf -rf dist/esbrowser && cross-env NODE_ENV=es6 babel src --out-dir dist/esbrowser && grep -rl NodeMethod dist/esbrowser | xargs sed -i.bak '/.*NodeMethod.*/d' && echo '{ \"type\": \"module\" }' > dist/esbrowser/package.json", + "build:es6node": "rimraf -rf dist/esnode && cross-env NODE_ENV=es6 babel src --out-dir dist/esnode && echo '{ \"type\": \"module\", \"sideEffects\": false }' > dist/esnode/package.json", + "build:es6browser": "rimraf -rf dist/esbrowser && cross-env NODE_ENV=es6 babel src --out-dir dist/esbrowser && grep -rl NodeMethod dist/esbrowser | xargs sed -i.bak '/.*NodeMethod.*/d' && echo '{ \"type\": \"module\", \"sideEffects\": false }' > dist/esbrowser/package.json", "build:es5node": "cross-env NODE_ENV=es5 babel src --out-dir dist/es5node", "build:es5browser": "cross-env NODE_ENV=es5 babel src --out-dir dist/lib && grep -rl NodeMethod dist/lib | xargs sed -i.bak '/.*NodeMethod.*/d'", "build:test": "cross-env NODE_ENV=es5 babel test --out-dir test_tmp", From 5db499d5682ac3fb27de086afadd7d0918d96679 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Tue, 17 Oct 2023 01:18:09 +0200 Subject: [PATCH 39/82] 5.5.0 --- CHANGELOG.md | 3 ++ dist/es5node/method-chooser.js | 4 +- dist/esbrowser/package.json | 2 +- dist/esnode/package.json | 2 +- dist/lib/browser.js | 4 +- dist/lib/method-chooser.js | 4 +- docs/e2e.js | 77 +++++++++++++++++++++++++++------- docs/iframe.js | 4 +- docs/index.js | 4 +- docs/leader-iframe.js | 4 +- docs/worker.js | 77 +++++++++++++++++++++++++++------- package.json | 2 +- 12 files changed, 144 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50c9d1d8..c0703832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ## X.X.X (comming soon) +## 5.5.0 (17 October 2023) + +- Add `sideEffects: false` ## 5.4.0 (10 October 2023) - FIX import of `p-queue` throws `is not a constructor` diff --git a/dist/es5node/method-chooser.js b/dist/es5node/method-chooser.js index 51d912a0..222be961 100644 --- a/dist/es5node/method-chooser.js +++ b/dist/es5node/method-chooser.js @@ -10,8 +10,8 @@ var _indexedDb = require("./methods/indexed-db.js"); var _localstorage = require("./methods/localstorage.js"); var _simulate = require("./methods/simulate.js"); var NodeMethod = _interopRequireWildcard(require("./methods/node.js")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } // the line below will be removed from es5/browser builds // order is important diff --git a/dist/esbrowser/package.json b/dist/esbrowser/package.json index 5ffd9800..87696418 100644 --- a/dist/esbrowser/package.json +++ b/dist/esbrowser/package.json @@ -1 +1 @@ -{ "type": "module" } +{ "type": "module", "sideEffects": false } diff --git a/dist/esnode/package.json b/dist/esnode/package.json index 5ffd9800..87696418 100644 --- a/dist/esnode/package.json +++ b/dist/esnode/package.json @@ -1 +1 @@ -{ "type": "module" } +{ "type": "module", "sideEffects": false } diff --git a/dist/lib/browser.js b/dist/lib/browser.js index 47e13265..e9e431f0 100644 --- a/dist/lib/browser.js +++ b/dist/lib/browser.js @@ -796,8 +796,8 @@ var _native = require("./methods/native.js"); var _indexedDb = require("./methods/indexed-db.js"); var _localstorage = require("./methods/localstorage.js"); var _simulate = require("./methods/simulate.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } // the line below will be removed from es5/browser builds // order is important diff --git a/dist/lib/method-chooser.js b/dist/lib/method-chooser.js index 4fc80f7b..ffd154d2 100644 --- a/dist/lib/method-chooser.js +++ b/dist/lib/method-chooser.js @@ -9,8 +9,8 @@ var _native = require("./methods/native.js"); var _indexedDb = require("./methods/indexed-db.js"); var _localstorage = require("./methods/localstorage.js"); var _simulate = require("./methods/simulate.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } // the line below will be removed from es5/browser builds // order is important diff --git a/docs/e2e.js b/docs/e2e.js index 4a0870f5..07284e61 100644 --- a/docs/e2e.js +++ b/docs/e2e.js @@ -788,8 +788,8 @@ var _native = require("./methods/native.js"); var _indexedDb = require("./methods/indexed-db.js"); var _localstorage = require("./methods/localstorage.js"); var _simulate = require("./methods/simulate.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } // the line below will be removed from es5/browser builds // order is important @@ -11728,6 +11728,14 @@ var hasPropertyDescriptors = require('has-property-descriptors')(); var GetIntrinsic = require('get-intrinsic'); var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); @@ -12094,43 +12102,75 @@ module.exports = forEach; /* eslint no-invalid-this: 1 */ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; var toStr = Object.prototype.toString; +var max = Math.max; var funcType = '[object Function]'; +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + module.exports = function bind(that) { var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } - var args = slice.call(arguments, 1); + var args = slicy(arguments, 1); var bound; var binder = function () { if (this instanceof bound) { var result = target.apply( this, - args.concat(slice.call(arguments)) + concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); } + return target.apply( + that, + concatty(args, arguments) + ); + }; - var boundLength = Math.max(0, target.length - args.length); + var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); + boundArgs[i] = '$' + i; } - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); if (target.prototype) { var Empty = function Empty() {}; @@ -13484,6 +13524,7 @@ module.exports = Array.isArray || function (arr) { }; },{}],387:[function(require,module,exports){ +(function (global){(function (){ var hasMap = typeof Map === 'function' && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; @@ -13725,6 +13766,13 @@ module.exports = function inspect_(obj, options, depth, seen) { if (isString(obj)) { return markBoxed(inspect(String(obj))); } + if (obj === global) { + /* eslint-env browser */ + if (typeof window !== 'undefined') { + return '{ [object Window] }'; + } + return '{ [object global] }'; + } if (!isDate(obj) && !isRegExp(obj)) { var ys = arrObjKeys(obj, inspect); var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; @@ -14001,6 +14049,7 @@ function arrObjKeys(obj, inspect) { return xs; } +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"./util.inspect":41}],388:[function(require,module,exports){ 'use strict'; diff --git a/docs/iframe.js b/docs/iframe.js index 23dcaced..7ab1f02d 100644 --- a/docs/iframe.js +++ b/docs/iframe.js @@ -788,8 +788,8 @@ var _native = require("./methods/native.js"); var _indexedDb = require("./methods/indexed-db.js"); var _localstorage = require("./methods/localstorage.js"); var _simulate = require("./methods/simulate.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } // the line below will be removed from es5/browser builds // order is important diff --git a/docs/index.js b/docs/index.js index 8863357d..c7ab757c 100644 --- a/docs/index.js +++ b/docs/index.js @@ -788,8 +788,8 @@ var _native = require("./methods/native.js"); var _indexedDb = require("./methods/indexed-db.js"); var _localstorage = require("./methods/localstorage.js"); var _simulate = require("./methods/simulate.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } // the line below will be removed from es5/browser builds // order is important diff --git a/docs/leader-iframe.js b/docs/leader-iframe.js index 14b742e9..aa6a6c60 100644 --- a/docs/leader-iframe.js +++ b/docs/leader-iframe.js @@ -788,8 +788,8 @@ var _native = require("./methods/native.js"); var _indexedDb = require("./methods/indexed-db.js"); var _localstorage = require("./methods/localstorage.js"); var _simulate = require("./methods/simulate.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } // the line below will be removed from es5/browser builds // order is important diff --git a/docs/worker.js b/docs/worker.js index 6c9f4e61..eef6a2d0 100644 --- a/docs/worker.js +++ b/docs/worker.js @@ -788,8 +788,8 @@ var _native = require("./methods/native.js"); var _indexedDb = require("./methods/indexed-db.js"); var _localstorage = require("./methods/localstorage.js"); var _simulate = require("./methods/simulate.js"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } // the line below will be removed from es5/browser builds // order is important @@ -11367,6 +11367,14 @@ var hasPropertyDescriptors = require('has-property-descriptors')(); var GetIntrinsic = require('get-intrinsic'); var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); @@ -11733,43 +11741,75 @@ module.exports = forEach; /* eslint no-invalid-this: 1 */ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; var toStr = Object.prototype.toString; +var max = Math.max; var funcType = '[object Function]'; +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + module.exports = function bind(that) { var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } - var args = slice.call(arguments, 1); + var args = slicy(arguments, 1); var bound; var binder = function () { if (this instanceof bound) { var result = target.apply( this, - args.concat(slice.call(arguments)) + concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); } + return target.apply( + that, + concatty(args, arguments) + ); + }; - var boundLength = Math.max(0, target.length - args.length); + var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); + boundArgs[i] = '$' + i; } - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); if (target.prototype) { var Empty = function Empty() {}; @@ -13123,6 +13163,7 @@ module.exports = Array.isArray || function (arr) { }; },{}],383:[function(require,module,exports){ +(function (global){(function (){ var hasMap = typeof Map === 'function' && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; @@ -13364,6 +13405,13 @@ module.exports = function inspect_(obj, options, depth, seen) { if (isString(obj)) { return markBoxed(inspect(String(obj))); } + if (obj === global) { + /* eslint-env browser */ + if (typeof window !== 'undefined') { + return '{ [object Window] }'; + } + return '{ [object global] }'; + } if (!isDate(obj) && !isRegExp(obj)) { var ys = arrObjKeys(obj, inspect); var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; @@ -13640,6 +13688,7 @@ function arrObjKeys(obj, inspect) { return xs; } +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"./util.inspect":37}],384:[function(require,module,exports){ 'use strict'; diff --git a/package.json b/package.json index 8f0afeea..52c8e179 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "broadcast-channel", - "version": "5.4.0", + "version": "5.5.0", "description": "A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers and NodeJs and iframes", "exports": { ".": { From 52ad0b80ea3f13484bb032b63fc8126cc4a36039 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 23:18:41 +0000 Subject: [PATCH 40/82] chore(deps): update dependency rollup to v4.1.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 52c8e179..08935b13 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.5", - "rollup": "4.1.3", + "rollup": "4.1.4", "@rollup/plugin-terser": "0.4.4", "testcafe": "3.3.0", "ts-node": "10.9.1", From 30feadf3f5a39e7372b6f35218fc263154eeef26 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 01:48:46 +0000 Subject: [PATCH 41/82] chore(deps): update dependency @types/core-js to v2.5.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08935b13..7dffd99a 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.23.2", "@babel/types": "7.23.0", - "@types/core-js": "2.5.6", + "@types/core-js": "2.5.7", "assert": "2.1.0", "async-test-util": "2.1.1", "browserify": "17.0.0", From 7bb8d78f93d7ad065d2290ae3add3eca3b7bf98f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 04:42:24 +0000 Subject: [PATCH 42/82] chore(deps): update dependency concurrently to v8.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7dffd99a..892c4904 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "browserify": "17.0.0", "child-process-promise": "2.2.1", "clone": "2.1.2", - "concurrently": "8.2.1", + "concurrently": "8.2.2", "convert-hrtime": "5.0.0", "copyfiles": "2.4.1", "cross-env": "7.0.3", From 7ee46276e975e2a059510169e104ac8829b92012 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 22:48:46 +0000 Subject: [PATCH 43/82] chore(deps): update dependency eslint to v8.52.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 892c4904..59e284a7 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "copyfiles": "2.4.1", "cross-env": "7.0.3", "detect-node": "2.1.0", - "eslint": "8.51.0", + "eslint": "8.52.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.7.0", From 805acd26adb262f1a2a2a645ca147253148915f0 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Mon, 23 Oct 2023 13:39:00 +0200 Subject: [PATCH 44/82] REPLACE `new Date().getTime()` with `Date.now()` which is faster --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0703832..7e30d00f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## X.X.X (comming soon) +- REPLACE `new Date().getTime()` with `Date.now()` which is faster + ## 5.5.0 (17 October 2023) - Add `sideEffects: false` From 3e6bb80c4fc4f7e17976e8248dd0af398ac0f759 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Mon, 23 Oct 2023 13:45:23 +0200 Subject: [PATCH 45/82] REPLACE `new Date().getTime()` with `Date.now()` which is faster --- src/methods/indexed-db.js | 4 ++-- src/methods/localstorage.js | 2 +- src/util.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/methods/indexed-db.js b/src/methods/indexed-db.js index e3781468..5977295d 100644 --- a/src/methods/indexed-db.js +++ b/src/methods/indexed-db.js @@ -90,7 +90,7 @@ export function createDatabase(channelName) { * so other readers can find it */ export function writeMessage(db, readerUuid, messageJson) { - const time = new Date().getTime(); + const time = Date.now(); const writeObject = { uuid: readerUuid, time, @@ -203,7 +203,7 @@ export function removeMessagesById(channelState, ids) { } export function getOldMessages(db, ttl) { - const olderThen = new Date().getTime() - ttl; + const olderThen = Date.now() - ttl; const tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS); const objectStore = tx.objectStore(OBJECT_STORE_ID); const ret = []; diff --git a/src/methods/localstorage.js b/src/methods/localstorage.js index 0f052f04..18aa7b8a 100644 --- a/src/methods/localstorage.js +++ b/src/methods/localstorage.js @@ -56,7 +56,7 @@ export function postMessage(channelState, messageJson) { const key = storageKey(channelState.channelName); const writeObj = { token: randomToken(), - time: new Date().getTime(), + time: Date.now(), data: messageJson, uuid: channelState.uuid }; diff --git a/src/util.js b/src/util.js index 6f11cb3e..5737ccad 100644 --- a/src/util.js +++ b/src/util.js @@ -38,7 +38,7 @@ let additional = 0; * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ export function microSeconds() { - const ms = new Date().getTime(); + const ms = Date.now(); if (ms === lastMs) { additional++; return ms * 1000 + additional; From d4203964c199ae16c4a735b233d5cb0c08df9e85 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Mon, 23 Oct 2023 15:13:37 +0200 Subject: [PATCH 46/82] 5.5.1 --- CHANGELOG.md | 2 ++ dist/es5node/methods/indexed-db.js | 4 ++-- dist/es5node/methods/localstorage.js | 2 +- dist/es5node/util.js | 2 +- dist/esbrowser/methods/indexed-db.js | 4 ++-- dist/esbrowser/methods/localstorage.js | 2 +- dist/esbrowser/util.js | 2 +- dist/esnode/methods/indexed-db.js | 4 ++-- dist/esnode/methods/localstorage.js | 2 +- dist/esnode/util.js | 2 +- dist/lib/browser.js | 8 ++++---- dist/lib/browser.min.js | 2 +- dist/lib/methods/indexed-db.js | 4 ++-- dist/lib/methods/localstorage.js | 2 +- dist/lib/util.js | 2 +- docs/e2e.js | 8 ++++---- docs/iframe.js | 8 ++++---- docs/index.js | 8 ++++---- docs/leader-iframe.js | 8 ++++---- docs/worker.js | 8 ++++---- package.json | 2 +- 21 files changed, 44 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e30d00f..e38c004d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## X.X.X (comming soon) +## 5.5.1 (23 October 2023) + - REPLACE `new Date().getTime()` with `Date.now()` which is faster ## 5.5.0 (17 October 2023) diff --git a/dist/es5node/methods/indexed-db.js b/dist/es5node/methods/indexed-db.js index 0a6e499c..270798e8 100644 --- a/dist/es5node/methods/indexed-db.js +++ b/dist/es5node/methods/indexed-db.js @@ -99,7 +99,7 @@ function createDatabase(channelName) { * so other readers can find it */ function writeMessage(db, readerUuid, messageJson) { - var time = new Date().getTime(); + var time = Date.now(); var writeObject = { uuid: readerUuid, time: time, @@ -206,7 +206,7 @@ function removeMessagesById(channelState, ids) { })); } function getOldMessages(db, ttl) { - var olderThen = new Date().getTime() - ttl; + var olderThen = Date.now() - ttl; var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS); var objectStore = tx.objectStore(OBJECT_STORE_ID); var ret = []; diff --git a/dist/es5node/methods/localstorage.js b/dist/es5node/methods/localstorage.js index 60ca6d1c..a6fe3d46 100644 --- a/dist/es5node/methods/localstorage.js +++ b/dist/es5node/methods/localstorage.js @@ -62,7 +62,7 @@ function postMessage(channelState, messageJson) { var key = storageKey(channelState.channelName); var writeObj = { token: (0, _util.randomToken)(), - time: new Date().getTime(), + time: Date.now(), data: messageJson, uuid: channelState.uuid }; diff --git a/dist/es5node/util.js b/dist/es5node/util.js index d0a1d4b3..7a81b411 100644 --- a/dist/es5node/util.js +++ b/dist/es5node/util.js @@ -48,7 +48,7 @@ var additional = 0; * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ function microSeconds() { - var ms = new Date().getTime(); + var ms = Date.now(); if (ms === lastMs) { additional++; return ms * 1000 + additional; diff --git a/dist/esbrowser/methods/indexed-db.js b/dist/esbrowser/methods/indexed-db.js index e8a981dd..66495b16 100644 --- a/dist/esbrowser/methods/indexed-db.js +++ b/dist/esbrowser/methods/indexed-db.js @@ -76,7 +76,7 @@ export function createDatabase(channelName) { * so other readers can find it */ export function writeMessage(db, readerUuid, messageJson) { - var time = new Date().getTime(); + var time = Date.now(); var writeObject = { uuid: readerUuid, time: time, @@ -183,7 +183,7 @@ export function removeMessagesById(channelState, ids) { })); } export function getOldMessages(db, ttl) { - var olderThen = new Date().getTime() - ttl; + var olderThen = Date.now() - ttl; var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS); var objectStore = tx.objectStore(OBJECT_STORE_ID); var ret = []; diff --git a/dist/esbrowser/methods/localstorage.js b/dist/esbrowser/methods/localstorage.js index 863b9751..1a863d71 100644 --- a/dist/esbrowser/methods/localstorage.js +++ b/dist/esbrowser/methods/localstorage.js @@ -44,7 +44,7 @@ export function postMessage(channelState, messageJson) { var key = storageKey(channelState.channelName); var writeObj = { token: randomToken(), - time: new Date().getTime(), + time: Date.now(), data: messageJson, uuid: channelState.uuid }; diff --git a/dist/esbrowser/util.js b/dist/esbrowser/util.js index aaba7085..697cd8fc 100644 --- a/dist/esbrowser/util.js +++ b/dist/esbrowser/util.js @@ -36,7 +36,7 @@ var additional = 0; * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ export function microSeconds() { - var ms = new Date().getTime(); + var ms = Date.now(); if (ms === lastMs) { additional++; return ms * 1000 + additional; diff --git a/dist/esnode/methods/indexed-db.js b/dist/esnode/methods/indexed-db.js index e8a981dd..66495b16 100644 --- a/dist/esnode/methods/indexed-db.js +++ b/dist/esnode/methods/indexed-db.js @@ -76,7 +76,7 @@ export function createDatabase(channelName) { * so other readers can find it */ export function writeMessage(db, readerUuid, messageJson) { - var time = new Date().getTime(); + var time = Date.now(); var writeObject = { uuid: readerUuid, time: time, @@ -183,7 +183,7 @@ export function removeMessagesById(channelState, ids) { })); } export function getOldMessages(db, ttl) { - var olderThen = new Date().getTime() - ttl; + var olderThen = Date.now() - ttl; var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS); var objectStore = tx.objectStore(OBJECT_STORE_ID); var ret = []; diff --git a/dist/esnode/methods/localstorage.js b/dist/esnode/methods/localstorage.js index 863b9751..1a863d71 100644 --- a/dist/esnode/methods/localstorage.js +++ b/dist/esnode/methods/localstorage.js @@ -44,7 +44,7 @@ export function postMessage(channelState, messageJson) { var key = storageKey(channelState.channelName); var writeObj = { token: randomToken(), - time: new Date().getTime(), + time: Date.now(), data: messageJson, uuid: channelState.uuid }; diff --git a/dist/esnode/util.js b/dist/esnode/util.js index aaba7085..697cd8fc 100644 --- a/dist/esnode/util.js +++ b/dist/esnode/util.js @@ -36,7 +36,7 @@ var additional = 0; * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ export function microSeconds() { - var ms = new Date().getTime(); + var ms = Date.now(); if (ms === lastMs) { additional++; return ms * 1000 + additional; diff --git a/dist/lib/browser.js b/dist/lib/browser.js index e9e431f0..9a5ae61f 100644 --- a/dist/lib/browser.js +++ b/dist/lib/browser.js @@ -943,7 +943,7 @@ function createDatabase(channelName) { * so other readers can find it */ function writeMessage(db, readerUuid, messageJson) { - var time = new Date().getTime(); + var time = Date.now(); var writeObject = { uuid: readerUuid, time: time, @@ -1050,7 +1050,7 @@ function removeMessagesById(channelState, ids) { })); } function getOldMessages(db, ttl) { - var olderThen = new Date().getTime() - ttl; + var olderThen = Date.now() - ttl; var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS); var objectStore = tx.objectStore(OBJECT_STORE_ID); var ret = []; @@ -1275,7 +1275,7 @@ function postMessage(channelState, messageJson) { var key = storageKey(channelState.channelName); var writeObj = { token: (0, _util.randomToken)(), - time: new Date().getTime(), + time: Date.now(), data: messageJson, uuid: channelState.uuid }; @@ -1607,7 +1607,7 @@ var additional = 0; * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ function microSeconds() { - var ms = new Date().getTime(); + var ms = Date.now(); if (ms === lastMs) { additional++; return ms * 1000 + additional; diff --git a/dist/lib/browser.min.js b/dist/lib/browser.min.js index bb35e749..6b287c76 100644 --- a/dist/lib/browser.min.js +++ b/dist/lib/browser.min.js @@ -1 +1 @@ -!function o(r,i,s){function a(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return a(r[t][1][e]||e)},n,n.exports,o,r,i,s)}return i[t].exports}for(var u="function"==typeof require&&require,e=0;e=t&&e.fn(n.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function f(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!l(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}e._pubkey=!0,e.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return c(this,"message",e)},postInternal:function(e){return c(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};f(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,d(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();d(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});f(this,e,n)},close:function(){var e,t=this;if(!this.closed)return a.delete(this),this.closed=!0,e=this._prepP||r.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:19}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;var o=e("./util.js"),r=e("./leader-election-util.js");(n.LeaderElectionWebLock=function(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,o.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,u.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,u.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,u.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,u.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=y,n.cleanOldMessages=v,n.close=g,n.commitIndexedDBTransaction=d,n.create=_,n.createDatabase=u,n.getAllMessages=function(e){var n=e.transaction(c,"readonly",l),o=n.objectStore(c),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=L,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=n.microSeconds=r.microSeconds,o="pubkey.broadcast-channel-0-",c="messages",l=n.TRANSACTION_SETTINGS={durability:"relaxed"};n.type="idb";function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function u(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(c,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:(new Date).getTime(),data:n},r=e.transaction([c],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(c).add(o),d(r)})}function h(e,o){var r,i=e.transaction(c,"readonly",l),s=i.objectStore(c),a=[],u=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(u),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return u=IDBKeyRange.bound(o+1,1/0),s.openCursor(u)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time=t&&e.fn(n.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function f(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!l(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}e._pubkey=!0,e.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return c(this,"message",e)},postInternal:function(e){return c(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};f(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,d(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();d(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});f(this,e,n)},close:function(){var e,t=this;if(!this.closed)return a.delete(this),this.closed=!0,e=this._prepP||r.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:19}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;var o=e("./util.js"),r=e("./leader-election-util.js");(n.LeaderElectionWebLock=function(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,o.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,u.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,u.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,u.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,u.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=y,n.cleanOldMessages=v,n.close=g,n.commitIndexedDBTransaction=d,n.create=_,n.createDatabase=u,n.getAllMessages=function(e){var n=e.transaction(c,"readonly",l),o=n.objectStore(c),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=L,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=n.microSeconds=r.microSeconds,o="pubkey.broadcast-channel-0-",c="messages",l=n.TRANSACTION_SETTINGS={durability:"relaxed"};n.type="idb";function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function u(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(c,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:Date.now(),data:n},r=e.transaction([c],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(c).add(o),d(r)})}function h(e,o){var r,i=e.transaction(c,"readonly",l),s=i.objectStore(c),a=[],u=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(u),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return u=IDBKeyRange.bound(o+1,1/0),s.openCursor(u)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time Date: Mon, 23 Oct 2023 13:13:52 +0000 Subject: [PATCH 47/82] chore(deps): update actions/setup-node action to v3.8.2 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3570f6f2..0599dd52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,7 +93,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v3.8.1 + uses: actions/setup-node@v3.8.2 with: node-version: ${{ matrix.node }} From eb698747548e79a8e56fdccde896e4f718b66732 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 16:40:44 +0000 Subject: [PATCH 48/82] chore(deps): update dependency async-test-util to v2.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 39007aa9..9efd0f63 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "@babel/types": "7.23.0", "@types/core-js": "2.5.7", "assert": "2.1.0", - "async-test-util": "2.1.1", + "async-test-util": "2.2.0", "browserify": "17.0.0", "child-process-promise": "2.2.1", "clone": "2.1.2", From a476cbf171060011e255558032dd27cd2e632a56 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 16:51:31 +0000 Subject: [PATCH 49/82] chore(deps): update dependency async-test-util to v2.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9efd0f63..b6042302 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "@babel/types": "7.23.0", "@types/core-js": "2.5.7", "assert": "2.1.0", - "async-test-util": "2.2.0", + "async-test-util": "2.2.1", "browserify": "17.0.0", "child-process-promise": "2.2.1", "clone": "2.1.2", From c4e83b1387bb906410d8d7e98eef9c9939e9e2d4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 01:13:51 +0200 Subject: [PATCH 50/82] chore(deps): update actions/setup-node action to v4 (#1285) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0599dd52..20949a2f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,7 +93,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v3.8.2 + uses: actions/setup-node@v4.0.0 with: node-version: ${{ matrix.node }} From d0acfd5bb255e02c70bc6931ae559d89858b97da Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 15:46:23 +0000 Subject: [PATCH 51/82] fix(deps): update dependency oblivious-set to v1.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b6042302..d6ecded2 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ ], "dependencies": { "@babel/runtime": "7.23.2", - "oblivious-set": "1.1.1", + "oblivious-set": "1.4.0", "p-queue": "6.6.2", "unload": "2.4.1" }, From a90c818b4eaed7507e6ce48d050b6795499935e7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 28 Oct 2023 10:57:02 +0000 Subject: [PATCH 52/82] chore(deps): update dependency rollup to v4.1.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d6ecded2..c7631288 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.5", - "rollup": "4.1.4", + "rollup": "4.1.5", "@rollup/plugin-terser": "0.4.4", "testcafe": "3.3.0", "ts-node": "10.9.1", From eedab933e3131ec164a697bf85bf33a99299e62b Mon Sep 17 00:00:00 2001 From: Daniel Meyer <8926560+pubkey@users.noreply.github.com> Date: Mon, 30 Oct 2023 03:22:02 +0100 Subject: [PATCH 53/82] Feature/deno (#1288) * ADD deno support * ADD deno support * ADD docs * FIX lint * FIX test * UPDATE node * FIX check * FIX tests * CLEAR cache * PIN node version --- .github/README.md | 8 ++-- .github/workflows/main.yml | 75 +++++++++++++++++++++++++++++++++++--- CHANGELOG.md | 2 + README.md | 2 +- package.json | 12 +++++- src/methods/native.js | 9 +++++ test/test-deno.js | 34 +++++++++++++++++ 7 files changed, 129 insertions(+), 13 deletions(-) create mode 100644 test/test-deno.js diff --git a/.github/README.md b/.github/README.md index f48a3b00..06f8a1b5 100644 --- a/.github/README.md +++ b/.github/README.md @@ -7,7 +7,7 @@

BroadcastChannel

- A BroadcastChannel to send data across multiple browser-tabs or nodejs-processes + A BroadcastChannel to send data across multiple browser-tabs or nodejs-processes or Deno-Deploy-Instances
+ LeaderElection over the channels

@@ -22,7 +22,7 @@ * * * -A BroadcastChannel that allows you to send data between different browser-tabs or nodejs-processes. +A BroadcastChannel that allows you to send data between different browser-tabs or nodejs-processes or Deno-Deploy-Instances. - It works completely **client-side** and **offline**, - Tested on **old browsers**, **new browsers**, **WebWorkers**, **Iframes** and **NodeJs**. @@ -188,7 +188,7 @@ Depending in which environment this is used, a proper method is automatically se | Method | Used in | Description | | ---------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Native** | [Modern Browsers](https://caniuse.com/broadcastchannel) | If the browser supports the BroadcastChannel-API, this method will be used because it is the fastest | +| **Native** | [Modern Browsers](https://caniuse.com/broadcastchannel) | If the browser supports the BroadcastChannel-API, this method will be used because it is the fastest. This is also used in Deno runtimes. | | **IndexedDB** | [Browsers with WebWorkers](https://caniuse.com/#feat=indexeddb) | If there is no native BroadcastChannel support, the IndexedDB method is used because it supports messaging between browser-tabs, iframes and WebWorkers | | **LocalStorage** | [Older Browsers](https://caniuse.com/#feat=namevalue-storage) | In older browsers that do not support IndexedDb, a localstorage-method is used | | **Sockets** | NodeJs | In NodeJs the communication is handled by sockets that send each other messages | @@ -282,7 +282,7 @@ This module is optimised for: - This is not a polyfill. Do not set this module to `window.BroadcastChannel`. This implementation behaves similiar to the [BroadcastChannel-Standard](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API) with these limitations: - You can only send data that can be `JSON.stringify`-ed, - While the offical API emits [onmessage-events](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessage), this module directly emitts the data which was posted. -- This is not a replacement for a message queue. If you use this in NodeJs and want send more than 50 messages per second, you should use proper [IPC-Tooling](https://en.wikipedia.org/wiki/Message_queue). +- This is not a replacement for a message queue. If you use this in NodeJs or Deno and want send more than 50 messages per second, you should use proper [IPC-Tooling](https://en.wikipedia.org/wiki/Message_queue). ## Browser Support diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 20949a2f..105b77a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,11 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +# https://stackoverflow.com/a/72408109/3443137 +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" @@ -24,6 +29,10 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 + - name: Setup Node.js environment + uses: actions/setup-node@v4.0.0 + with: + node-version: '20.9.0' # https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows - name: Reuse npm cache folder @@ -37,10 +46,10 @@ jobs: ./node_modules ./test-electron/node_modules # invalidate cache when any package.json changes - key: ${{ runner.os }}-npm-x1-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + key: ${{ runner.os }}-npm-x2-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} restore-keys: | - ${{ runner.os }}-npm-x1-${{ env.cache-name }}- - ${{ runner.os }}-npm-x1- + ${{ runner.os }}-npm-x2-${{ env.cache-name }}- + ${{ runner.os }}-npm-x2- ${{ runner.os }}- # install @@ -89,7 +98,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - node: ['17.3.0', '18.12.1'] + node: ['18.18.2', '20.9.0'] steps: - uses: actions/checkout@v4 - name: Setup Node.js environment @@ -108,9 +117,9 @@ jobs: ./node_modules ./test-electron/node_modules # invalidate cache when any package.json changes - key: ${{ runner.os }}-npm-test-node-x1-${{ matrix.node }}-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + key: ${{ runner.os }}-npm-test-node-x2-${{ matrix.node }}-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} restore-keys: | - ${{ runner.os }}-npm-test-node-x1-${{ matrix.node }}-${{ env.cache-name }}- + ${{ runner.os }}-npm-test-node-x2-${{ matrix.node }}-${{ env.cache-name }}- ${{ runner.os }}-npm-test-node ${{ runner.os }}-test-node @@ -124,6 +133,60 @@ jobs: run: npm run test:node + test-deno: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Setup Node.js environment + uses: actions/setup-node@v4.0.0 + with: + node-version: '20.9.0' + + # https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows + - name: Reuse npm cache folder + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: | + ~/.npm + ./node_modules + ./test-electron/node_modules + # invalidate cache when any package.json changes + key: ${{ runner.os }}-npm-test-deno-x2-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + restore-keys: | + ${{ runner.os }}-npm-test-deno-x2-${{ env.cache-name }}- + ${{ runner.os }}-npm-test-deno + ${{ runner.os }}-test-deno + + - name: install node modules + run: npm install --legacy-peer-deps + + - name: build + run: npm run build + + - name: Reuse deno cache folder + uses: actions/cache@v3 + env: + cache-name: cache-deno-modules + with: + path: | + /home/runner/.cache/deno + # do not cache based on package.json because deno install randomly fails + # and it would then never succeed on the first run on dependency updateds + key: ${{ runner.os }}-deno-x2- + + - uses: denoland/setup-deno@v1 + with: + # https://github.com/denoland/deno/releases + deno-version: "1.37.2" + - name: run deno tests + run: | + sudo npm i -g cross-env + deno info + npm run test:deno + + # TODO this does not work atm. fix this. # - name: test electron # uses: GabrielBB/xvfb-action@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index e38c004d..438b758c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## X.X.X (comming soon) +- ADD support for the Deno runtime + ## 5.5.1 (23 October 2023) - REPLACE `new Date().getTime()` with `Date.now()` which is faster diff --git a/README.md b/README.md index 6727879d..2dd9184d 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@

BroadcastChannel

- A BroadcastChannel that works in old browsers, new browsers, WebWorkers and NodeJs + A BroadcastChannel that works in old browsers, new browsers, WebWorkers and NodeJs and Deno
+ LeaderElection over the channels

diff --git a/package.json b/package.json index c7631288..17491ae6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "broadcast-channel", "version": "5.5.1", - "description": "A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers and NodeJs and iframes", + "description": "A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers, NodeJs, Deno and iframes", "exports": { ".": { "node": { @@ -9,6 +9,11 @@ "import": "./dist/esnode/index.js", "default": "./dist/es5node/index.js" }, + "deno": { + "types": "./types/index.d.ts", + "import": "./dist/esbrowser/index.js", + "default": "./dist/lib/index.js" + }, "browser": { "types": "./types/index.d.ts", "import": "./dist/esbrowser/index.js", @@ -34,7 +39,9 @@ "postMessage", "crosstab", "ipc", - "leader-election" + "leader-election", + "queue", + "inter-process" ], "repository": { "type": "git", @@ -58,6 +65,7 @@ "test:module:cjs": "npm run build:es5node && mocha ./test/module.cjs.test.js -b --timeout 6000 --exit", "test:node": "npm run build:es5node && mocha ./test/index.test.js -b --timeout 6000 --exit", "test:node:loop": "npm run test:node && npm run test:node:loop", + "test:deno": "deno run --allow-env --unstable ./test/test-deno.js", "test:browser": "npm run build && karma start ./config/karma.conf.js --single-run", "test:e2e": "concurrently \"npm run docs:serve\" \"sleep 20 && testcafe -b && testcafe chrome -e test/e2e.test.js --hostname localhost\" --kill-others --success first", "test:typings": "npm run build && mocha ./test/typings.test.js -b --timeout 12000 --exit", diff --git a/src/methods/native.js b/src/methods/native.js index d06862b7..fa14d229 100644 --- a/src/methods/native.js +++ b/src/methods/native.js @@ -1,3 +1,4 @@ + import { microSeconds as micro, PROMISE_RESOLVED_VOID @@ -42,6 +43,14 @@ export function onMessage(channelState, fn) { } export function canBeUsed() { + + // Deno runtime + // eslint-disable-next-line + if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) { + return true; + } + + // Browser runtime if ( (typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function' diff --git a/test/test-deno.js b/test/test-deno.js new file mode 100644 index 00000000..9aa974fb --- /dev/null +++ b/test/test-deno.js @@ -0,0 +1,34 @@ +import { BroadcastChannel } from '../dist/esbrowser/index.js'; +import { randomString } from 'async-test-util'; +import assert from 'assert'; +export async function run() { + + console.log('--- 1'); + + console.dir({ + // eslint-disable-next-line + 'globalThis.Deno': !!globalThis.Deno, + // eslint-disable-next-line + 'globalThis.Deno.args': !!globalThis.Deno.args + }); + console.log('--- 2'); + // eslint-disable-next-line + console.log(Object.keys(Deno).sort().join(', ')); + + console.log('--- 3'); + + + const bc = new BroadcastChannel(randomString()); + console.log('bc.type: ' + bc.type); + + + /** + * Deno should use its global native BroadcastChannel + * @link https://docs.deno.com/deploy/api/runtime-broadcast-channel + */ + assert.strictEqual(bc.type, 'native'); + + await bc.postMessage({ foo: 'bar' }); + await bc.close(); +} +run(); From 190aeac0c6c20ad960131f66ba53c7a8af4535e9 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Mon, 30 Oct 2023 03:25:01 +0100 Subject: [PATCH 54/82] 6.0.0 --- CHANGELOG.md | 2 + dist/es5node/methods/native.js | 7 + dist/esbrowser/methods/native.js | 7 + dist/esnode/methods/native.js | 7 + dist/lib/browser.js | 99 +++++++++---- dist/lib/browser.min.js | 2 +- dist/lib/methods/native.js | 7 + docs/e2e.js | 241 ++++++++++++++++++++----------- docs/iframe.js | 107 +++++++++----- docs/index.js | 105 +++++++++----- docs/leader-iframe.js | 107 +++++++++----- docs/worker.js | 239 ++++++++++++++++++++---------- package.json | 2 +- 13 files changed, 630 insertions(+), 302 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 438b758c..d6655f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## X.X.X (comming soon) +## 6.0.0 (30 October 2023) + - ADD support for the Deno runtime ## 5.5.1 (23 October 2023) diff --git a/dist/es5node/methods/native.js b/dist/es5node/methods/native.js index 0f656ca2..0ae3d2c1 100644 --- a/dist/es5node/methods/native.js +++ b/dist/es5node/methods/native.js @@ -45,6 +45,13 @@ function onMessage(channelState, fn) { channelState.messagesCallback = fn; } function canBeUsed() { + // Deno runtime + // eslint-disable-next-line + if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) { + return true; + } + + // Browser runtime if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') { if (BroadcastChannel._pubkey) { throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill'); diff --git a/dist/esbrowser/methods/native.js b/dist/esbrowser/methods/native.js index cd27da13..6c1bbf88 100644 --- a/dist/esbrowser/methods/native.js +++ b/dist/esbrowser/methods/native.js @@ -31,6 +31,13 @@ export function onMessage(channelState, fn) { channelState.messagesCallback = fn; } export function canBeUsed() { + // Deno runtime + // eslint-disable-next-line + if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) { + return true; + } + + // Browser runtime if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') { if (BroadcastChannel._pubkey) { throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill'); diff --git a/dist/esnode/methods/native.js b/dist/esnode/methods/native.js index cd27da13..6c1bbf88 100644 --- a/dist/esnode/methods/native.js +++ b/dist/esnode/methods/native.js @@ -31,6 +31,13 @@ export function onMessage(channelState, fn) { channelState.messagesCallback = fn; } export function canBeUsed() { + // Deno runtime + // eslint-disable-next-line + if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) { + return true; + } + + // Browser runtime if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') { if (BroadcastChannel._pubkey) { throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill'); diff --git a/dist/lib/browser.js b/dist/lib/browser.js index 9a5ae61f..13b5d399 100644 --- a/dist/lib/browser.js +++ b/dist/lib/browser.js @@ -397,7 +397,7 @@ function beLeader(leaderElector) { leaderElector._lstns.push(isLeaderListener); return sendLeaderMessage(leaderElector, 'tell'); } -},{"unload":19}],6:[function(require,module,exports){ +},{"unload":20}],6:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1428,6 +1428,13 @@ function onMessage(channelState, fn) { channelState.messagesCallback = fn; } function canBeUsed() { + // Deno runtime + // eslint-disable-next-line + if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) { + return true; + } + + // Browser runtime if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') { if (BroadcastChannel._pubkey) { throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill'); @@ -1642,6 +1649,35 @@ function _typeof(o) { module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],16:[function(require,module,exports){ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const pkg = __importStar(require("./index.js")); +module.exports = pkg; + +},{"./index.js":17}],17:[function(require,module,exports){ +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; /** @@ -1649,21 +1685,21 @@ exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; * a given entry when a new entry is set and the ttl * of the old one is over */ -var ObliviousSet = /** @class */ (function () { - function ObliviousSet(ttl) { +class ObliviousSet { + ttl; + map = new Map(); + /** + * Creating calls to setTimeout() is expensive, + * so we only do that if there is not timeout already open. + */ + _to = false; + constructor(ttl) { this.ttl = ttl; - this.map = new Map(); - /** - * Creating calls to setTimeout() is expensive, - * so we only do that if there is not timeout already open. - */ - this._to = false; } - ObliviousSet.prototype.has = function (value) { + has(value) { return this.map.has(value); - }; - ObliviousSet.prototype.add = function (value) { - var _this = this; + } + add(value) { this.map.set(value, now()); /** * When a new value is added, @@ -1673,36 +1709,35 @@ var ObliviousSet = /** @class */ (function () { */ if (!this._to) { this._to = true; - setTimeout(function () { - _this._to = false; - removeTooOldValues(_this); + setTimeout(() => { + this._to = false; + removeTooOldValues(this); }, 0); } - }; - ObliviousSet.prototype.clear = function () { + } + clear() { this.map.clear(); - }; - return ObliviousSet; -}()); + } +} exports.ObliviousSet = ObliviousSet; /** * Removes all entries from the set * where the TTL has expired */ function removeTooOldValues(obliviousSet) { - var olderThen = now() - obliviousSet.ttl; - var iterator = obliviousSet.map[Symbol.iterator](); + const olderThen = now() - obliviousSet.ttl; + const iterator = obliviousSet.map[Symbol.iterator](); /** * Because we can assume the new values are added at the bottom, * we start from the top and stop as soon as we reach a non-too-old value. */ while (true) { - var next = iterator.next().value; + const next = iterator.next().value; if (!next) { return; // no more elements } - var value = next[0]; - var time = next[1]; + const value = next[0]; + const time = next[1]; if (time < olderThen) { obliviousSet.map.delete(value); } @@ -1714,11 +1749,11 @@ function removeTooOldValues(obliviousSet) { } exports.removeTooOldValues = removeTooOldValues; function now() { - return new Date().getTime(); + return Date.now(); } exports.now = now; -},{}],17:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -1904,7 +1939,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],18:[function(require,module,exports){ +},{}],19:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1956,7 +1991,7 @@ function addBrowser(fn) { * @link https://stackoverflow.com/a/26193516/3443137 */ } -},{}],19:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -2017,7 +2052,7 @@ function getSize() { return LISTENERS.size; } }).call(this)}).call(this,require('_process')) -},{"./browser.js":18,"./node.js":20,"_process":17}],20:[function(require,module,exports){ +},{"./browser.js":19,"./node.js":21,"_process":18}],21:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -2056,4 +2091,4 @@ function addNode(fn) { }); } }).call(this)}).call(this,require('_process')) -},{"_process":17}]},{},[2]); +},{"_process":18}]},{},[2]); diff --git a/dist/lib/browser.min.js b/dist/lib/browser.min.js index 6b287c76..7e09252a 100644 --- a/dist/lib/browser.min.js +++ b/dist/lib/browser.min.js @@ -1 +1 @@ -!function o(r,i,s){function a(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return a(r[t][1][e]||e)},n,n.exports,o,r,i,s)}return i[t].exports}for(var u="function"==typeof require&&require,e=0;e=t&&e.fn(n.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function f(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!l(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}e._pubkey=!0,e.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return c(this,"message",e)},postInternal:function(e){return c(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};f(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,d(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();d(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});f(this,e,n)},close:function(){var e,t=this;if(!this.closed)return a.delete(this),this.closed=!0,e=this._prepP||r.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:19}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;var o=e("./util.js"),r=e("./leader-election-util.js");(n.LeaderElectionWebLock=function(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,o.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,u.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,u.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,u.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,u.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=y,n.cleanOldMessages=v,n.close=g,n.commitIndexedDBTransaction=d,n.create=_,n.createDatabase=u,n.getAllMessages=function(e){var n=e.transaction(c,"readonly",l),o=n.objectStore(c),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=L,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=n.microSeconds=r.microSeconds,o="pubkey.broadcast-channel-0-",c="messages",l=n.TRANSACTION_SETTINGS={durability:"relaxed"};n.type="idb";function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function u(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(c,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:Date.now(),data:n},r=e.transaction([c],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(c).add(o),d(r)})}function h(e,o){var r,i=e.transaction(c,"readonly",l),s=i.objectStore(c),a=[],u=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(u),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return u=IDBKeyRange.bound(o+1,1/0),s.openCursor(u)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time=t&&e.fn(n.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function f(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!l(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}e._pubkey=!0,e.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return c(this,"message",e)},postInternal:function(e){return c(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};f(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,d(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();d(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});f(this,e,n)},close:function(){var e,t=this;if(!this.closed)return a.delete(this),this.closed=!0,e=this._prepP||r.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:20}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;var o=e("./util.js"),r=e("./leader-election-util.js");(n.LeaderElectionWebLock=function(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,o.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,u.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,u.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,u.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,u.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=L,n.cleanOldMessages=v,n.close=g,n.commitIndexedDBTransaction=d,n.create=_,n.createDatabase=u,n.getAllMessages=function(e){var n=e.transaction(c,"readonly",l),o=n.objectStore(c),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=y,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=n.microSeconds=r.microSeconds,o="pubkey.broadcast-channel-0-",c="messages",l=n.TRANSACTION_SETTINGS={durability:"relaxed"};n.type="idb";function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function u(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(c,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:Date.now(),data:n},r=e.transaction([c],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(c).add(o),d(r)})}function h(e,o){var r,i=e.transaction(c,"readonly",l),s=i.objectStore(c),a=[],u=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(u),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return u=IDBKeyRange.bound(o+1,1/0),s.openCursor(u)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time{this._to=!1,o(this)},0))}clear(){this.map.clear()}},n.removeTooOldValues=o,n.now=i},{}],18:[function(e,t,n){var o,r,t=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}try{o="function"==typeof setTimeout?setTimeout:i}catch(e){o=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}function a(t){if(o===setTimeout)return setTimeout(t,0);if((o===i||!o)&&setTimeout)return(o=setTimeout)(t,0);try{return o(t,0)}catch(e){try{return o.call(null,t,0)}catch(e){return o.call(this,t,0)}}}var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length)&&h()}function h(){if(!l){for(var e=a(f),t=(l=!0,c.length);t;){for(u=c,c=[];++d p is keyof o} */ +module.exports = bind.call(call, $hasOwn); -},{}],367:[function(require,module,exports){ +},{"function-bind":356}],367:[function(require,module,exports){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m @@ -12822,7 +12826,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { 'use strict'; var GetIntrinsic = require('get-intrinsic'); -var has = require('has'); +var hasOwn = require('hasown'); var channel = require('side-channel')(); var $TypeError = GetIntrinsic('%TypeError%'); @@ -12858,7 +12862,7 @@ var SLOT = { throw new $TypeError('`slot` must be a string'); } var slots = channel.get(O); - return !!slots && has(slots, '$' + slot); + return !!slots && hasOwn(slots, '$' + slot); }, set: function (O, slot, V) { if (!O || (typeof O !== 'object' && typeof O !== 'function')) { @@ -12882,7 +12886,7 @@ if (Object.freeze) { module.exports = SLOT; -},{"get-intrinsic":358,"has":366,"side-channel":407}],369:[function(require,module,exports){ +},{"get-intrinsic":358,"hasown":366,"side-channel":409}],369:[function(require,module,exports){ 'use strict'; var hasToStringTag = require('has-tostringtag/shams')(); @@ -13209,7 +13213,7 @@ module.exports = exported || function isMap(x) { exports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node); }).call(this)}).call(this,require('_process')) -},{"_process":400}],377:[function(require,module,exports){ +},{"_process":401}],377:[function(require,module,exports){ 'use strict'; var numToStr = Number.prototype.toString; @@ -13434,7 +13438,7 @@ module.exports = function isTypedArray(value) { return !!whichTypedArray(value); }; -},{"which-typed-array":414}],384:[function(require,module,exports){ +},{"which-typed-array":416}],384:[function(require,module,exports){ 'use strict'; var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null; @@ -13766,12 +13770,13 @@ module.exports = function inspect_(obj, options, depth, seen) { if (isString(obj)) { return markBoxed(inspect(String(obj))); } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } if (obj === global) { - /* eslint-env browser */ - if (typeof window !== 'undefined') { - return '{ [object Window] }'; - } - return '{ [object global] }'; + return '{ [object globalThis] }'; } if (!isDate(obj) && !isRegExp(obj)) { var ys = arrObjKeys(obj, inspect); @@ -14440,6 +14445,35 @@ module.exports = function shimAssign() { },{"./polyfill":397,"define-properties":352}],399:[function(require,module,exports){ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const pkg = __importStar(require("./index.js")); +module.exports = pkg; + +},{"./index.js":400}],400:[function(require,module,exports){ +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; /** @@ -14447,21 +14481,21 @@ exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; * a given entry when a new entry is set and the ttl * of the old one is over */ -var ObliviousSet = /** @class */ (function () { - function ObliviousSet(ttl) { +class ObliviousSet { + ttl; + map = new Map(); + /** + * Creating calls to setTimeout() is expensive, + * so we only do that if there is not timeout already open. + */ + _to = false; + constructor(ttl) { this.ttl = ttl; - this.map = new Map(); - /** - * Creating calls to setTimeout() is expensive, - * so we only do that if there is not timeout already open. - */ - this._to = false; } - ObliviousSet.prototype.has = function (value) { + has(value) { return this.map.has(value); - }; - ObliviousSet.prototype.add = function (value) { - var _this = this; + } + add(value) { this.map.set(value, now()); /** * When a new value is added, @@ -14471,36 +14505,35 @@ var ObliviousSet = /** @class */ (function () { */ if (!this._to) { this._to = true; - setTimeout(function () { - _this._to = false; - removeTooOldValues(_this); + setTimeout(() => { + this._to = false; + removeTooOldValues(this); }, 0); } - }; - ObliviousSet.prototype.clear = function () { + } + clear() { this.map.clear(); - }; - return ObliviousSet; -}()); + } +} exports.ObliviousSet = ObliviousSet; /** * Removes all entries from the set * where the TTL has expired */ function removeTooOldValues(obliviousSet) { - var olderThen = now() - obliviousSet.ttl; - var iterator = obliviousSet.map[Symbol.iterator](); + const olderThen = now() - obliviousSet.ttl; + const iterator = obliviousSet.map[Symbol.iterator](); /** * Because we can assume the new values are added at the bottom, * we start from the top and stop as soon as we reach a non-too-old value. */ while (true) { - var next = iterator.next().value; + const next = iterator.next().value; if (!next) { return; // no more elements } - var value = next[0]; - var time = next[1]; + const value = next[0]; + const time = next[1]; if (time < olderThen) { obliviousSet.map.delete(value); } @@ -14512,11 +14545,11 @@ function removeTooOldValues(obliviousSet) { } exports.removeTooOldValues = removeTooOldValues; function now() { - return new Date().getTime(); + return Date.now(); } exports.now = now; -},{}],400:[function(require,module,exports){ +},{}],401:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -14702,7 +14735,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],401:[function(require,module,exports){ +},{}],402:[function(require,module,exports){ /** * Copyright (c) 2014-present, Facebook, Inc. * @@ -15465,7 +15498,7 @@ try { } } -},{}],402:[function(require,module,exports){ +},{}],403:[function(require,module,exports){ 'use strict'; var setFunctionName = require('set-function-name'); @@ -15506,7 +15539,7 @@ module.exports = setFunctionName(function flags() { }, 'get flags', true); -},{"set-function-name":406}],403:[function(require,module,exports){ +},{"set-function-name":408}],404:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -15526,7 +15559,7 @@ define(flagsBound, { module.exports = flagsBound; -},{"./implementation":402,"./polyfill":404,"./shim":405,"call-bind":44,"define-properties":352}],404:[function(require,module,exports){ +},{"./implementation":403,"./polyfill":405,"./shim":406,"call-bind":44,"define-properties":352}],405:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -15564,7 +15597,7 @@ module.exports = function getPolyfill() { return implementation; }; -},{"./implementation":402,"define-properties":352}],405:[function(require,module,exports){ +},{"./implementation":403,"define-properties":352}],406:[function(require,module,exports){ 'use strict'; var supportsDescriptors = require('define-properties').supportsDescriptors; @@ -15592,7 +15625,50 @@ module.exports = function shimFlags() { return polyfill; }; -},{"./polyfill":404,"define-properties":352}],406:[function(require,module,exports){ +},{"./polyfill":405,"define-properties":352}],407:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var gOPD = require('gopd'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $floor = GetIntrinsic('%Math.floor%'); + +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(fn, 'length', length, true, true); + } else { + define(fn, 'length', length); + } + } + return fn; +}; + +},{"define-data-property":351,"get-intrinsic":358,"gopd":359,"has-property-descriptors":361}],408:[function(require,module,exports){ 'use strict'; var define = require('define-data-property'); @@ -15616,7 +15692,7 @@ module.exports = function setFunctionName(fn, name) { return fn; }; -},{"define-data-property":351,"functions-have-names":357,"has-property-descriptors":361}],407:[function(require,module,exports){ +},{"define-data-property":351,"functions-have-names":357,"has-property-descriptors":361}],409:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -15742,7 +15818,7 @@ module.exports = function getSideChannel() { return channel; }; -},{"call-bind/callBound":43,"get-intrinsic":358,"object-inspect":387}],408:[function(require,module,exports){ +},{"call-bind/callBound":43,"get-intrinsic":358,"object-inspect":387}],410:[function(require,module,exports){ 'use strict'; var SLOT = require('internal-slot'); @@ -15784,7 +15860,7 @@ module.exports = function getStopIterationIterator(origIterator) { return siIterator; }; -},{"internal-slot":368}],409:[function(require,module,exports){ +},{"internal-slot":368}],411:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -15836,7 +15912,7 @@ function addBrowser(fn) { * @link https://stackoverflow.com/a/26193516/3443137 */ } -},{}],410:[function(require,module,exports){ +},{}],412:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -15897,7 +15973,7 @@ function getSize() { return LISTENERS.size; } }).call(this)}).call(this,require('_process')) -},{"./browser.js":409,"./node.js":411,"_process":400}],411:[function(require,module,exports){ +},{"./browser.js":411,"./node.js":413,"_process":401}],413:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -15936,7 +16012,7 @@ function addNode(fn) { }); } }).call(this)}).call(this,require('_process')) -},{"_process":400}],412:[function(require,module,exports){ +},{"_process":401}],414:[function(require,module,exports){ 'use strict'; var isString = require('is-string'); @@ -15968,7 +16044,7 @@ module.exports = function whichBoxedPrimitive(value) { } }; -},{"is-bigint":371,"is-boolean-object":372,"is-number-object":377,"is-string":381,"is-symbol":382}],413:[function(require,module,exports){ +},{"is-bigint":371,"is-boolean-object":372,"is-number-object":377,"is-string":381,"is-symbol":382}],415:[function(require,module,exports){ 'use strict'; var isMap = require('is-map'); @@ -15994,7 +16070,7 @@ module.exports = function whichCollection(value) { return false; }; -},{"is-map":375,"is-set":379,"is-weakmap":384,"is-weakset":385}],414:[function(require,module,exports){ +},{"is-map":375,"is-set":379,"is-weakmap":384,"is-weakset":385}],416:[function(require,module,exports){ (function (global){(function (){ 'use strict'; @@ -16038,7 +16114,10 @@ if (hasToStringTag && gOPD && getPrototypeOf) { } else { forEach(typedArrays, function (typedArray) { var arr = new g[typedArray](); - cache['$' + typedArray] = callBind(arr.slice); + var fn = arr.slice || arr.set; + if (fn) { + cache['$' + typedArray] = callBind(fn); + } }); } @@ -16087,7 +16166,7 @@ module.exports = function whichTypedArray(value) { }; }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"available-typed-arrays":39,"call-bind":44,"call-bind/callBound":43,"for-each":354,"gopd":359,"has-tostringtag/shams":365}],415:[function(require,module,exports){ +},{"available-typed-arrays":39,"call-bind":44,"call-bind/callBound":43,"for-each":354,"gopd":359,"has-tostringtag/shams":365}],417:[function(require,module,exports){ "use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); @@ -16461,7 +16540,7 @@ try { console.log('error in run-function:'); console.error(error); } -},{"../../":2,"./util.js":416,"@babel/polyfill":14,"@babel/runtime/helpers/asyncToGenerator":16,"@babel/runtime/helpers/interopRequireDefault":17,"@babel/runtime/regenerator":20,"async-test-util":25}],416:[function(require,module,exports){ +},{"../../":2,"./util.js":418,"@babel/polyfill":14,"@babel/runtime/helpers/asyncToGenerator":16,"@babel/runtime/helpers/interopRequireDefault":17,"@babel/runtime/regenerator":20,"async-test-util":25}],418:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -16480,4 +16559,4 @@ function getParameterByName(name, url) { if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); } -},{}]},{},[415]); +},{}]},{},[417]); diff --git a/docs/iframe.js b/docs/iframe.js index 8e96ffc4..fe7f1ca6 100644 --- a/docs/iframe.js +++ b/docs/iframe.js @@ -389,7 +389,7 @@ function beLeader(leaderElector) { leaderElector._lstns.push(isLeaderListener); return sendLeaderMessage(leaderElector, 'tell'); } -},{"unload":325}],5:[function(require,module,exports){ +},{"unload":326}],5:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1420,6 +1420,13 @@ function onMessage(channelState, fn) { channelState.messagesCallback = fn; } function canBeUsed() { + // Deno runtime + // eslint-disable-next-line + if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) { + return true; + } + + // Browser runtime if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') { if (BroadcastChannel._pubkey) { throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill'); @@ -1665,7 +1672,7 @@ require("core-js/fn/promise/finally"); require("core-js/web"); require("regenerator-runtime/runtime"); -},{"core-js/es6":17,"core-js/fn/array/flat-map":18,"core-js/fn/array/includes":19,"core-js/fn/object/entries":20,"core-js/fn/object/get-own-property-descriptors":21,"core-js/fn/object/values":22,"core-js/fn/promise/finally":23,"core-js/fn/string/pad-end":24,"core-js/fn/string/pad-start":25,"core-js/fn/string/trim-end":26,"core-js/fn/string/trim-start":27,"core-js/fn/symbol/async-iterator":28,"core-js/web":320,"regenerator-runtime/runtime":323}],16:[function(require,module,exports){ +},{"core-js/es6":17,"core-js/fn/array/flat-map":18,"core-js/fn/array/includes":19,"core-js/fn/object/entries":20,"core-js/fn/object/get-own-property-descriptors":21,"core-js/fn/object/values":22,"core-js/fn/promise/finally":23,"core-js/fn/string/pad-end":24,"core-js/fn/string/pad-start":25,"core-js/fn/string/trim-end":26,"core-js/fn/string/trim-start":27,"core-js/fn/symbol/async-iterator":28,"core-js/web":320,"regenerator-runtime/runtime":324}],16:[function(require,module,exports){ function _typeof(o) { "@babel/helpers - typeof"; @@ -8105,6 +8112,35 @@ module.exports = require('../modules/_core'); },{"../modules/_core":66,"../modules/web.dom.iterable":317,"../modules/web.immediate":318,"../modules/web.timers":319}],321:[function(require,module,exports){ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const pkg = __importStar(require("./index.js")); +module.exports = pkg; + +},{"./index.js":322}],322:[function(require,module,exports){ +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; /** @@ -8112,21 +8148,21 @@ exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; * a given entry when a new entry is set and the ttl * of the old one is over */ -var ObliviousSet = /** @class */ (function () { - function ObliviousSet(ttl) { +class ObliviousSet { + ttl; + map = new Map(); + /** + * Creating calls to setTimeout() is expensive, + * so we only do that if there is not timeout already open. + */ + _to = false; + constructor(ttl) { this.ttl = ttl; - this.map = new Map(); - /** - * Creating calls to setTimeout() is expensive, - * so we only do that if there is not timeout already open. - */ - this._to = false; } - ObliviousSet.prototype.has = function (value) { + has(value) { return this.map.has(value); - }; - ObliviousSet.prototype.add = function (value) { - var _this = this; + } + add(value) { this.map.set(value, now()); /** * When a new value is added, @@ -8136,36 +8172,35 @@ var ObliviousSet = /** @class */ (function () { */ if (!this._to) { this._to = true; - setTimeout(function () { - _this._to = false; - removeTooOldValues(_this); + setTimeout(() => { + this._to = false; + removeTooOldValues(this); }, 0); } - }; - ObliviousSet.prototype.clear = function () { + } + clear() { this.map.clear(); - }; - return ObliviousSet; -}()); + } +} exports.ObliviousSet = ObliviousSet; /** * Removes all entries from the set * where the TTL has expired */ function removeTooOldValues(obliviousSet) { - var olderThen = now() - obliviousSet.ttl; - var iterator = obliviousSet.map[Symbol.iterator](); + const olderThen = now() - obliviousSet.ttl; + const iterator = obliviousSet.map[Symbol.iterator](); /** * Because we can assume the new values are added at the bottom, * we start from the top and stop as soon as we reach a non-too-old value. */ while (true) { - var next = iterator.next().value; + const next = iterator.next().value; if (!next) { return; // no more elements } - var value = next[0]; - var time = next[1]; + const value = next[0]; + const time = next[1]; if (time < olderThen) { obliviousSet.map.delete(value); } @@ -8177,11 +8212,11 @@ function removeTooOldValues(obliviousSet) { } exports.removeTooOldValues = removeTooOldValues; function now() { - return new Date().getTime(); + return Date.now(); } exports.now = now; -},{}],322:[function(require,module,exports){ +},{}],323:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -8367,7 +8402,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],323:[function(require,module,exports){ +},{}],324:[function(require,module,exports){ /** * Copyright (c) 2014-present, Facebook, Inc. * @@ -9130,7 +9165,7 @@ try { } } -},{}],324:[function(require,module,exports){ +},{}],325:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -9182,7 +9217,7 @@ function addBrowser(fn) { * @link https://stackoverflow.com/a/26193516/3443137 */ } -},{}],325:[function(require,module,exports){ +},{}],326:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -9243,7 +9278,7 @@ function getSize() { return LISTENERS.size; } }).call(this)}).call(this,require('_process')) -},{"./browser.js":324,"./node.js":326,"_process":322}],326:[function(require,module,exports){ +},{"./browser.js":325,"./node.js":327,"_process":323}],327:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -9282,7 +9317,7 @@ function addNode(fn) { }); } }).call(this)}).call(this,require('_process')) -},{"_process":322}],327:[function(require,module,exports){ +},{"_process":323}],328:[function(require,module,exports){ "use strict"; var _util = require("./util.js"); @@ -9325,7 +9360,7 @@ channel.onmessage = function (msg) { }); } }; -},{"../../":2,"./util.js":328,"@babel/polyfill":14}],328:[function(require,module,exports){ +},{"../../":2,"./util.js":329,"@babel/polyfill":14}],329:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -9344,4 +9379,4 @@ function getParameterByName(name, url) { if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); } -},{}]},{},[327]); +},{}]},{},[328]); diff --git a/docs/index.js b/docs/index.js index f14428a7..421a0dfd 100644 --- a/docs/index.js +++ b/docs/index.js @@ -389,7 +389,7 @@ function beLeader(leaderElector) { leaderElector._lstns.push(isLeaderListener); return sendLeaderMessage(leaderElector, 'tell'); } -},{"unload":325}],5:[function(require,module,exports){ +},{"unload":326}],5:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1420,6 +1420,13 @@ function onMessage(channelState, fn) { channelState.messagesCallback = fn; } function canBeUsed() { + // Deno runtime + // eslint-disable-next-line + if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) { + return true; + } + + // Browser runtime if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') { if (BroadcastChannel._pubkey) { throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill'); @@ -1665,7 +1672,7 @@ require("core-js/fn/promise/finally"); require("core-js/web"); require("regenerator-runtime/runtime"); -},{"core-js/es6":17,"core-js/fn/array/flat-map":18,"core-js/fn/array/includes":19,"core-js/fn/object/entries":20,"core-js/fn/object/get-own-property-descriptors":21,"core-js/fn/object/values":22,"core-js/fn/promise/finally":23,"core-js/fn/string/pad-end":24,"core-js/fn/string/pad-start":25,"core-js/fn/string/trim-end":26,"core-js/fn/string/trim-start":27,"core-js/fn/symbol/async-iterator":28,"core-js/web":320,"regenerator-runtime/runtime":323}],16:[function(require,module,exports){ +},{"core-js/es6":17,"core-js/fn/array/flat-map":18,"core-js/fn/array/includes":19,"core-js/fn/object/entries":20,"core-js/fn/object/get-own-property-descriptors":21,"core-js/fn/object/values":22,"core-js/fn/promise/finally":23,"core-js/fn/string/pad-end":24,"core-js/fn/string/pad-start":25,"core-js/fn/string/trim-end":26,"core-js/fn/string/trim-start":27,"core-js/fn/symbol/async-iterator":28,"core-js/web":320,"regenerator-runtime/runtime":324}],16:[function(require,module,exports){ function _typeof(o) { "@babel/helpers - typeof"; @@ -8105,6 +8112,35 @@ module.exports = require('../modules/_core'); },{"../modules/_core":66,"../modules/web.dom.iterable":317,"../modules/web.immediate":318,"../modules/web.timers":319}],321:[function(require,module,exports){ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const pkg = __importStar(require("./index.js")); +module.exports = pkg; + +},{"./index.js":322}],322:[function(require,module,exports){ +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; /** @@ -8112,21 +8148,21 @@ exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; * a given entry when a new entry is set and the ttl * of the old one is over */ -var ObliviousSet = /** @class */ (function () { - function ObliviousSet(ttl) { +class ObliviousSet { + ttl; + map = new Map(); + /** + * Creating calls to setTimeout() is expensive, + * so we only do that if there is not timeout already open. + */ + _to = false; + constructor(ttl) { this.ttl = ttl; - this.map = new Map(); - /** - * Creating calls to setTimeout() is expensive, - * so we only do that if there is not timeout already open. - */ - this._to = false; } - ObliviousSet.prototype.has = function (value) { + has(value) { return this.map.has(value); - }; - ObliviousSet.prototype.add = function (value) { - var _this = this; + } + add(value) { this.map.set(value, now()); /** * When a new value is added, @@ -8136,36 +8172,35 @@ var ObliviousSet = /** @class */ (function () { */ if (!this._to) { this._to = true; - setTimeout(function () { - _this._to = false; - removeTooOldValues(_this); + setTimeout(() => { + this._to = false; + removeTooOldValues(this); }, 0); } - }; - ObliviousSet.prototype.clear = function () { + } + clear() { this.map.clear(); - }; - return ObliviousSet; -}()); + } +} exports.ObliviousSet = ObliviousSet; /** * Removes all entries from the set * where the TTL has expired */ function removeTooOldValues(obliviousSet) { - var olderThen = now() - obliviousSet.ttl; - var iterator = obliviousSet.map[Symbol.iterator](); + const olderThen = now() - obliviousSet.ttl; + const iterator = obliviousSet.map[Symbol.iterator](); /** * Because we can assume the new values are added at the bottom, * we start from the top and stop as soon as we reach a non-too-old value. */ while (true) { - var next = iterator.next().value; + const next = iterator.next().value; if (!next) { return; // no more elements } - var value = next[0]; - var time = next[1]; + const value = next[0]; + const time = next[1]; if (time < olderThen) { obliviousSet.map.delete(value); } @@ -8177,11 +8212,11 @@ function removeTooOldValues(obliviousSet) { } exports.removeTooOldValues = removeTooOldValues; function now() { - return new Date().getTime(); + return Date.now(); } exports.now = now; -},{}],322:[function(require,module,exports){ +},{}],323:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -8367,7 +8402,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],323:[function(require,module,exports){ +},{}],324:[function(require,module,exports){ /** * Copyright (c) 2014-present, Facebook, Inc. * @@ -9130,7 +9165,7 @@ try { } } -},{}],324:[function(require,module,exports){ +},{}],325:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -9182,7 +9217,7 @@ function addBrowser(fn) { * @link https://stackoverflow.com/a/26193516/3443137 */ } -},{}],325:[function(require,module,exports){ +},{}],326:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -9243,7 +9278,7 @@ function getSize() { return LISTENERS.size; } }).call(this)}).call(this,require('_process')) -},{"./browser.js":324,"./node.js":326,"_process":322}],326:[function(require,module,exports){ +},{"./browser.js":325,"./node.js":327,"_process":323}],327:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -9282,7 +9317,7 @@ function addNode(fn) { }); } }).call(this)}).call(this,require('_process')) -},{"_process":322}],327:[function(require,module,exports){ +},{"_process":323}],328:[function(require,module,exports){ "use strict"; /* eslint-disable */ @@ -9326,4 +9361,4 @@ channel.onmessage = function (message) { console.dir('recieved message: ' + message); addTextToMessageBox('recieved: ' + message); }; -},{"../../":2,"@babel/polyfill":14}]},{},[327]); +},{"../../":2,"@babel/polyfill":14}]},{},[328]); diff --git a/docs/leader-iframe.js b/docs/leader-iframe.js index b4f0d94c..69ebe9ea 100644 --- a/docs/leader-iframe.js +++ b/docs/leader-iframe.js @@ -389,7 +389,7 @@ function beLeader(leaderElector) { leaderElector._lstns.push(isLeaderListener); return sendLeaderMessage(leaderElector, 'tell'); } -},{"unload":325}],5:[function(require,module,exports){ +},{"unload":326}],5:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1420,6 +1420,13 @@ function onMessage(channelState, fn) { channelState.messagesCallback = fn; } function canBeUsed() { + // Deno runtime + // eslint-disable-next-line + if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) { + return true; + } + + // Browser runtime if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') { if (BroadcastChannel._pubkey) { throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill'); @@ -1665,7 +1672,7 @@ require("core-js/fn/promise/finally"); require("core-js/web"); require("regenerator-runtime/runtime"); -},{"core-js/es6":17,"core-js/fn/array/flat-map":18,"core-js/fn/array/includes":19,"core-js/fn/object/entries":20,"core-js/fn/object/get-own-property-descriptors":21,"core-js/fn/object/values":22,"core-js/fn/promise/finally":23,"core-js/fn/string/pad-end":24,"core-js/fn/string/pad-start":25,"core-js/fn/string/trim-end":26,"core-js/fn/string/trim-start":27,"core-js/fn/symbol/async-iterator":28,"core-js/web":320,"regenerator-runtime/runtime":323}],16:[function(require,module,exports){ +},{"core-js/es6":17,"core-js/fn/array/flat-map":18,"core-js/fn/array/includes":19,"core-js/fn/object/entries":20,"core-js/fn/object/get-own-property-descriptors":21,"core-js/fn/object/values":22,"core-js/fn/promise/finally":23,"core-js/fn/string/pad-end":24,"core-js/fn/string/pad-start":25,"core-js/fn/string/trim-end":26,"core-js/fn/string/trim-start":27,"core-js/fn/symbol/async-iterator":28,"core-js/web":320,"regenerator-runtime/runtime":324}],16:[function(require,module,exports){ function _typeof(o) { "@babel/helpers - typeof"; @@ -8105,6 +8112,35 @@ module.exports = require('../modules/_core'); },{"../modules/_core":66,"../modules/web.dom.iterable":317,"../modules/web.immediate":318,"../modules/web.timers":319}],321:[function(require,module,exports){ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const pkg = __importStar(require("./index.js")); +module.exports = pkg; + +},{"./index.js":322}],322:[function(require,module,exports){ +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; /** @@ -8112,21 +8148,21 @@ exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; * a given entry when a new entry is set and the ttl * of the old one is over */ -var ObliviousSet = /** @class */ (function () { - function ObliviousSet(ttl) { +class ObliviousSet { + ttl; + map = new Map(); + /** + * Creating calls to setTimeout() is expensive, + * so we only do that if there is not timeout already open. + */ + _to = false; + constructor(ttl) { this.ttl = ttl; - this.map = new Map(); - /** - * Creating calls to setTimeout() is expensive, - * so we only do that if there is not timeout already open. - */ - this._to = false; } - ObliviousSet.prototype.has = function (value) { + has(value) { return this.map.has(value); - }; - ObliviousSet.prototype.add = function (value) { - var _this = this; + } + add(value) { this.map.set(value, now()); /** * When a new value is added, @@ -8136,36 +8172,35 @@ var ObliviousSet = /** @class */ (function () { */ if (!this._to) { this._to = true; - setTimeout(function () { - _this._to = false; - removeTooOldValues(_this); + setTimeout(() => { + this._to = false; + removeTooOldValues(this); }, 0); } - }; - ObliviousSet.prototype.clear = function () { + } + clear() { this.map.clear(); - }; - return ObliviousSet; -}()); + } +} exports.ObliviousSet = ObliviousSet; /** * Removes all entries from the set * where the TTL has expired */ function removeTooOldValues(obliviousSet) { - var olderThen = now() - obliviousSet.ttl; - var iterator = obliviousSet.map[Symbol.iterator](); + const olderThen = now() - obliviousSet.ttl; + const iterator = obliviousSet.map[Symbol.iterator](); /** * Because we can assume the new values are added at the bottom, * we start from the top and stop as soon as we reach a non-too-old value. */ while (true) { - var next = iterator.next().value; + const next = iterator.next().value; if (!next) { return; // no more elements } - var value = next[0]; - var time = next[1]; + const value = next[0]; + const time = next[1]; if (time < olderThen) { obliviousSet.map.delete(value); } @@ -8177,11 +8212,11 @@ function removeTooOldValues(obliviousSet) { } exports.removeTooOldValues = removeTooOldValues; function now() { - return new Date().getTime(); + return Date.now(); } exports.now = now; -},{}],322:[function(require,module,exports){ +},{}],323:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -8367,7 +8402,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],323:[function(require,module,exports){ +},{}],324:[function(require,module,exports){ /** * Copyright (c) 2014-present, Facebook, Inc. * @@ -9130,7 +9165,7 @@ try { } } -},{}],324:[function(require,module,exports){ +},{}],325:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -9182,7 +9217,7 @@ function addBrowser(fn) { * @link https://stackoverflow.com/a/26193516/3443137 */ } -},{}],325:[function(require,module,exports){ +},{}],326:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -9243,7 +9278,7 @@ function getSize() { return LISTENERS.size; } }).call(this)}).call(this,require('_process')) -},{"./browser.js":324,"./node.js":326,"_process":322}],326:[function(require,module,exports){ +},{"./browser.js":325,"./node.js":327,"_process":323}],327:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -9282,7 +9317,7 @@ function addNode(fn) { }); } }).call(this)}).call(this,require('_process')) -},{"_process":322}],327:[function(require,module,exports){ +},{"_process":323}],328:[function(require,module,exports){ "use strict"; var _util = require("./util.js"); @@ -9317,7 +9352,7 @@ elector.awaitLeadership().then(function () { boxEl.innerHTML = 'Leader'; document.title = 'â™› Leader'; }); -},{"../../":2,"./util.js":328,"@babel/polyfill":14}],328:[function(require,module,exports){ +},{"../../":2,"./util.js":329,"@babel/polyfill":14}],329:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -9336,4 +9371,4 @@ function getParameterByName(name, url) { if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); } -},{}]},{},[327]); +},{}]},{},[328]); diff --git a/docs/worker.js b/docs/worker.js index 5305767e..4ab196c7 100644 --- a/docs/worker.js +++ b/docs/worker.js @@ -389,7 +389,7 @@ function beLeader(leaderElector) { leaderElector._lstns.push(isLeaderListener); return sendLeaderMessage(leaderElector, 'tell'); } -},{"unload":406}],5:[function(require,module,exports){ +},{"unload":408}],5:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1420,6 +1420,13 @@ function onMessage(channelState, fn) { channelState.messagesCallback = fn; } function canBeUsed() { + // Deno runtime + // eslint-disable-next-line + if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) { + return true; + } + + // Browser runtime if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') { if (BroadcastChannel._pubkey) { throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill'); @@ -1665,7 +1672,7 @@ require("core-js/fn/promise/finally"); require("core-js/web"); require("regenerator-runtime/runtime"); -},{"core-js/es6":42,"core-js/fn/array/flat-map":43,"core-js/fn/array/includes":44,"core-js/fn/object/entries":45,"core-js/fn/object/get-own-property-descriptors":46,"core-js/fn/object/values":47,"core-js/fn/promise/finally":48,"core-js/fn/string/pad-end":49,"core-js/fn/string/pad-start":50,"core-js/fn/string/trim-end":51,"core-js/fn/string/trim-start":52,"core-js/fn/symbol/async-iterator":53,"core-js/web":345,"regenerator-runtime/runtime":397}],16:[function(require,module,exports){ +},{"core-js/es6":42,"core-js/fn/array/flat-map":43,"core-js/fn/array/includes":44,"core-js/fn/object/entries":45,"core-js/fn/object/get-own-property-descriptors":46,"core-js/fn/object/values":47,"core-js/fn/promise/finally":48,"core-js/fn/string/pad-end":49,"core-js/fn/string/pad-start":50,"core-js/fn/string/trim-end":51,"core-js/fn/string/trim-start":52,"core-js/fn/symbol/async-iterator":53,"core-js/web":345,"regenerator-runtime/runtime":398}],16:[function(require,module,exports){ function _typeof(o) { "@babel/helpers - typeof"; @@ -2201,7 +2208,7 @@ function waitUntil(fun) { */ function runLoopOnce() { if (ok) { - resolve(); + resolve(ok); } else if (timedOut) { reject(new Error('AsyncTestUtil.waitUntil(): reached timeout of ' + timeout + 'ms')); } else { @@ -4233,12 +4240,13 @@ module.exports = function callBoundIntrinsic(name, allowMissing) { var bind = require('function-bind'); var GetIntrinsic = require('get-intrinsic'); +var setFunctionLength = require('set-function-length'); +var $TypeError = GetIntrinsic('%TypeError%'); var $apply = GetIntrinsic('%Function.prototype.apply%'); var $call = GetIntrinsic('%Function.prototype.call%'); var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); var $max = GetIntrinsic('%Math.max%'); @@ -4252,19 +4260,15 @@ if ($defineProperty) { } module.exports = function callBind(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - if ($gOPD && $defineProperty) { - var desc = $gOPD(func, 'length'); - if (desc.configurable) { - // original length, plus the receiver, minus any additional arguments (after the receiver) - $defineProperty( - func, - 'length', - { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } - ); - } + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); } - return func; + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); }; var applyBind = function applyBind() { @@ -4277,7 +4281,7 @@ if ($defineProperty) { module.exports.apply = applyBind; } -},{"function-bind":352,"get-intrinsic":354}],41:[function(require,module,exports){ +},{"function-bind":352,"get-intrinsic":354,"set-function-length":403}],41:[function(require,module,exports){ (function (Buffer){(function (){ var clone = (function() { 'use strict'; @@ -11359,7 +11363,7 @@ module.exports = function deepEqual(a, b, opts) { return internalDeepEqual(a, b, opts, getSideChannel()); }; -},{"array-buffer-byte-length":17,"call-bind/callBound":39,"es-get-iterator":349,"get-intrinsic":354,"is-arguments":365,"is-array-buffer":366,"is-date-object":370,"is-regex":374,"is-shared-array-buffer":376,"isarray":382,"object-is":385,"object-keys":389,"object.assign":392,"regexp.prototype.flags":399,"side-channel":403,"which-boxed-primitive":408,"which-collection":409,"which-typed-array":410}],347:[function(require,module,exports){ +},{"array-buffer-byte-length":17,"call-bind/callBound":39,"es-get-iterator":349,"get-intrinsic":354,"is-arguments":365,"is-array-buffer":366,"is-date-object":370,"is-regex":374,"is-shared-array-buffer":376,"isarray":382,"object-is":385,"object-keys":389,"object.assign":392,"regexp.prototype.flags":400,"side-channel":405,"which-boxed-primitive":410,"which-collection":411,"which-typed-array":412}],347:[function(require,module,exports){ 'use strict'; var hasPropertyDescriptors = require('has-property-descriptors')(); @@ -11671,7 +11675,7 @@ if (require('has-symbols')() || require('has-symbols/shams')()) { } }).call(this)}).call(this,require('_process')) -},{"_process":396,"call-bind/callBound":39,"get-intrinsic":354,"has-symbols":359,"has-symbols/shams":360,"is-arguments":365,"is-map":371,"is-set":375,"is-string":377,"isarray":382,"stop-iteration-iterator":404}],350:[function(require,module,exports){ +},{"_process":397,"call-bind/callBound":39,"get-intrinsic":354,"has-symbols":359,"has-symbols/shams":360,"is-arguments":365,"is-map":371,"is-set":375,"is-string":377,"isarray":382,"stop-iteration-iterator":406}],350:[function(require,module,exports){ 'use strict'; var isCallable = require('is-callable'); @@ -12078,7 +12082,7 @@ var LEGACY_ALIASES = { }; var bind = require('function-bind'); -var hasOwn = require('has'); +var hasOwn = require('hasown'); var $concat = bind.call(Function.call, Array.prototype.concat); var $spliceApply = bind.call(Function.apply, Array.prototype.splice); var $replace = bind.call(Function.call, String.prototype.replace); @@ -12214,7 +12218,7 @@ module.exports = function GetIntrinsic(name, allowMissing) { return value; }; -},{"function-bind":352,"has":362,"has-proto":358,"has-symbols":359}],355:[function(require,module,exports){ +},{"function-bind":352,"has-proto":358,"has-symbols":359,"hasown":362}],355:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -12363,14 +12367,14 @@ module.exports = function hasToStringTagShams() { },{"has-symbols/shams":360}],362:[function(require,module,exports){ 'use strict'; -var hasOwnProperty = {}.hasOwnProperty; var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); -module.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) { - return call.call(hasOwnProperty, O, P); -}; +/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ +module.exports = bind.call(call, $hasOwn); -},{}],363:[function(require,module,exports){ +},{"function-bind":352}],363:[function(require,module,exports){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m @@ -12461,7 +12465,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { 'use strict'; var GetIntrinsic = require('get-intrinsic'); -var has = require('has'); +var hasOwn = require('hasown'); var channel = require('side-channel')(); var $TypeError = GetIntrinsic('%TypeError%'); @@ -12497,7 +12501,7 @@ var SLOT = { throw new $TypeError('`slot` must be a string'); } var slots = channel.get(O); - return !!slots && has(slots, '$' + slot); + return !!slots && hasOwn(slots, '$' + slot); }, set: function (O, slot, V) { if (!O || (typeof O !== 'object' && typeof O !== 'function')) { @@ -12521,7 +12525,7 @@ if (Object.freeze) { module.exports = SLOT; -},{"get-intrinsic":354,"has":362,"side-channel":403}],365:[function(require,module,exports){ +},{"get-intrinsic":354,"hasown":362,"side-channel":405}],365:[function(require,module,exports){ 'use strict'; var hasToStringTag = require('has-tostringtag/shams')(); @@ -12848,7 +12852,7 @@ module.exports = exported || function isMap(x) { exports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node); }).call(this)}).call(this,require('_process')) -},{"_process":396}],373:[function(require,module,exports){ +},{"_process":397}],373:[function(require,module,exports){ 'use strict'; var numToStr = Number.prototype.toString; @@ -13073,7 +13077,7 @@ module.exports = function isTypedArray(value) { return !!whichTypedArray(value); }; -},{"which-typed-array":410}],380:[function(require,module,exports){ +},{"which-typed-array":412}],380:[function(require,module,exports){ 'use strict'; var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null; @@ -13405,12 +13409,13 @@ module.exports = function inspect_(obj, options, depth, seen) { if (isString(obj)) { return markBoxed(inspect(String(obj))); } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } if (obj === global) { - /* eslint-env browser */ - if (typeof window !== 'undefined') { - return '{ [object Window] }'; - } - return '{ [object global] }'; + return '{ [object globalThis] }'; } if (!isDate(obj) && !isRegExp(obj)) { var ys = arrObjKeys(obj, inspect); @@ -14079,6 +14084,35 @@ module.exports = function shimAssign() { },{"./polyfill":393,"define-properties":348}],395:[function(require,module,exports){ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const pkg = __importStar(require("./index.js")); +module.exports = pkg; + +},{"./index.js":396}],396:[function(require,module,exports){ +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; /** @@ -14086,21 +14120,21 @@ exports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0; * a given entry when a new entry is set and the ttl * of the old one is over */ -var ObliviousSet = /** @class */ (function () { - function ObliviousSet(ttl) { +class ObliviousSet { + ttl; + map = new Map(); + /** + * Creating calls to setTimeout() is expensive, + * so we only do that if there is not timeout already open. + */ + _to = false; + constructor(ttl) { this.ttl = ttl; - this.map = new Map(); - /** - * Creating calls to setTimeout() is expensive, - * so we only do that if there is not timeout already open. - */ - this._to = false; } - ObliviousSet.prototype.has = function (value) { + has(value) { return this.map.has(value); - }; - ObliviousSet.prototype.add = function (value) { - var _this = this; + } + add(value) { this.map.set(value, now()); /** * When a new value is added, @@ -14110,36 +14144,35 @@ var ObliviousSet = /** @class */ (function () { */ if (!this._to) { this._to = true; - setTimeout(function () { - _this._to = false; - removeTooOldValues(_this); + setTimeout(() => { + this._to = false; + removeTooOldValues(this); }, 0); } - }; - ObliviousSet.prototype.clear = function () { + } + clear() { this.map.clear(); - }; - return ObliviousSet; -}()); + } +} exports.ObliviousSet = ObliviousSet; /** * Removes all entries from the set * where the TTL has expired */ function removeTooOldValues(obliviousSet) { - var olderThen = now() - obliviousSet.ttl; - var iterator = obliviousSet.map[Symbol.iterator](); + const olderThen = now() - obliviousSet.ttl; + const iterator = obliviousSet.map[Symbol.iterator](); /** * Because we can assume the new values are added at the bottom, * we start from the top and stop as soon as we reach a non-too-old value. */ while (true) { - var next = iterator.next().value; + const next = iterator.next().value; if (!next) { return; // no more elements } - var value = next[0]; - var time = next[1]; + const value = next[0]; + const time = next[1]; if (time < olderThen) { obliviousSet.map.delete(value); } @@ -14151,11 +14184,11 @@ function removeTooOldValues(obliviousSet) { } exports.removeTooOldValues = removeTooOldValues; function now() { - return new Date().getTime(); + return Date.now(); } exports.now = now; -},{}],396:[function(require,module,exports){ +},{}],397:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -14341,7 +14374,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],397:[function(require,module,exports){ +},{}],398:[function(require,module,exports){ /** * Copyright (c) 2014-present, Facebook, Inc. * @@ -15104,7 +15137,7 @@ try { } } -},{}],398:[function(require,module,exports){ +},{}],399:[function(require,module,exports){ 'use strict'; var setFunctionName = require('set-function-name'); @@ -15145,7 +15178,7 @@ module.exports = setFunctionName(function flags() { }, 'get flags', true); -},{"set-function-name":402}],399:[function(require,module,exports){ +},{"set-function-name":404}],400:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -15165,7 +15198,7 @@ define(flagsBound, { module.exports = flagsBound; -},{"./implementation":398,"./polyfill":400,"./shim":401,"call-bind":40,"define-properties":348}],400:[function(require,module,exports){ +},{"./implementation":399,"./polyfill":401,"./shim":402,"call-bind":40,"define-properties":348}],401:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -15203,7 +15236,7 @@ module.exports = function getPolyfill() { return implementation; }; -},{"./implementation":398,"define-properties":348}],401:[function(require,module,exports){ +},{"./implementation":399,"define-properties":348}],402:[function(require,module,exports){ 'use strict'; var supportsDescriptors = require('define-properties').supportsDescriptors; @@ -15231,7 +15264,50 @@ module.exports = function shimFlags() { return polyfill; }; -},{"./polyfill":400,"define-properties":348}],402:[function(require,module,exports){ +},{"./polyfill":401,"define-properties":348}],403:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var gOPD = require('gopd'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $floor = GetIntrinsic('%Math.floor%'); + +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(fn, 'length', length, true, true); + } else { + define(fn, 'length', length); + } + } + return fn; +}; + +},{"define-data-property":347,"get-intrinsic":354,"gopd":355,"has-property-descriptors":357}],404:[function(require,module,exports){ 'use strict'; var define = require('define-data-property'); @@ -15255,7 +15331,7 @@ module.exports = function setFunctionName(fn, name) { return fn; }; -},{"define-data-property":347,"functions-have-names":353,"has-property-descriptors":357}],403:[function(require,module,exports){ +},{"define-data-property":347,"functions-have-names":353,"has-property-descriptors":357}],405:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -15381,7 +15457,7 @@ module.exports = function getSideChannel() { return channel; }; -},{"call-bind/callBound":39,"get-intrinsic":354,"object-inspect":383}],404:[function(require,module,exports){ +},{"call-bind/callBound":39,"get-intrinsic":354,"object-inspect":383}],406:[function(require,module,exports){ 'use strict'; var SLOT = require('internal-slot'); @@ -15423,7 +15499,7 @@ module.exports = function getStopIterationIterator(origIterator) { return siIterator; }; -},{"internal-slot":364}],405:[function(require,module,exports){ +},{"internal-slot":364}],407:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -15475,7 +15551,7 @@ function addBrowser(fn) { * @link https://stackoverflow.com/a/26193516/3443137 */ } -},{}],406:[function(require,module,exports){ +},{}],408:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -15536,7 +15612,7 @@ function getSize() { return LISTENERS.size; } }).call(this)}).call(this,require('_process')) -},{"./browser.js":405,"./node.js":407,"_process":396}],407:[function(require,module,exports){ +},{"./browser.js":407,"./node.js":409,"_process":397}],409:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -15575,7 +15651,7 @@ function addNode(fn) { }); } }).call(this)}).call(this,require('_process')) -},{"_process":396}],408:[function(require,module,exports){ +},{"_process":397}],410:[function(require,module,exports){ 'use strict'; var isString = require('is-string'); @@ -15607,7 +15683,7 @@ module.exports = function whichBoxedPrimitive(value) { } }; -},{"is-bigint":367,"is-boolean-object":368,"is-number-object":373,"is-string":377,"is-symbol":378}],409:[function(require,module,exports){ +},{"is-bigint":367,"is-boolean-object":368,"is-number-object":373,"is-string":377,"is-symbol":378}],411:[function(require,module,exports){ 'use strict'; var isMap = require('is-map'); @@ -15633,7 +15709,7 @@ module.exports = function whichCollection(value) { return false; }; -},{"is-map":371,"is-set":375,"is-weakmap":380,"is-weakset":381}],410:[function(require,module,exports){ +},{"is-map":371,"is-set":375,"is-weakmap":380,"is-weakset":381}],412:[function(require,module,exports){ (function (global){(function (){ 'use strict'; @@ -15677,7 +15753,10 @@ if (hasToStringTag && gOPD && getPrototypeOf) { } else { forEach(typedArrays, function (typedArray) { var arr = new g[typedArray](); - cache['$' + typedArray] = callBind(arr.slice); + var fn = arr.slice || arr.set; + if (fn) { + cache['$' + typedArray] = callBind(fn); + } }); } @@ -15726,7 +15805,7 @@ module.exports = function whichTypedArray(value) { }; }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"available-typed-arrays":35,"call-bind":40,"call-bind/callBound":39,"for-each":350,"gopd":355,"has-tostringtag/shams":361}],411:[function(require,module,exports){ +},{"available-typed-arrays":35,"call-bind":40,"call-bind/callBound":39,"for-each":350,"gopd":355,"has-tostringtag/shams":361}],413:[function(require,module,exports){ "use strict"; /* eslint-disable */ @@ -15798,4 +15877,4 @@ self.addEventListener('message', function (e) { } ; }, false); -},{"../../":2,"@babel/polyfill":14,"async-test-util":21}]},{},[411]); +},{"../../":2,"@babel/polyfill":14,"async-test-util":21}]},{},[413]); diff --git a/package.json b/package.json index 17491ae6..236dfd19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "broadcast-channel", - "version": "5.5.1", + "version": "6.0.0", "description": "A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers, NodeJs, Deno and iframes", "exports": { ".": { From a278986fcf51a3c3076e892b49322f23c70616a5 Mon Sep 17 00:00:00 2001 From: Daniel Meyer <8926560+pubkey@users.noreply.github.com> Date: Mon, 27 Nov 2023 23:44:17 +0100 Subject: [PATCH 55/82] bugfix/message-from-before-creation-was-send (#1295) * FIX got too many messages * FIX node method * CLEAR npm cache * UPDATE deps * FIX missing event * FIX e2e tests * FIX tests --- .github/workflows/main.yml | 22 +- .nvmrc | 1 + docs/e2e.js | 7990 ++++++++++++++++++++++++++++++++- docs/iframe.js | 62 +- docs/index.js | 62 +- docs/leader-iframe.js | 62 +- docs/worker.js | 62 +- package.json | 28 +- src/broadcast-channel.js | 15 +- src/methods/native.js | 5 +- src/methods/node.js | 12 +- src/methods/simulate.js | 23 +- src/util.js | 16 +- test/integration.test.js | 38 +- test/scripts/e2e.js | 24 +- test/unit/node.method.test.js | 77 +- 16 files changed, 8074 insertions(+), 425 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 105b77a1..e191f58b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v4.0.0 with: - node-version: '20.9.0' + node-version-file: ".nvmrc" # https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows - name: Reuse npm cache folder @@ -46,10 +46,10 @@ jobs: ./node_modules ./test-electron/node_modules # invalidate cache when any package.json changes - key: ${{ runner.os }}-npm-x2-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + key: ${{ runner.os }}-npm-x3-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} restore-keys: | - ${{ runner.os }}-npm-x2-${{ env.cache-name }}- - ${{ runner.os }}-npm-x2- + ${{ runner.os }}-npm-x3-${{ env.cache-name }}- + ${{ runner.os }}-npm-x3- ${{ runner.os }}- # install @@ -117,9 +117,9 @@ jobs: ./node_modules ./test-electron/node_modules # invalidate cache when any package.json changes - key: ${{ runner.os }}-npm-test-node-x2-${{ matrix.node }}-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + key: ${{ runner.os }}-npm-test-node-x3-${{ matrix.node }}-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} restore-keys: | - ${{ runner.os }}-npm-test-node-x2-${{ matrix.node }}-${{ env.cache-name }}- + ${{ runner.os }}-npm-test-node-x3-${{ matrix.node }}-${{ env.cache-name }}- ${{ runner.os }}-npm-test-node ${{ runner.os }}-test-node @@ -140,22 +140,22 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v4.0.0 with: - node-version: '20.9.0' + node-version-file: ".nvmrc" # https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows - name: Reuse npm cache folder uses: actions/cache@v3 env: - cache-name: cache-node-modules + cache-name: cache-node-deno-modules with: path: | ~/.npm ./node_modules ./test-electron/node_modules # invalidate cache when any package.json changes - key: ${{ runner.os }}-npm-test-deno-x2-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + key: ${{ runner.os }}-npm-test-deno-x3-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} restore-keys: | - ${{ runner.os }}-npm-test-deno-x2-${{ env.cache-name }}- + ${{ runner.os }}-npm-test-deno-x3-${{ env.cache-name }}- ${{ runner.os }}-npm-test-deno ${{ runner.os }}-test-deno @@ -174,7 +174,7 @@ jobs: /home/runner/.cache/deno # do not cache based on package.json because deno install randomly fails # and it would then never succeed on the first run on dependency updateds - key: ${{ runner.os }}-deno-x2- + key: ${{ runner.os }}-deno-x3- - uses: denoland/setup-deno@v1 with: diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..d5a15960 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.10.0 diff --git a/docs/e2e.js b/docs/e2e.js index 2c584ea1..481dc34d 100644 --- a/docs/e2e.js +++ b/docs/e2e.js @@ -238,18 +238,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); @@ -389,7 +378,7 @@ function beLeader(leaderElector) { leaderElector._lstns.push(isLeaderListener); return sendLeaderMessage(leaderElector, 'tell'); } -},{"unload":412}],5:[function(require,module,exports){ +},{"unload":635}],5:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1392,14 +1381,15 @@ var microSeconds = exports.microSeconds = _util.microSeconds; var type = exports.type = 'native'; function create(channelName) { var state = { + time: (0, _util.microSeconds)(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = function (msg) { + state.bc.onmessage = function (msgEvent) { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; return state; @@ -1455,7 +1445,7 @@ var NativeMethod = exports.NativeMethod = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.SimulateMethod = void 0; +exports.SimulateMethod = exports.SIMULATE_DELAY_TIME = void 0; exports.averageResponseTime = averageResponseTime; exports.canBeUsed = canBeUsed; exports.close = close; @@ -1470,30 +1460,36 @@ var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { + time: microSeconds(), name: channelName, messagesCallback: null }; + console.log('created channel ' + state.counter); SIMULATE_CHANNELS.add(state); return state; } function close(channelState) { SIMULATE_CHANNELS["delete"](channelState); } +var SIMULATE_DELAY_TIME = exports.SIMULATE_DELAY_TIME = 5; function postMessage(channelState, messageJson) { return new Promise(function (res) { return setTimeout(function () { var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function (channel) { - return channel.name === channelState.name; - }).filter(function (channel) { - return channel !== channelState; - }).filter(function (channel) { - return !!channel.messagesCallback; - }).forEach(function (channel) { - return channel.messagesCallback(messageJson); + channelArray.forEach(function (channel) { + if (channel.name === channelState.name && + // has same name + channel !== channelState && + // not own channel + !!channel.messagesCallback && + // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } }); res(); - }, 5); + }, SIMULATE_DELAY_TIME); }); } function onMessage(channelState, fn) { @@ -1503,7 +1499,7 @@ function canBeUsed() { return true; } function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } var SimulateMethod = exports.SimulateMethod = { create: create, @@ -1596,25 +1592,21 @@ function randomToken() { return Math.random().toString(36).substring(2); } var lastMs = 0; -var additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ function microSeconds() { - var ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + var ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** @@ -4642,7 +4634,7 @@ if ($defineProperty) { module.exports.apply = applyBind; } -},{"function-bind":356,"get-intrinsic":358,"set-function-length":407}],45:[function(require,module,exports){ +},{"function-bind":356,"get-intrinsic":358,"set-function-length":630}],45:[function(require,module,exports){ (function (Buffer){(function (){ var clone = (function() { 'use strict'; @@ -11724,7 +11716,7 @@ module.exports = function deepEqual(a, b, opts) { return internalDeepEqual(a, b, opts, getSideChannel()); }; -},{"array-buffer-byte-length":21,"call-bind/callBound":43,"es-get-iterator":353,"get-intrinsic":358,"is-arguments":369,"is-array-buffer":370,"is-date-object":374,"is-regex":378,"is-shared-array-buffer":380,"isarray":386,"object-is":389,"object-keys":393,"object.assign":396,"regexp.prototype.flags":404,"side-channel":409,"which-boxed-primitive":414,"which-collection":415,"which-typed-array":416}],351:[function(require,module,exports){ +},{"array-buffer-byte-length":21,"call-bind/callBound":43,"es-get-iterator":353,"get-intrinsic":358,"is-arguments":369,"is-array-buffer":370,"is-date-object":374,"is-regex":378,"is-shared-array-buffer":380,"isarray":386,"object-is":389,"object-keys":393,"object.assign":396,"regexp.prototype.flags":404,"side-channel":632,"which-boxed-primitive":637,"which-collection":638,"which-typed-array":639}],351:[function(require,module,exports){ 'use strict'; var hasPropertyDescriptors = require('has-property-descriptors')(); @@ -12036,7 +12028,7 @@ if (require('has-symbols')() || require('has-symbols/shams')()) { } }).call(this)}).call(this,require('_process')) -},{"_process":401,"call-bind/callBound":43,"get-intrinsic":358,"has-symbols":363,"has-symbols/shams":364,"is-arguments":369,"is-map":375,"is-set":379,"is-string":381,"isarray":386,"stop-iteration-iterator":410}],354:[function(require,module,exports){ +},{"_process":401,"call-bind/callBound":43,"get-intrinsic":358,"has-symbols":363,"has-symbols/shams":364,"is-arguments":369,"is-map":375,"is-set":379,"is-string":381,"isarray":386,"stop-iteration-iterator":633}],354:[function(require,module,exports){ 'use strict'; var isCallable = require('is-callable'); @@ -12886,7 +12878,7 @@ if (Object.freeze) { module.exports = SLOT; -},{"get-intrinsic":358,"hasown":366,"side-channel":409}],369:[function(require,module,exports){ +},{"get-intrinsic":358,"hasown":366,"side-channel":632}],369:[function(require,module,exports){ 'use strict'; var hasToStringTag = require('has-tostringtag/shams')(); @@ -13438,7 +13430,7 @@ module.exports = function isTypedArray(value) { return !!whichTypedArray(value); }; -},{"which-typed-array":416}],384:[function(require,module,exports){ +},{"which-typed-array":639}],384:[function(require,module,exports){ 'use strict'; var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null; @@ -15539,7 +15531,7 @@ module.exports = setFunctionName(function flags() { }, 'get flags', true); -},{"set-function-name":408}],404:[function(require,module,exports){ +},{"set-function-name":631}],404:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -15626,127 +15618,7769 @@ module.exports = function shimFlags() { }; },{"./polyfill":405,"define-properties":352}],407:[function(require,module,exports){ -'use strict'; - -var GetIntrinsic = require('get-intrinsic'); -var define = require('define-data-property'); -var hasDescriptors = require('has-property-descriptors')(); -var gOPD = require('gopd'); - -var $TypeError = GetIntrinsic('%TypeError%'); -var $floor = GetIntrinsic('%Math.floor%'); - -module.exports = function setFunctionLength(fn, length) { - if (typeof fn !== 'function') { - throw new $TypeError('`fn` is not a function'); - } - if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { - throw new $TypeError('`length` must be a positive 32-bit integer'); - } - - var loose = arguments.length > 2 && !!arguments[2]; - - var functionLengthIsConfigurable = true; - var functionLengthIsWritable = true; - if ('length' in fn && gOPD) { - var desc = gOPD(fn, 'length'); - if (desc && !desc.configurable) { - functionLengthIsConfigurable = false; - } - if (desc && !desc.writable) { - functionLengthIsWritable = false; - } - } - - if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { - if (hasDescriptors) { - define(fn, 'length', length, true, true); - } else { - define(fn, 'length', length); - } - } - return fn; +"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 }); +exports.interval = exports.iif = exports.generate = exports.fromEventPattern = exports.fromEvent = exports.from = exports.forkJoin = exports.empty = exports.defer = exports.connectable = exports.concat = exports.combineLatest = exports.bindNodeCallback = exports.bindCallback = exports.UnsubscriptionError = exports.TimeoutError = exports.SequenceError = exports.ObjectUnsubscribedError = exports.NotFoundError = exports.EmptyError = exports.ArgumentOutOfRangeError = exports.firstValueFrom = exports.lastValueFrom = exports.isObservable = exports.identity = exports.noop = exports.pipe = exports.NotificationKind = exports.Notification = exports.Subscriber = exports.Subscription = exports.Scheduler = exports.VirtualAction = exports.VirtualTimeScheduler = exports.animationFrameScheduler = exports.animationFrame = exports.queueScheduler = exports.queue = exports.asyncScheduler = exports.async = exports.asapScheduler = exports.asap = exports.AsyncSubject = exports.ReplaySubject = exports.BehaviorSubject = exports.Subject = exports.animationFrames = exports.observable = exports.ConnectableObservable = exports.Observable = void 0; +exports.filter = exports.expand = exports.exhaustMap = exports.exhaustAll = exports.exhaust = exports.every = exports.endWith = exports.elementAt = exports.distinctUntilKeyChanged = exports.distinctUntilChanged = exports.distinct = exports.dematerialize = exports.delayWhen = exports.delay = exports.defaultIfEmpty = exports.debounceTime = exports.debounce = exports.count = exports.connect = exports.concatWith = exports.concatMapTo = exports.concatMap = exports.concatAll = exports.combineLatestWith = exports.combineLatestAll = exports.combineAll = exports.catchError = exports.bufferWhen = exports.bufferToggle = exports.bufferTime = exports.bufferCount = exports.buffer = exports.auditTime = exports.audit = exports.config = exports.NEVER = exports.EMPTY = exports.scheduled = exports.zip = exports.using = exports.timer = exports.throwError = exports.range = exports.race = exports.partition = exports.pairs = exports.onErrorResumeNext = exports.of = exports.never = exports.merge = void 0; +exports.switchMap = exports.switchAll = exports.subscribeOn = exports.startWith = exports.skipWhile = exports.skipUntil = exports.skipLast = exports.skip = exports.single = exports.shareReplay = exports.share = exports.sequenceEqual = exports.scan = exports.sampleTime = exports.sample = exports.refCount = exports.retryWhen = exports.retry = exports.repeatWhen = exports.repeat = exports.reduce = exports.raceWith = exports.publishReplay = exports.publishLast = exports.publishBehavior = exports.publish = exports.pluck = exports.pairwise = exports.onErrorResumeNextWith = exports.observeOn = exports.multicast = exports.min = exports.mergeWith = exports.mergeScan = exports.mergeMapTo = exports.mergeMap = exports.flatMap = exports.mergeAll = exports.max = exports.materialize = exports.mapTo = exports.map = exports.last = exports.isEmpty = exports.ignoreElements = exports.groupBy = exports.first = exports.findIndex = exports.find = exports.finalize = void 0; +exports.zipWith = exports.zipAll = exports.withLatestFrom = exports.windowWhen = exports.windowToggle = exports.windowTime = exports.windowCount = exports.window = exports.toArray = exports.timestamp = exports.timeoutWith = exports.timeout = exports.timeInterval = exports.throwIfEmpty = exports.throttleTime = exports.throttle = exports.tap = exports.takeWhile = exports.takeUntil = exports.takeLast = exports.take = exports.switchScan = exports.switchMapTo = void 0; +var Observable_1 = require("./internal/Observable"); +Object.defineProperty(exports, "Observable", { enumerable: true, get: function () { return Observable_1.Observable; } }); +var ConnectableObservable_1 = require("./internal/observable/ConnectableObservable"); +Object.defineProperty(exports, "ConnectableObservable", { enumerable: true, get: function () { return ConnectableObservable_1.ConnectableObservable; } }); +var observable_1 = require("./internal/symbol/observable"); +Object.defineProperty(exports, "observable", { enumerable: true, get: function () { return observable_1.observable; } }); +var animationFrames_1 = require("./internal/observable/dom/animationFrames"); +Object.defineProperty(exports, "animationFrames", { enumerable: true, get: function () { return animationFrames_1.animationFrames; } }); +var Subject_1 = require("./internal/Subject"); +Object.defineProperty(exports, "Subject", { enumerable: true, get: function () { return Subject_1.Subject; } }); +var BehaviorSubject_1 = require("./internal/BehaviorSubject"); +Object.defineProperty(exports, "BehaviorSubject", { enumerable: true, get: function () { return BehaviorSubject_1.BehaviorSubject; } }); +var ReplaySubject_1 = require("./internal/ReplaySubject"); +Object.defineProperty(exports, "ReplaySubject", { enumerable: true, get: function () { return ReplaySubject_1.ReplaySubject; } }); +var AsyncSubject_1 = require("./internal/AsyncSubject"); +Object.defineProperty(exports, "AsyncSubject", { enumerable: true, get: function () { return AsyncSubject_1.AsyncSubject; } }); +var asap_1 = require("./internal/scheduler/asap"); +Object.defineProperty(exports, "asap", { enumerable: true, get: function () { return asap_1.asap; } }); +Object.defineProperty(exports, "asapScheduler", { enumerable: true, get: function () { return asap_1.asapScheduler; } }); +var async_1 = require("./internal/scheduler/async"); +Object.defineProperty(exports, "async", { enumerable: true, get: function () { return async_1.async; } }); +Object.defineProperty(exports, "asyncScheduler", { enumerable: true, get: function () { return async_1.asyncScheduler; } }); +var queue_1 = require("./internal/scheduler/queue"); +Object.defineProperty(exports, "queue", { enumerable: true, get: function () { return queue_1.queue; } }); +Object.defineProperty(exports, "queueScheduler", { enumerable: true, get: function () { return queue_1.queueScheduler; } }); +var animationFrame_1 = require("./internal/scheduler/animationFrame"); +Object.defineProperty(exports, "animationFrame", { enumerable: true, get: function () { return animationFrame_1.animationFrame; } }); +Object.defineProperty(exports, "animationFrameScheduler", { enumerable: true, get: function () { return animationFrame_1.animationFrameScheduler; } }); +var VirtualTimeScheduler_1 = require("./internal/scheduler/VirtualTimeScheduler"); +Object.defineProperty(exports, "VirtualTimeScheduler", { enumerable: true, get: function () { return VirtualTimeScheduler_1.VirtualTimeScheduler; } }); +Object.defineProperty(exports, "VirtualAction", { enumerable: true, get: function () { return VirtualTimeScheduler_1.VirtualAction; } }); +var Scheduler_1 = require("./internal/Scheduler"); +Object.defineProperty(exports, "Scheduler", { enumerable: true, get: function () { return Scheduler_1.Scheduler; } }); +var Subscription_1 = require("./internal/Subscription"); +Object.defineProperty(exports, "Subscription", { enumerable: true, get: function () { return Subscription_1.Subscription; } }); +var Subscriber_1 = require("./internal/Subscriber"); +Object.defineProperty(exports, "Subscriber", { enumerable: true, get: function () { return Subscriber_1.Subscriber; } }); +var Notification_1 = require("./internal/Notification"); +Object.defineProperty(exports, "Notification", { enumerable: true, get: function () { return Notification_1.Notification; } }); +Object.defineProperty(exports, "NotificationKind", { enumerable: true, get: function () { return Notification_1.NotificationKind; } }); +var pipe_1 = require("./internal/util/pipe"); +Object.defineProperty(exports, "pipe", { enumerable: true, get: function () { return pipe_1.pipe; } }); +var noop_1 = require("./internal/util/noop"); +Object.defineProperty(exports, "noop", { enumerable: true, get: function () { return noop_1.noop; } }); +var identity_1 = require("./internal/util/identity"); +Object.defineProperty(exports, "identity", { enumerable: true, get: function () { return identity_1.identity; } }); +var isObservable_1 = require("./internal/util/isObservable"); +Object.defineProperty(exports, "isObservable", { enumerable: true, get: function () { return isObservable_1.isObservable; } }); +var lastValueFrom_1 = require("./internal/lastValueFrom"); +Object.defineProperty(exports, "lastValueFrom", { enumerable: true, get: function () { return lastValueFrom_1.lastValueFrom; } }); +var firstValueFrom_1 = require("./internal/firstValueFrom"); +Object.defineProperty(exports, "firstValueFrom", { enumerable: true, get: function () { return firstValueFrom_1.firstValueFrom; } }); +var ArgumentOutOfRangeError_1 = require("./internal/util/ArgumentOutOfRangeError"); +Object.defineProperty(exports, "ArgumentOutOfRangeError", { enumerable: true, get: function () { return ArgumentOutOfRangeError_1.ArgumentOutOfRangeError; } }); +var EmptyError_1 = require("./internal/util/EmptyError"); +Object.defineProperty(exports, "EmptyError", { enumerable: true, get: function () { return EmptyError_1.EmptyError; } }); +var NotFoundError_1 = require("./internal/util/NotFoundError"); +Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return NotFoundError_1.NotFoundError; } }); +var ObjectUnsubscribedError_1 = require("./internal/util/ObjectUnsubscribedError"); +Object.defineProperty(exports, "ObjectUnsubscribedError", { enumerable: true, get: function () { return ObjectUnsubscribedError_1.ObjectUnsubscribedError; } }); +var SequenceError_1 = require("./internal/util/SequenceError"); +Object.defineProperty(exports, "SequenceError", { enumerable: true, get: function () { return SequenceError_1.SequenceError; } }); +var timeout_1 = require("./internal/operators/timeout"); +Object.defineProperty(exports, "TimeoutError", { enumerable: true, get: function () { return timeout_1.TimeoutError; } }); +var UnsubscriptionError_1 = require("./internal/util/UnsubscriptionError"); +Object.defineProperty(exports, "UnsubscriptionError", { enumerable: true, get: function () { return UnsubscriptionError_1.UnsubscriptionError; } }); +var bindCallback_1 = require("./internal/observable/bindCallback"); +Object.defineProperty(exports, "bindCallback", { enumerable: true, get: function () { return bindCallback_1.bindCallback; } }); +var bindNodeCallback_1 = require("./internal/observable/bindNodeCallback"); +Object.defineProperty(exports, "bindNodeCallback", { enumerable: true, get: function () { return bindNodeCallback_1.bindNodeCallback; } }); +var combineLatest_1 = require("./internal/observable/combineLatest"); +Object.defineProperty(exports, "combineLatest", { enumerable: true, get: function () { return combineLatest_1.combineLatest; } }); +var concat_1 = require("./internal/observable/concat"); +Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return concat_1.concat; } }); +var connectable_1 = require("./internal/observable/connectable"); +Object.defineProperty(exports, "connectable", { enumerable: true, get: function () { return connectable_1.connectable; } }); +var defer_1 = require("./internal/observable/defer"); +Object.defineProperty(exports, "defer", { enumerable: true, get: function () { return defer_1.defer; } }); +var empty_1 = require("./internal/observable/empty"); +Object.defineProperty(exports, "empty", { enumerable: true, get: function () { return empty_1.empty; } }); +var forkJoin_1 = require("./internal/observable/forkJoin"); +Object.defineProperty(exports, "forkJoin", { enumerable: true, get: function () { return forkJoin_1.forkJoin; } }); +var from_1 = require("./internal/observable/from"); +Object.defineProperty(exports, "from", { enumerable: true, get: function () { return from_1.from; } }); +var fromEvent_1 = require("./internal/observable/fromEvent"); +Object.defineProperty(exports, "fromEvent", { enumerable: true, get: function () { return fromEvent_1.fromEvent; } }); +var fromEventPattern_1 = require("./internal/observable/fromEventPattern"); +Object.defineProperty(exports, "fromEventPattern", { enumerable: true, get: function () { return fromEventPattern_1.fromEventPattern; } }); +var generate_1 = require("./internal/observable/generate"); +Object.defineProperty(exports, "generate", { enumerable: true, get: function () { return generate_1.generate; } }); +var iif_1 = require("./internal/observable/iif"); +Object.defineProperty(exports, "iif", { enumerable: true, get: function () { return iif_1.iif; } }); +var interval_1 = require("./internal/observable/interval"); +Object.defineProperty(exports, "interval", { enumerable: true, get: function () { return interval_1.interval; } }); +var merge_1 = require("./internal/observable/merge"); +Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return merge_1.merge; } }); +var never_1 = require("./internal/observable/never"); +Object.defineProperty(exports, "never", { enumerable: true, get: function () { return never_1.never; } }); +var of_1 = require("./internal/observable/of"); +Object.defineProperty(exports, "of", { enumerable: true, get: function () { return of_1.of; } }); +var onErrorResumeNext_1 = require("./internal/observable/onErrorResumeNext"); +Object.defineProperty(exports, "onErrorResumeNext", { enumerable: true, get: function () { return onErrorResumeNext_1.onErrorResumeNext; } }); +var pairs_1 = require("./internal/observable/pairs"); +Object.defineProperty(exports, "pairs", { enumerable: true, get: function () { return pairs_1.pairs; } }); +var partition_1 = require("./internal/observable/partition"); +Object.defineProperty(exports, "partition", { enumerable: true, get: function () { return partition_1.partition; } }); +var race_1 = require("./internal/observable/race"); +Object.defineProperty(exports, "race", { enumerable: true, get: function () { return race_1.race; } }); +var range_1 = require("./internal/observable/range"); +Object.defineProperty(exports, "range", { enumerable: true, get: function () { return range_1.range; } }); +var throwError_1 = require("./internal/observable/throwError"); +Object.defineProperty(exports, "throwError", { enumerable: true, get: function () { return throwError_1.throwError; } }); +var timer_1 = require("./internal/observable/timer"); +Object.defineProperty(exports, "timer", { enumerable: true, get: function () { return timer_1.timer; } }); +var using_1 = require("./internal/observable/using"); +Object.defineProperty(exports, "using", { enumerable: true, get: function () { return using_1.using; } }); +var zip_1 = require("./internal/observable/zip"); +Object.defineProperty(exports, "zip", { enumerable: true, get: function () { return zip_1.zip; } }); +var scheduled_1 = require("./internal/scheduled/scheduled"); +Object.defineProperty(exports, "scheduled", { enumerable: true, get: function () { return scheduled_1.scheduled; } }); +var empty_2 = require("./internal/observable/empty"); +Object.defineProperty(exports, "EMPTY", { enumerable: true, get: function () { return empty_2.EMPTY; } }); +var never_2 = require("./internal/observable/never"); +Object.defineProperty(exports, "NEVER", { enumerable: true, get: function () { return never_2.NEVER; } }); +__exportStar(require("./internal/types"), exports); +var config_1 = require("./internal/config"); +Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_1.config; } }); +var audit_1 = require("./internal/operators/audit"); +Object.defineProperty(exports, "audit", { enumerable: true, get: function () { return audit_1.audit; } }); +var auditTime_1 = require("./internal/operators/auditTime"); +Object.defineProperty(exports, "auditTime", { enumerable: true, get: function () { return auditTime_1.auditTime; } }); +var buffer_1 = require("./internal/operators/buffer"); +Object.defineProperty(exports, "buffer", { enumerable: true, get: function () { return buffer_1.buffer; } }); +var bufferCount_1 = require("./internal/operators/bufferCount"); +Object.defineProperty(exports, "bufferCount", { enumerable: true, get: function () { return bufferCount_1.bufferCount; } }); +var bufferTime_1 = require("./internal/operators/bufferTime"); +Object.defineProperty(exports, "bufferTime", { enumerable: true, get: function () { return bufferTime_1.bufferTime; } }); +var bufferToggle_1 = require("./internal/operators/bufferToggle"); +Object.defineProperty(exports, "bufferToggle", { enumerable: true, get: function () { return bufferToggle_1.bufferToggle; } }); +var bufferWhen_1 = require("./internal/operators/bufferWhen"); +Object.defineProperty(exports, "bufferWhen", { enumerable: true, get: function () { return bufferWhen_1.bufferWhen; } }); +var catchError_1 = require("./internal/operators/catchError"); +Object.defineProperty(exports, "catchError", { enumerable: true, get: function () { return catchError_1.catchError; } }); +var combineAll_1 = require("./internal/operators/combineAll"); +Object.defineProperty(exports, "combineAll", { enumerable: true, get: function () { return combineAll_1.combineAll; } }); +var combineLatestAll_1 = require("./internal/operators/combineLatestAll"); +Object.defineProperty(exports, "combineLatestAll", { enumerable: true, get: function () { return combineLatestAll_1.combineLatestAll; } }); +var combineLatestWith_1 = require("./internal/operators/combineLatestWith"); +Object.defineProperty(exports, "combineLatestWith", { enumerable: true, get: function () { return combineLatestWith_1.combineLatestWith; } }); +var concatAll_1 = require("./internal/operators/concatAll"); +Object.defineProperty(exports, "concatAll", { enumerable: true, get: function () { return concatAll_1.concatAll; } }); +var concatMap_1 = require("./internal/operators/concatMap"); +Object.defineProperty(exports, "concatMap", { enumerable: true, get: function () { return concatMap_1.concatMap; } }); +var concatMapTo_1 = require("./internal/operators/concatMapTo"); +Object.defineProperty(exports, "concatMapTo", { enumerable: true, get: function () { return concatMapTo_1.concatMapTo; } }); +var concatWith_1 = require("./internal/operators/concatWith"); +Object.defineProperty(exports, "concatWith", { enumerable: true, get: function () { return concatWith_1.concatWith; } }); +var connect_1 = require("./internal/operators/connect"); +Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return connect_1.connect; } }); +var count_1 = require("./internal/operators/count"); +Object.defineProperty(exports, "count", { enumerable: true, get: function () { return count_1.count; } }); +var debounce_1 = require("./internal/operators/debounce"); +Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return debounce_1.debounce; } }); +var debounceTime_1 = require("./internal/operators/debounceTime"); +Object.defineProperty(exports, "debounceTime", { enumerable: true, get: function () { return debounceTime_1.debounceTime; } }); +var defaultIfEmpty_1 = require("./internal/operators/defaultIfEmpty"); +Object.defineProperty(exports, "defaultIfEmpty", { enumerable: true, get: function () { return defaultIfEmpty_1.defaultIfEmpty; } }); +var delay_1 = require("./internal/operators/delay"); +Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return delay_1.delay; } }); +var delayWhen_1 = require("./internal/operators/delayWhen"); +Object.defineProperty(exports, "delayWhen", { enumerable: true, get: function () { return delayWhen_1.delayWhen; } }); +var dematerialize_1 = require("./internal/operators/dematerialize"); +Object.defineProperty(exports, "dematerialize", { enumerable: true, get: function () { return dematerialize_1.dematerialize; } }); +var distinct_1 = require("./internal/operators/distinct"); +Object.defineProperty(exports, "distinct", { enumerable: true, get: function () { return distinct_1.distinct; } }); +var distinctUntilChanged_1 = require("./internal/operators/distinctUntilChanged"); +Object.defineProperty(exports, "distinctUntilChanged", { enumerable: true, get: function () { return distinctUntilChanged_1.distinctUntilChanged; } }); +var distinctUntilKeyChanged_1 = require("./internal/operators/distinctUntilKeyChanged"); +Object.defineProperty(exports, "distinctUntilKeyChanged", { enumerable: true, get: function () { return distinctUntilKeyChanged_1.distinctUntilKeyChanged; } }); +var elementAt_1 = require("./internal/operators/elementAt"); +Object.defineProperty(exports, "elementAt", { enumerable: true, get: function () { return elementAt_1.elementAt; } }); +var endWith_1 = require("./internal/operators/endWith"); +Object.defineProperty(exports, "endWith", { enumerable: true, get: function () { return endWith_1.endWith; } }); +var every_1 = require("./internal/operators/every"); +Object.defineProperty(exports, "every", { enumerable: true, get: function () { return every_1.every; } }); +var exhaust_1 = require("./internal/operators/exhaust"); +Object.defineProperty(exports, "exhaust", { enumerable: true, get: function () { return exhaust_1.exhaust; } }); +var exhaustAll_1 = require("./internal/operators/exhaustAll"); +Object.defineProperty(exports, "exhaustAll", { enumerable: true, get: function () { return exhaustAll_1.exhaustAll; } }); +var exhaustMap_1 = require("./internal/operators/exhaustMap"); +Object.defineProperty(exports, "exhaustMap", { enumerable: true, get: function () { return exhaustMap_1.exhaustMap; } }); +var expand_1 = require("./internal/operators/expand"); +Object.defineProperty(exports, "expand", { enumerable: true, get: function () { return expand_1.expand; } }); +var filter_1 = require("./internal/operators/filter"); +Object.defineProperty(exports, "filter", { enumerable: true, get: function () { return filter_1.filter; } }); +var finalize_1 = require("./internal/operators/finalize"); +Object.defineProperty(exports, "finalize", { enumerable: true, get: function () { return finalize_1.finalize; } }); +var find_1 = require("./internal/operators/find"); +Object.defineProperty(exports, "find", { enumerable: true, get: function () { return find_1.find; } }); +var findIndex_1 = require("./internal/operators/findIndex"); +Object.defineProperty(exports, "findIndex", { enumerable: true, get: function () { return findIndex_1.findIndex; } }); +var first_1 = require("./internal/operators/first"); +Object.defineProperty(exports, "first", { enumerable: true, get: function () { return first_1.first; } }); +var groupBy_1 = require("./internal/operators/groupBy"); +Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_1.groupBy; } }); +var ignoreElements_1 = require("./internal/operators/ignoreElements"); +Object.defineProperty(exports, "ignoreElements", { enumerable: true, get: function () { return ignoreElements_1.ignoreElements; } }); +var isEmpty_1 = require("./internal/operators/isEmpty"); +Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return isEmpty_1.isEmpty; } }); +var last_1 = require("./internal/operators/last"); +Object.defineProperty(exports, "last", { enumerable: true, get: function () { return last_1.last; } }); +var map_1 = require("./internal/operators/map"); +Object.defineProperty(exports, "map", { enumerable: true, get: function () { return map_1.map; } }); +var mapTo_1 = require("./internal/operators/mapTo"); +Object.defineProperty(exports, "mapTo", { enumerable: true, get: function () { return mapTo_1.mapTo; } }); +var materialize_1 = require("./internal/operators/materialize"); +Object.defineProperty(exports, "materialize", { enumerable: true, get: function () { return materialize_1.materialize; } }); +var max_1 = require("./internal/operators/max"); +Object.defineProperty(exports, "max", { enumerable: true, get: function () { return max_1.max; } }); +var mergeAll_1 = require("./internal/operators/mergeAll"); +Object.defineProperty(exports, "mergeAll", { enumerable: true, get: function () { return mergeAll_1.mergeAll; } }); +var flatMap_1 = require("./internal/operators/flatMap"); +Object.defineProperty(exports, "flatMap", { enumerable: true, get: function () { return flatMap_1.flatMap; } }); +var mergeMap_1 = require("./internal/operators/mergeMap"); +Object.defineProperty(exports, "mergeMap", { enumerable: true, get: function () { return mergeMap_1.mergeMap; } }); +var mergeMapTo_1 = require("./internal/operators/mergeMapTo"); +Object.defineProperty(exports, "mergeMapTo", { enumerable: true, get: function () { return mergeMapTo_1.mergeMapTo; } }); +var mergeScan_1 = require("./internal/operators/mergeScan"); +Object.defineProperty(exports, "mergeScan", { enumerable: true, get: function () { return mergeScan_1.mergeScan; } }); +var mergeWith_1 = require("./internal/operators/mergeWith"); +Object.defineProperty(exports, "mergeWith", { enumerable: true, get: function () { return mergeWith_1.mergeWith; } }); +var min_1 = require("./internal/operators/min"); +Object.defineProperty(exports, "min", { enumerable: true, get: function () { return min_1.min; } }); +var multicast_1 = require("./internal/operators/multicast"); +Object.defineProperty(exports, "multicast", { enumerable: true, get: function () { return multicast_1.multicast; } }); +var observeOn_1 = require("./internal/operators/observeOn"); +Object.defineProperty(exports, "observeOn", { enumerable: true, get: function () { return observeOn_1.observeOn; } }); +var onErrorResumeNextWith_1 = require("./internal/operators/onErrorResumeNextWith"); +Object.defineProperty(exports, "onErrorResumeNextWith", { enumerable: true, get: function () { return onErrorResumeNextWith_1.onErrorResumeNextWith; } }); +var pairwise_1 = require("./internal/operators/pairwise"); +Object.defineProperty(exports, "pairwise", { enumerable: true, get: function () { return pairwise_1.pairwise; } }); +var pluck_1 = require("./internal/operators/pluck"); +Object.defineProperty(exports, "pluck", { enumerable: true, get: function () { return pluck_1.pluck; } }); +var publish_1 = require("./internal/operators/publish"); +Object.defineProperty(exports, "publish", { enumerable: true, get: function () { return publish_1.publish; } }); +var publishBehavior_1 = require("./internal/operators/publishBehavior"); +Object.defineProperty(exports, "publishBehavior", { enumerable: true, get: function () { return publishBehavior_1.publishBehavior; } }); +var publishLast_1 = require("./internal/operators/publishLast"); +Object.defineProperty(exports, "publishLast", { enumerable: true, get: function () { return publishLast_1.publishLast; } }); +var publishReplay_1 = require("./internal/operators/publishReplay"); +Object.defineProperty(exports, "publishReplay", { enumerable: true, get: function () { return publishReplay_1.publishReplay; } }); +var raceWith_1 = require("./internal/operators/raceWith"); +Object.defineProperty(exports, "raceWith", { enumerable: true, get: function () { return raceWith_1.raceWith; } }); +var reduce_1 = require("./internal/operators/reduce"); +Object.defineProperty(exports, "reduce", { enumerable: true, get: function () { return reduce_1.reduce; } }); +var repeat_1 = require("./internal/operators/repeat"); +Object.defineProperty(exports, "repeat", { enumerable: true, get: function () { return repeat_1.repeat; } }); +var repeatWhen_1 = require("./internal/operators/repeatWhen"); +Object.defineProperty(exports, "repeatWhen", { enumerable: true, get: function () { return repeatWhen_1.repeatWhen; } }); +var retry_1 = require("./internal/operators/retry"); +Object.defineProperty(exports, "retry", { enumerable: true, get: function () { return retry_1.retry; } }); +var retryWhen_1 = require("./internal/operators/retryWhen"); +Object.defineProperty(exports, "retryWhen", { enumerable: true, get: function () { return retryWhen_1.retryWhen; } }); +var refCount_1 = require("./internal/operators/refCount"); +Object.defineProperty(exports, "refCount", { enumerable: true, get: function () { return refCount_1.refCount; } }); +var sample_1 = require("./internal/operators/sample"); +Object.defineProperty(exports, "sample", { enumerable: true, get: function () { return sample_1.sample; } }); +var sampleTime_1 = require("./internal/operators/sampleTime"); +Object.defineProperty(exports, "sampleTime", { enumerable: true, get: function () { return sampleTime_1.sampleTime; } }); +var scan_1 = require("./internal/operators/scan"); +Object.defineProperty(exports, "scan", { enumerable: true, get: function () { return scan_1.scan; } }); +var sequenceEqual_1 = require("./internal/operators/sequenceEqual"); +Object.defineProperty(exports, "sequenceEqual", { enumerable: true, get: function () { return sequenceEqual_1.sequenceEqual; } }); +var share_1 = require("./internal/operators/share"); +Object.defineProperty(exports, "share", { enumerable: true, get: function () { return share_1.share; } }); +var shareReplay_1 = require("./internal/operators/shareReplay"); +Object.defineProperty(exports, "shareReplay", { enumerable: true, get: function () { return shareReplay_1.shareReplay; } }); +var single_1 = require("./internal/operators/single"); +Object.defineProperty(exports, "single", { enumerable: true, get: function () { return single_1.single; } }); +var skip_1 = require("./internal/operators/skip"); +Object.defineProperty(exports, "skip", { enumerable: true, get: function () { return skip_1.skip; } }); +var skipLast_1 = require("./internal/operators/skipLast"); +Object.defineProperty(exports, "skipLast", { enumerable: true, get: function () { return skipLast_1.skipLast; } }); +var skipUntil_1 = require("./internal/operators/skipUntil"); +Object.defineProperty(exports, "skipUntil", { enumerable: true, get: function () { return skipUntil_1.skipUntil; } }); +var skipWhile_1 = require("./internal/operators/skipWhile"); +Object.defineProperty(exports, "skipWhile", { enumerable: true, get: function () { return skipWhile_1.skipWhile; } }); +var startWith_1 = require("./internal/operators/startWith"); +Object.defineProperty(exports, "startWith", { enumerable: true, get: function () { return startWith_1.startWith; } }); +var subscribeOn_1 = require("./internal/operators/subscribeOn"); +Object.defineProperty(exports, "subscribeOn", { enumerable: true, get: function () { return subscribeOn_1.subscribeOn; } }); +var switchAll_1 = require("./internal/operators/switchAll"); +Object.defineProperty(exports, "switchAll", { enumerable: true, get: function () { return switchAll_1.switchAll; } }); +var switchMap_1 = require("./internal/operators/switchMap"); +Object.defineProperty(exports, "switchMap", { enumerable: true, get: function () { return switchMap_1.switchMap; } }); +var switchMapTo_1 = require("./internal/operators/switchMapTo"); +Object.defineProperty(exports, "switchMapTo", { enumerable: true, get: function () { return switchMapTo_1.switchMapTo; } }); +var switchScan_1 = require("./internal/operators/switchScan"); +Object.defineProperty(exports, "switchScan", { enumerable: true, get: function () { return switchScan_1.switchScan; } }); +var take_1 = require("./internal/operators/take"); +Object.defineProperty(exports, "take", { enumerable: true, get: function () { return take_1.take; } }); +var takeLast_1 = require("./internal/operators/takeLast"); +Object.defineProperty(exports, "takeLast", { enumerable: true, get: function () { return takeLast_1.takeLast; } }); +var takeUntil_1 = require("./internal/operators/takeUntil"); +Object.defineProperty(exports, "takeUntil", { enumerable: true, get: function () { return takeUntil_1.takeUntil; } }); +var takeWhile_1 = require("./internal/operators/takeWhile"); +Object.defineProperty(exports, "takeWhile", { enumerable: true, get: function () { return takeWhile_1.takeWhile; } }); +var tap_1 = require("./internal/operators/tap"); +Object.defineProperty(exports, "tap", { enumerable: true, get: function () { return tap_1.tap; } }); +var throttle_1 = require("./internal/operators/throttle"); +Object.defineProperty(exports, "throttle", { enumerable: true, get: function () { return throttle_1.throttle; } }); +var throttleTime_1 = require("./internal/operators/throttleTime"); +Object.defineProperty(exports, "throttleTime", { enumerable: true, get: function () { return throttleTime_1.throttleTime; } }); +var throwIfEmpty_1 = require("./internal/operators/throwIfEmpty"); +Object.defineProperty(exports, "throwIfEmpty", { enumerable: true, get: function () { return throwIfEmpty_1.throwIfEmpty; } }); +var timeInterval_1 = require("./internal/operators/timeInterval"); +Object.defineProperty(exports, "timeInterval", { enumerable: true, get: function () { return timeInterval_1.timeInterval; } }); +var timeout_2 = require("./internal/operators/timeout"); +Object.defineProperty(exports, "timeout", { enumerable: true, get: function () { return timeout_2.timeout; } }); +var timeoutWith_1 = require("./internal/operators/timeoutWith"); +Object.defineProperty(exports, "timeoutWith", { enumerable: true, get: function () { return timeoutWith_1.timeoutWith; } }); +var timestamp_1 = require("./internal/operators/timestamp"); +Object.defineProperty(exports, "timestamp", { enumerable: true, get: function () { return timestamp_1.timestamp; } }); +var toArray_1 = require("./internal/operators/toArray"); +Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return toArray_1.toArray; } }); +var window_1 = require("./internal/operators/window"); +Object.defineProperty(exports, "window", { enumerable: true, get: function () { return window_1.window; } }); +var windowCount_1 = require("./internal/operators/windowCount"); +Object.defineProperty(exports, "windowCount", { enumerable: true, get: function () { return windowCount_1.windowCount; } }); +var windowTime_1 = require("./internal/operators/windowTime"); +Object.defineProperty(exports, "windowTime", { enumerable: true, get: function () { return windowTime_1.windowTime; } }); +var windowToggle_1 = require("./internal/operators/windowToggle"); +Object.defineProperty(exports, "windowToggle", { enumerable: true, get: function () { return windowToggle_1.windowToggle; } }); +var windowWhen_1 = require("./internal/operators/windowWhen"); +Object.defineProperty(exports, "windowWhen", { enumerable: true, get: function () { return windowWhen_1.windowWhen; } }); +var withLatestFrom_1 = require("./internal/operators/withLatestFrom"); +Object.defineProperty(exports, "withLatestFrom", { enumerable: true, get: function () { return withLatestFrom_1.withLatestFrom; } }); +var zipAll_1 = require("./internal/operators/zipAll"); +Object.defineProperty(exports, "zipAll", { enumerable: true, get: function () { return zipAll_1.zipAll; } }); +var zipWith_1 = require("./internal/operators/zipWith"); +Object.defineProperty(exports, "zipWith", { enumerable: true, get: function () { return zipWith_1.zipWith; } }); + +},{"./internal/AsyncSubject":408,"./internal/BehaviorSubject":409,"./internal/Notification":410,"./internal/Observable":412,"./internal/ReplaySubject":413,"./internal/Scheduler":414,"./internal/Subject":415,"./internal/Subscriber":416,"./internal/Subscription":417,"./internal/config":418,"./internal/firstValueFrom":419,"./internal/lastValueFrom":420,"./internal/observable/ConnectableObservable":421,"./internal/observable/bindCallback":422,"./internal/observable/bindNodeCallback":424,"./internal/observable/combineLatest":425,"./internal/observable/concat":426,"./internal/observable/connectable":427,"./internal/observable/defer":428,"./internal/observable/dom/animationFrames":429,"./internal/observable/empty":430,"./internal/observable/forkJoin":431,"./internal/observable/from":432,"./internal/observable/fromEvent":433,"./internal/observable/fromEventPattern":434,"./internal/observable/generate":436,"./internal/observable/iif":437,"./internal/observable/interval":439,"./internal/observable/merge":440,"./internal/observable/never":441,"./internal/observable/of":442,"./internal/observable/onErrorResumeNext":443,"./internal/observable/pairs":444,"./internal/observable/partition":445,"./internal/observable/race":446,"./internal/observable/range":447,"./internal/observable/throwError":448,"./internal/observable/timer":449,"./internal/observable/using":450,"./internal/observable/zip":451,"./internal/operators/audit":453,"./internal/operators/auditTime":454,"./internal/operators/buffer":455,"./internal/operators/bufferCount":456,"./internal/operators/bufferTime":457,"./internal/operators/bufferToggle":458,"./internal/operators/bufferWhen":459,"./internal/operators/catchError":460,"./internal/operators/combineAll":461,"./internal/operators/combineLatestAll":463,"./internal/operators/combineLatestWith":464,"./internal/operators/concatAll":466,"./internal/operators/concatMap":467,"./internal/operators/concatMapTo":468,"./internal/operators/concatWith":469,"./internal/operators/connect":470,"./internal/operators/count":471,"./internal/operators/debounce":472,"./internal/operators/debounceTime":473,"./internal/operators/defaultIfEmpty":474,"./internal/operators/delay":475,"./internal/operators/delayWhen":476,"./internal/operators/dematerialize":477,"./internal/operators/distinct":478,"./internal/operators/distinctUntilChanged":479,"./internal/operators/distinctUntilKeyChanged":480,"./internal/operators/elementAt":481,"./internal/operators/endWith":482,"./internal/operators/every":483,"./internal/operators/exhaust":484,"./internal/operators/exhaustAll":485,"./internal/operators/exhaustMap":486,"./internal/operators/expand":487,"./internal/operators/filter":488,"./internal/operators/finalize":489,"./internal/operators/find":490,"./internal/operators/findIndex":491,"./internal/operators/first":492,"./internal/operators/flatMap":493,"./internal/operators/groupBy":494,"./internal/operators/ignoreElements":495,"./internal/operators/isEmpty":496,"./internal/operators/last":498,"./internal/operators/map":499,"./internal/operators/mapTo":500,"./internal/operators/materialize":501,"./internal/operators/max":502,"./internal/operators/mergeAll":504,"./internal/operators/mergeMap":506,"./internal/operators/mergeMapTo":507,"./internal/operators/mergeScan":508,"./internal/operators/mergeWith":509,"./internal/operators/min":510,"./internal/operators/multicast":511,"./internal/operators/observeOn":512,"./internal/operators/onErrorResumeNextWith":513,"./internal/operators/pairwise":514,"./internal/operators/pluck":515,"./internal/operators/publish":516,"./internal/operators/publishBehavior":517,"./internal/operators/publishLast":518,"./internal/operators/publishReplay":519,"./internal/operators/raceWith":520,"./internal/operators/reduce":521,"./internal/operators/refCount":522,"./internal/operators/repeat":523,"./internal/operators/repeatWhen":524,"./internal/operators/retry":525,"./internal/operators/retryWhen":526,"./internal/operators/sample":527,"./internal/operators/sampleTime":528,"./internal/operators/scan":529,"./internal/operators/sequenceEqual":531,"./internal/operators/share":532,"./internal/operators/shareReplay":533,"./internal/operators/single":534,"./internal/operators/skip":535,"./internal/operators/skipLast":536,"./internal/operators/skipUntil":537,"./internal/operators/skipWhile":538,"./internal/operators/startWith":539,"./internal/operators/subscribeOn":540,"./internal/operators/switchAll":541,"./internal/operators/switchMap":542,"./internal/operators/switchMapTo":543,"./internal/operators/switchScan":544,"./internal/operators/take":545,"./internal/operators/takeLast":546,"./internal/operators/takeUntil":547,"./internal/operators/takeWhile":548,"./internal/operators/tap":549,"./internal/operators/throttle":550,"./internal/operators/throttleTime":551,"./internal/operators/throwIfEmpty":552,"./internal/operators/timeInterval":553,"./internal/operators/timeout":554,"./internal/operators/timeoutWith":555,"./internal/operators/timestamp":556,"./internal/operators/toArray":557,"./internal/operators/window":558,"./internal/operators/windowCount":559,"./internal/operators/windowTime":560,"./internal/operators/windowToggle":561,"./internal/operators/windowWhen":562,"./internal/operators/withLatestFrom":563,"./internal/operators/zipAll":565,"./internal/operators/zipWith":566,"./internal/scheduled/scheduled":573,"./internal/scheduler/VirtualTimeScheduler":583,"./internal/scheduler/animationFrame":584,"./internal/scheduler/asap":586,"./internal/scheduler/async":587,"./internal/scheduler/queue":592,"./internal/symbol/observable":595,"./internal/types":596,"./internal/util/ArgumentOutOfRangeError":597,"./internal/util/EmptyError":598,"./internal/util/NotFoundError":600,"./internal/util/ObjectUnsubscribedError":601,"./internal/util/SequenceError":602,"./internal/util/UnsubscriptionError":603,"./internal/util/identity":612,"./internal/util/isObservable":619,"./internal/util/noop":625,"./internal/util/pipe":627}],408:[function(require,module,exports){ +"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.AsyncSubject = void 0; +var Subject_1 = require("./Subject"); +var AsyncSubject = (function (_super) { + __extends(AsyncSubject, _super); + function AsyncSubject() { + 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; + if (hasError) { + subscriber.error(thrownError); + } + else if (isStopped || _isComplete) { + _hasValue && subscriber.next(_value); + subscriber.complete(); + } + }; + AsyncSubject.prototype.next = function (value) { + if (!this.isStopped) { + this._value = value; + this._hasValue = true; + } + }; + AsyncSubject.prototype.complete = function () { + var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; + if (!_isComplete) { + this._isComplete = true; + _hasValue && _super.prototype.next.call(this, _value); + _super.prototype.complete.call(this); + } + }; + return AsyncSubject; +}(Subject_1.Subject)); +exports.AsyncSubject = AsyncSubject; -},{"define-data-property":351,"get-intrinsic":358,"gopd":359,"has-property-descriptors":361}],408:[function(require,module,exports){ -'use strict'; - -var define = require('define-data-property'); -var hasDescriptors = require('has-property-descriptors')(); -var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); - -var $TypeError = TypeError; +},{"./Subject":415}],409:[function(require,module,exports){ +"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.BehaviorSubject = void 0; +var Subject_1 = require("./Subject"); +var BehaviorSubject = (function (_super) { + __extends(BehaviorSubject, _super); + function BehaviorSubject(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject.prototype, "value", { + get: function () { + return this.getValue(); + }, + enumerable: false, + configurable: true + }); + BehaviorSubject.prototype._subscribe = function (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; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + }; + BehaviorSubject.prototype.next = function (value) { + _super.prototype.next.call(this, (this._value = value)); + }; + return BehaviorSubject; +}(Subject_1.Subject)); +exports.BehaviorSubject = BehaviorSubject; -module.exports = function setFunctionName(fn, name) { - if (typeof fn !== 'function') { - throw new $TypeError('`fn` is not a function'); - } - var loose = arguments.length > 2 && !!arguments[2]; - if (!loose || functionsHaveConfigurableNames) { - if (hasDescriptors) { - define(fn, 'name', name, true, true); - } else { - define(fn, 'name', name); - } - } - return fn; -}; +},{"./Subject":415}],410:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.observeNotification = exports.Notification = exports.NotificationKind = void 0; +var empty_1 = require("./observable/empty"); +var of_1 = require("./observable/of"); +var throwError_1 = require("./observable/throwError"); +var isFunction_1 = require("./util/isFunction"); +var NotificationKind; +(function (NotificationKind) { + NotificationKind["NEXT"] = "N"; + NotificationKind["ERROR"] = "E"; + NotificationKind["COMPLETE"] = "C"; +})(NotificationKind = exports.NotificationKind || (exports.NotificationKind = {})); +var Notification = (function () { + function Notification(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === 'N'; + } + 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) { + var _a; + return isFunction_1.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_1.of(value) + : + kind === 'E' + ? + throwError_1.throwError(function () { return error; }) + : + kind === 'C' + ? + empty_1.EMPTY + : + 0; + if (!result) { + throw new TypeError("Unexpected notification kind " + kind); + } + return result; + }; + Notification.createNext = function (value) { + return new Notification('N', value); + }; + Notification.createError = function (err) { + return new Notification('E', undefined, err); + }; + Notification.createComplete = function () { + return Notification.completeNotification; + }; + Notification.completeNotification = new Notification('C'); + return Notification; +}()); +exports.Notification = Notification; +function observeNotification(notification, observer) { + var _a, _b, _c; + 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); +} +exports.observeNotification = observeNotification; -},{"define-data-property":351,"functions-have-names":357,"has-property-descriptors":361}],409:[function(require,module,exports){ -'use strict'; +},{"./observable/empty":430,"./observable/of":442,"./observable/throwError":448,"./util/isFunction":616}],411:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createNotification = exports.nextNotification = exports.errorNotification = exports.COMPLETE_NOTIFICATION = void 0; +exports.COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })(); +function errorNotification(error) { + return createNotification('E', undefined, error); +} +exports.errorNotification = errorNotification; +function nextNotification(value) { + return createNotification('N', value, undefined); +} +exports.nextNotification = nextNotification; +function createNotification(kind, value, error) { + return { + kind: kind, + value: value, + error: error, + }; +} +exports.createNotification = createNotification; -var GetIntrinsic = require('get-intrinsic'); -var callBound = require('call-bind/callBound'); -var inspect = require('object-inspect'); +},{}],412:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Observable = void 0; +var Subscriber_1 = require("./Subscriber"); +var Subscription_1 = require("./Subscription"); +var observable_1 = require("./symbol/observable"); +var pipe_1 = require("./util/pipe"); +var config_1 = require("./config"); +var isFunction_1 = require("./util/isFunction"); +var errorContext_1 = require("./util/errorContext"); +var Observable = (function () { + function Observable(subscribe) { + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable.prototype.lift = function (operator) { + var observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable.prototype.subscribe = function (observerOrNext, error, complete) { + var _this = this; + var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new Subscriber_1.SafeSubscriber(observerOrNext, error, complete); + errorContext_1.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)); + }); + return subscriber; + }; + Observable.prototype._trySubscribe = function (sink) { + try { + return this._subscribe(sink); + } + catch (err) { + sink.error(err); + } + }; + Observable.prototype.forEach = function (next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var subscriber = new Subscriber_1.SafeSubscriber({ + next: function (value) { + try { + next(value); + } + catch (err) { + reject(err); + subscriber.unsubscribe(); + } + }, + error: reject, + 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); + }; + Observable.prototype[observable_1.observable] = function () { + return this; + }; + Observable.prototype.pipe = function () { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + return pipe_1.pipeFromArray(operations)(this); + }; + Observable.prototype.toPromise = function (promiseCtor) { + var _this = this; + 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); }); + }); + }; + Observable.create = function (subscribe) { + return new Observable(subscribe); + }; + return Observable; +}()); +exports.Observable = Observable; +function getPromiseCtor(promiseCtor) { + var _a; + return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config_1.config.Promise) !== null && _a !== void 0 ? _a : Promise; +} +function isObserver(value) { + return value && isFunction_1.isFunction(value.next) && isFunction_1.isFunction(value.error) && isFunction_1.isFunction(value.complete); +} +function isSubscriber(value) { + return (value && value instanceof Subscriber_1.Subscriber) || (isObserver(value) && Subscription_1.isSubscription(value)); +} -var $TypeError = GetIntrinsic('%TypeError%'); -var $WeakMap = GetIntrinsic('%WeakMap%', true); -var $Map = GetIntrinsic('%Map%', true); +},{"./Subscriber":416,"./Subscription":417,"./config":418,"./symbol/observable":595,"./util/errorContext":610,"./util/isFunction":616,"./util/pipe":627}],413:[function(require,module,exports){ +"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.ReplaySubject = void 0; +var Subject_1 = require("./Subject"); +var dateTimestampProvider_1 = require("./scheduler/dateTimestampProvider"); +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_1.dateTimestampProvider; } + var _this = _super.call(this) || this; + _this._bufferSize = _bufferSize; + _this._windowTime = _windowTime; + _this._timestampProvider = _timestampProvider; + _this._buffer = []; + _this._infiniteTimeWindow = true; + _this._infiniteTimeWindow = _windowTime === Infinity; + _this._bufferSize = Math.max(1, _bufferSize); + _this._windowTime = Math.max(1, _windowTime); + 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; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + _super.prototype.next.call(this, value); + }; + ReplaySubject.prototype._subscribe = function (subscriber) { + this._throwIfClosed(); + this._trimBuffer(); + var subscription = this._innerSubscribe(subscriber); + 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) { + 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); + if (!_infiniteTimeWindow) { + var now = _timestampProvider.now(); + var last = 0; + for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { + last = i; + } + last && _buffer.splice(0, last + 1); + } + }; + return ReplaySubject; +}(Subject_1.Subject)); +exports.ReplaySubject = ReplaySubject; -var $weakMapGet = callBound('WeakMap.prototype.get', true); -var $weakMapSet = callBound('WeakMap.prototype.set', true); -var $weakMapHas = callBound('WeakMap.prototype.has', true); -var $mapGet = callBound('Map.prototype.get', true); -var $mapSet = callBound('Map.prototype.set', true); -var $mapHas = callBound('Map.prototype.has', true); +},{"./Subject":415,"./scheduler/dateTimestampProvider":588}],414:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Scheduler = void 0; +var dateTimestampProvider_1 = require("./scheduler/dateTimestampProvider"); +var Scheduler = (function () { + function Scheduler(schedulerActionCtor, 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); + }; + Scheduler.now = dateTimestampProvider_1.dateTimestampProvider.now; + return Scheduler; +}()); +exports.Scheduler = Scheduler; -/* - * This function traverses the list returning the node corresponding to the - * given key. - * - * That node is also moved to the head of the list, so that if it's accessed - * again we don't need to traverse the whole list. By doing so, all the recently - * used nodes can be accessed relatively quickly. - */ -var listGetNode = function (list, key) { // eslint-disable-line consistent-return - for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { - if (curr.key === key) { - prev.next = curr.next; - curr.next = list.next; - list.next = curr; // eslint-disable-line no-param-reassign - return curr; - } - } +},{"./scheduler/dateTimestampProvider":588}],415:[function(require,module,exports){ +"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 __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."); }; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AnonymousSubject = exports.Subject = void 0; +var Observable_1 = require("./Observable"); +var Subscription_1 = require("./Subscription"); +var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError"); +var arrRemove_1 = require("./util/arrRemove"); +var errorContext_1 = require("./util/errorContext"); +var Subject = (function (_super) { + __extends(Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.closed = false; + _this.currentObservers = null; + _this.observers = []; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype._throwIfClosed = function () { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + }; + Subject.prototype.next = function (value) { + var _this = this; + errorContext_1.errorContext(function () { + var e_1, _a; + _this._throwIfClosed(); + if (!_this.isStopped) { + if (!_this.currentObservers) { + _this.currentObservers = Array.from(_this.observers); + } + try { + for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { + var observer = _c.value; + observer.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + }); + }; + Subject.prototype.error = function (err) { + var _this = this; + errorContext_1.errorContext(function () { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.hasError = _this.isStopped = true; + _this.thrownError = err; + var observers = _this.observers; + while (observers.length) { + observers.shift().error(err); + } + } + }); + }; + Subject.prototype.complete = function () { + var _this = this; + errorContext_1.errorContext(function () { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.isStopped = true; + var observers = _this.observers; + while (observers.length) { + observers.shift().complete(); + } + } + }); + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = this.closed = true; + this.observers = this.currentObservers = null; + }; + Object.defineProperty(Subject.prototype, "observed", { + get: function () { + var _a; + return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + }, + enumerable: false, + configurable: true + }); + Subject.prototype._trySubscribe = function (subscriber) { + this._throwIfClosed(); + return _super.prototype._trySubscribe.call(this, subscriber); + }; + Subject.prototype._subscribe = function (subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + }; + Subject.prototype._innerSubscribe = function (subscriber) { + var _this = this; + var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; + if (hasError || isStopped) { + return Subscription_1.EMPTY_SUBSCRIPTION; + } + this.currentObservers = null; + observers.push(subscriber); + return new Subscription_1.Subscription(function () { + _this.currentObservers = null; + arrRemove_1.arrRemove(observers, subscriber); + }); + }; + Subject.prototype._checkFinalizedStatuses = function (subscriber) { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; + if (hasError) { + subscriber.error(thrownError); + } + else if (isStopped) { + subscriber.complete(); + } + }; + Subject.prototype.asObservable = function () { + var observable = new Observable_1.Observable(); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; +}(Observable_1.Observable)); +exports.Subject = Subject; +var AnonymousSubject = (function (_super) { + __extends(AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + 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); + }; + 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); + }; + 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); + }; + 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 : Subscription_1.EMPTY_SUBSCRIPTION; + }; + return AnonymousSubject; +}(Subject)); +exports.AnonymousSubject = AnonymousSubject; -var listGet = function (objects, key) { - var node = listGetNode(objects, key); - return node && node.value; -}; -var listSet = function (objects, key, value) { - var node = listGetNode(objects, key); - if (node) { - node.value = value; - } else { - // Prepend the new node to the beginning of the list - objects.next = { // eslint-disable-line no-param-reassign - key: key, - next: objects.next, - value: value - }; - } -}; -var listHas = function (objects, key) { +},{"./Observable":412,"./Subscription":417,"./util/ObjectUnsubscribedError":601,"./util/arrRemove":607,"./util/errorContext":610}],416:[function(require,module,exports){ +"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.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 Subscriber = (function (_super) { + __extends(Subscriber, _super); + function Subscriber(destination) { + var _this = _super.call(this) || this; + _this.isStopped = false; + if (destination) { + _this.destination = destination; + if (Subscription_1.isSubscription(destination)) { + destination.add(_this); + } + } + else { + _this.destination = exports.EMPTY_OBSERVER; + } + return _this; + } + Subscriber.create = function (next, error, complete) { + return new SafeSubscriber(next, error, complete); + }; + Subscriber.prototype.next = function (value) { + if (this.isStopped) { + 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 { + this.isStopped = true; + this._error(err); + } + }; + Subscriber.prototype.complete = function () { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.COMPLETE_NOTIFICATION, this); + } + else { + this.isStopped = true; + this._complete(); + } + }; + Subscriber.prototype.unsubscribe = function () { + if (!this.closed) { + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + this.destination = null; + } + }; + Subscriber.prototype._next = function (value) { + this.destination.next(value); + }; + Subscriber.prototype._error = function (err) { + try { + this.destination.error(err); + } + finally { + this.unsubscribe(); + } + }; + Subscriber.prototype._complete = function () { + try { + this.destination.complete(); + } + finally { + this.unsubscribe(); + } + }; + return Subscriber; +}(Subscription_1.Subscription)); +exports.Subscriber = Subscriber; +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 partialObserver; + if (isFunction_1.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_1.config.useDeprecatedNextContext) { + context_1 = Object.create(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; + } + } + _this.destination = new ConsumerObserver(partialObserver); + return _this; + } + return SafeSubscriber; +}(Subscriber)); +exports.SafeSubscriber = SafeSubscriber; +function handleUnhandledError(error) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + errorContext_1.captureError(error); + } + else { + reportUnhandledError_1.reportUnhandledError(error); + } +} +function defaultErrorHandler(err) { + throw err; +} +function handleStoppedNotification(notification, subscriber) { + var onStoppedNotification = config_1.config.onStoppedNotification; + 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, +}; + +},{"./NotificationFactories":411,"./Subscription":417,"./config":418,"./scheduler/timeoutProvider":593,"./util/errorContext":610,"./util/isFunction":616,"./util/noop":625,"./util/reportUnhandledError":628}],417:[function(require,module,exports){ +"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."); +}; +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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isSubscription = exports.EMPTY_SUBSCRIPTION = exports.Subscription = void 0; +var isFunction_1 = require("./util/isFunction"); +var UnsubscriptionError_1 = require("./util/UnsubscriptionError"); +var arrRemove_1 = require("./util/arrRemove"); +var Subscription = (function () { + function Subscription(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._finalizers = null; + } + Subscription.prototype.unsubscribe = function () { + var e_1, _a, e_2, _b; + var errors; + if (!this.closed) { + this.closed = true; + var _parentage = this._parentage; + if (_parentage) { + 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()) { + var parent_1 = _parentage_1_1.value; + parent_1.remove(this); + } + } + 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); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + _parentage.remove(this); + } + } + var initialFinalizer = this.initialTeardown; + if (isFunction_1.isFunction(initialFinalizer)) { + try { + initialFinalizer(); + } + catch (e) { + errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? e.errors : [e]; + } + } + var _finalizers = this._finalizers; + if (_finalizers) { + this._finalizers = null; + try { + for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { + var finalizer = _finalizers_1_1.value; + try { + execFinalizer(finalizer); + } + catch (err) { + errors = errors !== null && errors !== void 0 ? errors : []; + if (err instanceof UnsubscriptionError_1.UnsubscriptionError) { + errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); + } + else { + errors.push(err); + } + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); + } + finally { if (e_2) throw e_2.error; } + } + } + if (errors) { + throw new UnsubscriptionError_1.UnsubscriptionError(errors); + } + } + }; + Subscription.prototype.add = function (teardown) { + var _a; + if (teardown && teardown !== this) { + if (this.closed) { + execFinalizer(teardown); + } + else { + if (teardown instanceof Subscription) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._finalizers = (_a = this._finalizers) !== 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)); + }; + Subscription.prototype._addParent = function (parent) { + var _parentage = this._parentage; + 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)) { + arrRemove_1.arrRemove(_parentage, parent); + } + }; + Subscription.prototype.remove = function (teardown) { + var _finalizers = this._finalizers; + _finalizers && arrRemove_1.arrRemove(_finalizers, teardown); + if (teardown instanceof Subscription) { + teardown._removeParent(this); + } + }; + Subscription.EMPTY = (function () { + var empty = new Subscription(); + empty.closed = true; + return empty; + })(); + return Subscription; +}()); +exports.Subscription = Subscription; +exports.EMPTY_SUBSCRIPTION = Subscription.EMPTY; +function isSubscription(value) { + return (value instanceof Subscription || + (value && 'closed' in value && isFunction_1.isFunction(value.remove) && isFunction_1.isFunction(value.add) && isFunction_1.isFunction(value.unsubscribe))); +} +exports.isSubscription = isSubscription; +function execFinalizer(finalizer) { + if (isFunction_1.isFunction(finalizer)) { + finalizer(); + } + else { + finalizer.unsubscribe(); + } +} + +},{"./util/UnsubscriptionError":603,"./util/arrRemove":607,"./util/isFunction":616}],418:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.config = void 0; +exports.config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: undefined, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false, +}; + +},{}],419:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.firstValueFrom = void 0; +var EmptyError_1 = require("./util/EmptyError"); +var Subscriber_1 = require("./Subscriber"); +function firstValueFrom(source, config) { + var hasConfig = typeof config === 'object'; + return new Promise(function (resolve, reject) { + var subscriber = new Subscriber_1.SafeSubscriber({ + next: function (value) { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: function () { + if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError_1.EmptyError()); + } + }, + }); + source.subscribe(subscriber); + }); +} +exports.firstValueFrom = firstValueFrom; + +},{"./Subscriber":416,"./util/EmptyError":598}],420:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lastValueFrom = void 0; +var EmptyError_1 = require("./util/EmptyError"); +function lastValueFrom(source, config) { + var hasConfig = typeof config === 'object'; + return new Promise(function (resolve, reject) { + var _hasValue = false; + var _value; + source.subscribe({ + next: function (value) { + _value = value; + _hasValue = true; + }, + error: reject, + complete: function () { + if (_hasValue) { + resolve(_value); + } + else if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError_1.EmptyError()); + } + }, + }); + }); +} +exports.lastValueFrom = lastValueFrom; + +},{"./util/EmptyError":598}],421:[function(require,module,exports){ +"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 ConnectableObservable = (function (_super) { + __extends(ConnectableObservable, _super); + function ConnectableObservable(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._subject = null; + _this._refCount = 0; + _this._connection = null; + if (lift_1.hasLift(source)) { + _this.lift = source.lift; + } + return _this; + } + ConnectableObservable.prototype._subscribe = function (subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable.prototype.getSubject = function () { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable.prototype._teardown = function () { + this._refCount = 0; + var _connection = this._connection; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + }; + ConnectableObservable.prototype.connect = function () { + var _this = this; + var connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription_1.Subscription(); + var subject_1 = this.getSubject(); + connection.add(this.source.subscribe(OperatorSubscriber_1.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_1.Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable.prototype.refCount = function () { + return refCount_1.refCount()(this); + }; + return ConnectableObservable; +}(Observable_1.Observable)); +exports.ConnectableObservable = ConnectableObservable; + +},{"../Observable":412,"../Subscription":417,"../operators/OperatorSubscriber":452,"../operators/refCount":522,"../util/lift":623}],422:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bindCallback = void 0; +var bindCallbackInternals_1 = require("./bindCallbackInternals"); +function bindCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); +} +exports.bindCallback = bindCallback; + +},{"./bindCallbackInternals":423}],423:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bindCallbackInternals = void 0; +var isScheduler_1 = require("../util/isScheduler"); +var Observable_1 = require("../Observable"); +var subscribeOn_1 = require("../operators/subscribeOn"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var observeOn_1 = require("../operators/observeOn"); +var AsyncSubject_1 = require("../AsyncSubject"); +function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler = resultSelector; + } + else { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) + .apply(this, args) + .pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + }; + } + } + if (scheduler) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc) + .apply(this, args) + .pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); + }; + } + return function () { + var _this = this; + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var subject = new AsyncSubject_1.AsyncSubject(); + var uninitialized = true; + return new Observable_1.Observable(function (subscriber) { + var subs = subject.subscribe(subscriber); + if (uninitialized) { + 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; + } + } + subject.next(1 < results.length ? results : results[0]); + isComplete_1 = true; + if (isAsync_1) { + subject.complete(); + } + }, + ])); + if (isComplete_1) { + subject.complete(); + } + isAsync_1 = true; + } + return subs; + }); + }; +} +exports.bindCallbackInternals = bindCallbackInternals; + +},{"../AsyncSubject":408,"../Observable":412,"../operators/observeOn":512,"../operators/subscribeOn":540,"../util/isScheduler":622,"../util/mapOneOrManyArgs":624}],424:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bindNodeCallback = void 0; +var bindCallbackInternals_1 = require("./bindCallbackInternals"); +function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); +} +exports.bindNodeCallback = bindNodeCallback; + +},{"./bindCallbackInternals":423}],425:[function(require,module,exports){ +"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"); +function combineLatest() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + var resultSelector = args_1.popResultSelector(args); + 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; +} +exports.combineLatest = combineLatest; +function combineLatestInit(observables, scheduler, valueTransform) { + 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(OperatorSubscriber_1.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); + }; +} +exports.combineLatestInit = combineLatestInit; +function maybeSchedule(scheduler, execute, subscription) { + if (scheduler) { + executeSchedule_1.executeSchedule(subscription, scheduler, execute); + } + else { + execute(); + } +} + +},{"../Observable":412,"../operators/OperatorSubscriber":452,"../util/args":604,"../util/argsArgArrayOrObject":605,"../util/createObject":609,"../util/executeSchedule":611,"../util/identity":612,"../util/mapOneOrManyArgs":624,"./from":432}],426:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concat = void 0; +var concatAll_1 = require("../operators/concatAll"); +var args_1 = require("../util/args"); +var from_1 = require("./from"); +function concat() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return concatAll_1.concatAll()(from_1.from(args, args_1.popScheduler(args))); +} +exports.concat = concat; + +},{"../operators/concatAll":466,"../util/args":604,"./from":432}],427:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.connectable = void 0; +var Subject_1 = require("../Subject"); +var Observable_1 = require("../Observable"); +var defer_1 = require("./defer"); +var DEFAULT_CONFIG = { + connector: function () { return new Subject_1.Subject(); }, + resetOnDisconnect: true, +}; +function connectable(source, 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 subject = connector(); + var result = new Observable_1.Observable(function (subscriber) { + return subject.subscribe(subscriber); + }); + result.connect = function () { + if (!connection || connection.closed) { + connection = defer_1.defer(function () { return source; }).subscribe(subject); + if (resetOnDisconnect) { + connection.add(function () { return (subject = connector()); }); + } + } + return connection; + }; + return result; +} +exports.connectable = connectable; + +},{"../Observable":412,"../Subject":415,"./defer":428}],428:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defer = void 0; +var Observable_1 = require("../Observable"); +var innerFrom_1 = require("./innerFrom"); +function defer(observableFactory) { + return new Observable_1.Observable(function (subscriber) { + innerFrom_1.innerFrom(observableFactory()).subscribe(subscriber); + }); +} +exports.defer = defer; + +},{"../Observable":412,"./innerFrom":438}],429:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.animationFrames = void 0; +var Observable_1 = require("../../Observable"); +var performanceTimestampProvider_1 = require("../../scheduler/performanceTimestampProvider"); +var animationFrameProvider_1 = require("../../scheduler/animationFrameProvider"); +function animationFrames(timestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; +} +exports.animationFrames = animationFrames; +function animationFramesFactory(timestampProvider) { + return new Observable_1.Observable(function (subscriber) { + var provider = timestampProvider || performanceTimestampProvider_1.performanceTimestampProvider; + var start = provider.now(); + var id = 0; + var run = function () { + if (!subscriber.closed) { + id = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function (timestamp) { + id = 0; + var now = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now : timestamp, + elapsed: now - start, + }); + run(); + }); + } + }; + run(); + return function () { + if (id) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); + } + }; + }); +} +var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); + +},{"../../Observable":412,"../../scheduler/animationFrameProvider":585,"../../scheduler/performanceTimestampProvider":591}],430:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.empty = exports.EMPTY = void 0; +var Observable_1 = require("../Observable"); +exports.EMPTY = new Observable_1.Observable(function (subscriber) { return subscriber.complete(); }); +function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : exports.EMPTY; +} +exports.empty = empty; +function emptyScheduled(scheduler) { + return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); +} + +},{"../Observable":412}],431:[function(require,module,exports){ +"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"); +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 result = new Observable_1.Observable(function (subscriber) { + var length = sources.length; + if (!length) { + subscriber.complete(); + return; + } + var values = new Array(length); + var remainingCompletions = length; + var remainingEmissions = length; + var _loop_1 = function (sourceIndex) { + var hasValue = false; + innerFrom_1.innerFrom(sources[sourceIndex]).subscribe(OperatorSubscriber_1.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_1.createObject(keys, values) : values); + } + subscriber.complete(); + } + })); + }; + for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { + _loop_1(sourceIndex); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; +} +exports.forkJoin = forkJoin; + +},{"../Observable":412,"../operators/OperatorSubscriber":452,"../util/args":604,"../util/argsArgArrayOrObject":605,"../util/createObject":609,"../util/mapOneOrManyArgs":624,"./innerFrom":438}],432:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.from = void 0; +var scheduled_1 = require("../scheduled/scheduled"); +var innerFrom_1 = require("./innerFrom"); +function from(input, scheduler) { + return scheduler ? scheduled_1.scheduled(input, scheduler) : innerFrom_1.innerFrom(input); +} +exports.from = from; + +},{"../scheduled/scheduled":573,"./innerFrom":438}],433:[function(require,module,exports){ +"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 { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromEvent = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var Observable_1 = require("../Observable"); +var mergeMap_1 = require("../operators/mergeMap"); +var isArrayLike_1 = require("../util/isArrayLike"); +var isFunction_1 = require("../util/isFunction"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var nodeEventEmitterMethods = ['addListener', 'removeListener']; +var eventTargetMethods = ['addEventListener', 'removeEventListener']; +var jqueryMethods = ['on', 'off']; +function fromEvent(target, eventName, options, resultSelector) { + if (isFunction_1.isFunction(options)) { + resultSelector = options; + options = undefined; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs_1.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)) + : isJQueryStyleEventEmitter(target) + ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) + : [], 2), add = _a[0], remove = _a[1]; + if (!add) { + if (isArrayLike_1.isArrayLike(target)) { + return mergeMap_1.mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom_1.innerFrom(target)); + } + } + if (!add) { + throw new TypeError('Invalid event target'); + } + return new Observable_1.Observable(function (subscriber) { + var handler = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return subscriber.next(1 < args.length ? args : args[0]); + }; + add(handler); + return function () { return remove(handler); }; + }); +} +exports.fromEvent = fromEvent; +function toCommonHandlerRegistry(target, eventName) { + return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; }; +} +function isNodeStyleEventEmitter(target) { + return isFunction_1.isFunction(target.addListener) && isFunction_1.isFunction(target.removeListener); +} +function isJQueryStyleEventEmitter(target) { + return isFunction_1.isFunction(target.on) && isFunction_1.isFunction(target.off); +} +function isEventTarget(target) { + return isFunction_1.isFunction(target.addEventListener) && isFunction_1.isFunction(target.removeEventListener); +} + +},{"../Observable":412,"../observable/innerFrom":438,"../operators/mergeMap":506,"../util/isArrayLike":613,"../util/isFunction":616,"../util/mapOneOrManyArgs":624}],434:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromEventPattern = void 0; +var Observable_1 = require("../Observable"); +var isFunction_1 = require("../util/isFunction"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + return new Observable_1.Observable(function (subscriber) { + var handler = function () { + var e = []; + for (var _i = 0; _i < arguments.length; _i++) { + e[_i] = arguments[_i]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue = addHandler(handler); + return isFunction_1.isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined; + }); +} +exports.fromEventPattern = fromEventPattern; + +},{"../Observable":412,"../util/isFunction":616,"../util/mapOneOrManyArgs":624}],435:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromSubscribable = void 0; +var Observable_1 = require("../Observable"); +function fromSubscribable(subscribable) { + return new Observable_1.Observable(function (subscriber) { return subscribable.subscribe(subscriber); }); +} +exports.fromSubscribable = fromSubscribable; + +},{"../Observable":412}],436:[function(require,module,exports){ +"use strict"; +var __generator = (this && this.__generator) || function (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 }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generate = void 0; +var identity_1 = require("../util/identity"); +var isScheduler_1 = require("../util/isScheduler"); +var defer_1 = require("./defer"); +var scheduleIterable_1 = require("../scheduled/scheduleIterable"); +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_1.identity : _b, scheduler = _a.scheduler); + } + else { + initialState = initialStateOrOptions; + if (!resultSelectorOrScheduler || isScheduler_1.isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity_1.identity; + scheduler = resultSelectorOrScheduler; + } + else { + resultSelector = resultSelectorOrScheduler; + } + } + function gen() { + var state; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + state = initialState; + _a.label = 1; + case 1: + if (!(!condition || condition(state))) return [3, 4]; + return [4, resultSelector(state)]; + case 2: + _a.sent(); + _a.label = 3; + case 3: + state = iterate(state); + return [3, 1]; + case 4: return [2]; + } + }); + } + return defer_1.defer((scheduler + ? + function () { return scheduleIterable_1.scheduleIterable(gen(), scheduler); } + : + gen)); +} +exports.generate = generate; + +},{"../scheduled/scheduleIterable":569,"../util/identity":612,"../util/isScheduler":622,"./defer":428}],437:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.iif = void 0; +var defer_1 = require("./defer"); +function iif(condition, trueResult, falseResult) { + return defer_1.defer(function () { return (condition() ? trueResult : falseResult); }); +} +exports.iif = iif; + +},{"./defer":428}],438:[function(require,module,exports){ +(function (process){(function (){ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (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()); + }); +}; +var __generator = (this && this.__generator) || function (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 }; + } +}; +var __asyncValues = (this && this.__asyncValues) || function (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); } +}; +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."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromReadableStreamLike = exports.fromAsyncIterable = exports.fromIterable = exports.fromPromise = exports.fromArrayLike = exports.fromInteropObservable = exports.innerFrom = void 0; +var isArrayLike_1 = require("../util/isArrayLike"); +var isPromise_1 = require("../util/isPromise"); +var Observable_1 = require("../Observable"); +var isInteropObservable_1 = require("../util/isInteropObservable"); +var isAsyncIterable_1 = require("../util/isAsyncIterable"); +var throwUnobservableError_1 = require("../util/throwUnobservableError"); +var isIterable_1 = require("../util/isIterable"); +var isReadableStreamLike_1 = require("../util/isReadableStreamLike"); +var isFunction_1 = require("../util/isFunction"); +var reportUnhandledError_1 = require("../util/reportUnhandledError"); +var observable_1 = require("../symbol/observable"); +function innerFrom(input) { + if (input instanceof Observable_1.Observable) { + return input; + } + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return fromInteropObservable(input); + } + if (isArrayLike_1.isArrayLike(input)) { + return fromArrayLike(input); + } + if (isPromise_1.isPromise(input)) { + return fromPromise(input); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return fromAsyncIterable(input); + } + if (isIterable_1.isIterable(input)) { + return fromIterable(input); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return fromReadableStreamLike(input); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); +} +exports.innerFrom = innerFrom; +function fromInteropObservable(obj) { + return new Observable_1.Observable(function (subscriber) { + var obs = obj[observable_1.observable](); + if (isFunction_1.isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + }); +} +exports.fromInteropObservable = fromInteropObservable; +function fromArrayLike(array) { + return new Observable_1.Observable(function (subscriber) { + for (var i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); +} +exports.fromArrayLike = fromArrayLike; +function fromPromise(promise) { + return new Observable_1.Observable(function (subscriber) { + promise + .then(function (value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function (err) { return subscriber.error(err); }) + .then(null, reportUnhandledError_1.reportUnhandledError); + }); +} +exports.fromPromise = fromPromise; +function fromIterable(iterable) { + return new Observable_1.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()) { + var value = iterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } + 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); + } + finally { if (e_1) throw e_1.error; } + } + subscriber.complete(); + }); +} +exports.fromIterable = fromIterable; +function fromAsyncIterable(asyncIterable) { + return new Observable_1.Observable(function (subscriber) { + process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); }); + }); +} +exports.fromAsyncIterable = fromAsyncIterable; +function fromReadableStreamLike(readableStream) { + return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream)); +} +exports.fromReadableStreamLike = fromReadableStreamLike; +function process(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_2, _a; + return __awaiter(this, void 0, void 0, function () { + var value, e_2_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 5, 6, 11]); + asyncIterable_1 = __asyncValues(asyncIterable); + _b.label = 1; + case 1: return [4, asyncIterable_1.next()]; + case 2: + 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 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]; + return [4, _a.call(asyncIterable_1)]; + case 7: + _b.sent(); + _b.label = 8; + case 8: return [3, 10]; + case 9: + if (e_2) throw e_2.error; + return [7]; + case 10: return [7]; + case 11: + subscriber.complete(); + return [2]; + } + }); + }); +} + +}).call(this)}).call(this,require('_process')) +},{"../Observable":412,"../symbol/observable":595,"../util/isArrayLike":613,"../util/isAsyncIterable":614,"../util/isFunction":616,"../util/isInteropObservable":617,"../util/isIterable":618,"../util/isPromise":620,"../util/isReadableStreamLike":621,"../util/reportUnhandledError":628,"../util/throwUnobservableError":629,"_process":401}],439:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.interval = void 0; +var async_1 = require("../scheduler/async"); +var timer_1 = require("./timer"); +function interval(period, scheduler) { + if (period === void 0) { period = 0; } + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + if (period < 0) { + period = 0; + } + return timer_1.timer(period, period, scheduler); +} +exports.interval = interval; + +},{"../scheduler/async":587,"./timer":449}],440:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.merge = void 0; +var mergeAll_1 = require("../operators/mergeAll"); +var innerFrom_1 = require("./innerFrom"); +var empty_1 = require("./empty"); +var args_1 = require("../util/args"); +var from_1 = require("./from"); +function merge() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + var concurrent = args_1.popNumber(args, Infinity); + var sources = args; + return !sources.length + ? + empty_1.EMPTY + : sources.length === 1 + ? + innerFrom_1.innerFrom(sources[0]) + : + mergeAll_1.mergeAll(concurrent)(from_1.from(sources, scheduler)); +} +exports.merge = merge; + +},{"../operators/mergeAll":504,"../util/args":604,"./empty":430,"./from":432,"./innerFrom":438}],441:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.never = exports.NEVER = void 0; +var Observable_1 = require("../Observable"); +var noop_1 = require("../util/noop"); +exports.NEVER = new Observable_1.Observable(noop_1.noop); +function never() { + return exports.NEVER; +} +exports.never = never; + +},{"../Observable":412,"../util/noop":625}],442:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.of = void 0; +var args_1 = require("../util/args"); +var from_1 = require("./from"); +function of() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + return from_1.from(args, scheduler); +} +exports.of = of; + +},{"../util/args":604,"./from":432}],443:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.onErrorResumeNext = void 0; +var Observable_1 = require("../Observable"); +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); +var noop_1 = require("../util/noop"); +var innerFrom_1 = require("./innerFrom"); +function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return new Observable_1.Observable(function (subscriber) { + var sourceIndex = 0; + var subscribeNext = function () { + if (sourceIndex < nextSources.length) { + var nextSource = void 0; + try { + nextSource = innerFrom_1.innerFrom(nextSources[sourceIndex++]); + } + catch (err) { + subscribeNext(); + return; + } + var innerSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, noop_1.noop, noop_1.noop); + nextSource.subscribe(innerSubscriber); + innerSubscriber.add(subscribeNext); + } + else { + subscriber.complete(); + } + }; + subscribeNext(); + }); +} +exports.onErrorResumeNext = onErrorResumeNext; + +},{"../Observable":412,"../operators/OperatorSubscriber":452,"../util/argsOrArgArray":606,"../util/noop":625,"./innerFrom":438}],444:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pairs = void 0; +var from_1 = require("./from"); +function pairs(obj, scheduler) { + return from_1.from(Object.entries(obj), scheduler); +} +exports.pairs = pairs; + +},{"./from":432}],445:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.partition = void 0; +var not_1 = require("../util/not"); +var filter_1 = require("../operators/filter"); +var innerFrom_1 = require("./innerFrom"); +function partition(source, predicate, thisArg) { + return [filter_1.filter(predicate, thisArg)(innerFrom_1.innerFrom(source)), filter_1.filter(not_1.not(predicate, thisArg))(innerFrom_1.innerFrom(source))]; +} +exports.partition = partition; + +},{"../operators/filter":488,"../util/not":626,"./innerFrom":438}],446:[function(require,module,exports){ +"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"); +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)); +} +exports.race = race; +function raceInit(sources) { + return function (subscriber) { + var subscriptions = []; + var _loop_1 = function (i) { + subscriptions.push(innerFrom_1.innerFrom(sources[i]).subscribe(OperatorSubscriber_1.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++) { + _loop_1(i); + } + }; +} +exports.raceInit = raceInit; + +},{"../Observable":412,"../operators/OperatorSubscriber":452,"../util/argsOrArgArray":606,"./innerFrom":438}],447:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.range = void 0; +var Observable_1 = require("../Observable"); +var empty_1 = require("./empty"); +function range(start, count, scheduler) { + if (count == null) { + count = start; + start = 0; + } + if (count <= 0) { + return empty_1.EMPTY; + } + var end = count + start; + return new Observable_1.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(); + }); +} +exports.range = range; + +},{"../Observable":412,"./empty":430}],448:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.throwError = void 0; +var Observable_1 = require("../Observable"); +var isFunction_1 = require("../util/isFunction"); +function throwError(errorOrErrorFactory, scheduler) { + var errorFactory = isFunction_1.isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; }; + var init = function (subscriber) { return subscriber.error(errorFactory()); }; + return new Observable_1.Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init); +} +exports.throwError = throwError; + +},{"../Observable":412,"../util/isFunction":616}],449:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timer = void 0; +var Observable_1 = require("../Observable"); +var async_1 = require("../scheduler/async"); +var isScheduler_1 = require("../util/isScheduler"); +var isDate_1 = require("../util/isDate"); +function timer(dueTime, intervalOrScheduler, scheduler) { + if (dueTime === void 0) { dueTime = 0; } + if (scheduler === void 0) { scheduler = async_1.async; } + var intervalDuration = -1; + if (intervalOrScheduler != null) { + if (isScheduler_1.isScheduler(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } + else { + intervalDuration = intervalOrScheduler; + } + } + return new Observable_1.Observable(function (subscriber) { + var due = isDate_1.isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; + if (due < 0) { + due = 0; + } + var n = 0; + return scheduler.schedule(function () { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(undefined, intervalDuration); + } + else { + subscriber.complete(); + } + } + }, due); + }); +} +exports.timer = timer; + +},{"../Observable":412,"../scheduler/async":587,"../util/isDate":615,"../util/isScheduler":622}],450:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.using = void 0; +var Observable_1 = require("../Observable"); +var innerFrom_1 = require("./innerFrom"); +var empty_1 = require("./empty"); +function using(resourceFactory, observableFactory) { + return new Observable_1.Observable(function (subscriber) { + var resource = resourceFactory(); + var result = observableFactory(resource); + var source = result ? innerFrom_1.innerFrom(result) : empty_1.EMPTY; + source.subscribe(subscriber); + return function () { + if (resource) { + resource.unsubscribe(); + } + }; + }); +} +exports.using = using; + +},{"../Observable":412,"./empty":430,"./innerFrom":438}],451:[function(require,module,exports){ +"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 { + 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; +}; +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"); +function zip() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args); + 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(OperatorSubscriber_1.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_1.EMPTY; +} +exports.zip = zip; + +},{"../Observable":412,"../operators/OperatorSubscriber":452,"../util/args":604,"../util/argsOrArgArray":606,"./empty":430,"./innerFrom":438}],452:[function(require,module,exports){ +"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 = exports.createOperatorSubscriber = void 0; +var Subscriber_1 = require("../Subscriber"); +function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); +} +exports.createOperatorSubscriber = createOperatorSubscriber; +var OperatorSubscriber = (function (_super) { + __extends(OperatorSubscriber, _super); + 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); + } + } + : _super.prototype._next; + _this._error = onError + ? function (err) { + 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(); + } + } + : _super.prototype._complete; + return _this; + } + OperatorSubscriber.prototype.unsubscribe = function () { + var _a; + 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_1.Subscriber)); +exports.OperatorSubscriber = OperatorSubscriber; + +},{"../Subscriber":416}],453:[function(require,module,exports){ +"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"); +function audit(durationSelector) { + return lift_1.operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var isComplete = false; + var endDuration = function () { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + var cleanupDuration = function () { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom_1.innerFrom(durationSelector(value)).subscribe((durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, endDuration, cleanupDuration))); + } + }, function () { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); +} +exports.audit = audit; + +},{"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452}],454:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.auditTime = void 0; +var async_1 = require("../scheduler/async"); +var audit_1 = require("./audit"); +var timer_1 = require("../observable/timer"); +function auditTime(duration, scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + return audit_1.audit(function () { return timer_1.timer(duration, scheduler); }); +} +exports.auditTime = auditTime; + +},{"../observable/timer":449,"../scheduler/async":587,"./audit":453}],455:[function(require,module,exports){ +"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 innerFrom_1 = require("../observable/innerFrom"); +function buffer(closingNotifier) { + return lift_1.operate(function (source, subscriber) { + var currentBuffer = []; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { + subscriber.next(currentBuffer); + subscriber.complete(); + })); + innerFrom_1.innerFrom(closingNotifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, noop_1.noop)); + return function () { + currentBuffer = null; + }; + }); +} +exports.buffer = buffer; + +},{"../observable/innerFrom":438,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],456:[function(require,module,exports){ +"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."); +}; +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"); +function bufferCount(bufferSize, startBufferEvery) { + 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(OperatorSubscriber_1.createOperatorSubscriber(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); + } + } + } + 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); + } + } + 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 { + 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; } + } + subscriber.complete(); + }, undefined, function () { + buffers = null; + })); + }); +} +exports.bufferCount = bufferCount; + +},{"../util/arrRemove":607,"../util/lift":623,"./OperatorSubscriber":452}],457:[function(require,module,exports){ +"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."); +}; +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"); +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 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; + subs.unsubscribe(); + arrRemove_1.arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + var startBuffer = function () { + if (bufferRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var buffer = []; + var record_1 = { + buffer: buffer, + subs: subs, + }; + bufferRecords.push(record_1); + 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 { + restartOnEmit = true; + } + startBuffer(); + var bufferTimeSubscriber = OperatorSubscriber_1.createOperatorSubscriber(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 { + 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; } + } + }, 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); }); + source.subscribe(bufferTimeSubscriber); + }); +} +exports.bufferTime = bufferTime; + +},{"../Subscription":417,"../scheduler/async":587,"../util/args":604,"../util/arrRemove":607,"../util/executeSchedule":611,"../util/lift":623,"./OperatorSubscriber":452}],458:[function(require,module,exports){ +"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."); +}; +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"); +function bufferToggle(openings, closingSelector) { + return lift_1.operate(function (source, subscriber) { + var buffers = []; + innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, emitBuffer, noop_1.noop))); + }, noop_1.noop)); + source.subscribe(OperatorSubscriber_1.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(); + })); + }); +} +exports.bufferToggle = bufferToggle; + +},{"../Subscription":417,"../observable/innerFrom":438,"../util/arrRemove":607,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],459:[function(require,module,exports){ +"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"); +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(); + var b = buffer; + buffer = []; + b && subscriber.next(b); + innerFrom_1.innerFrom(closingSelector()).subscribe((closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openBuffer, noop_1.noop))); + }; + openBuffer(); + source.subscribe(OperatorSubscriber_1.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); })); + }); +} +exports.bufferWhen = bufferWhen; + +},{"../observable/innerFrom":438,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],460:[function(require,module,exports){ +"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"); +function catchError(selector) { + return lift_1.operate(function (source, subscriber) { + var innerSub = null; + var syncUnsub = false; + var handledResult; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(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; + handledResult.subscribe(subscriber); + } + }); +} +exports.catchError = catchError; + +},{"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452}],461:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.combineAll = void 0; +var combineLatestAll_1 = require("./combineLatestAll"); +exports.combineAll = combineLatestAll_1.combineLatestAll; + +},{"./combineLatestAll":463}],462:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.combineLatest = void 0; +var combineLatest_1 = require("../observable/combineLatest"); +var lift_1 = require("../util/lift"); +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var pipe_1 = require("../util/pipe"); +var args_1 = require("../util/args"); +function combineLatest() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args); + return resultSelector + ? pipe_1.pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) + : lift_1.operate(function (source, subscriber) { + combineLatest_1.combineLatestInit(__spreadArray([source], __read(argsOrArgArray_1.argsOrArgArray(args))))(subscriber); + }); +} +exports.combineLatest = combineLatest; + +},{"../observable/combineLatest":425,"../util/args":604,"../util/argsOrArgArray":606,"../util/lift":623,"../util/mapOneOrManyArgs":624,"../util/pipe":627}],463:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.combineLatestAll = void 0; +var combineLatest_1 = require("../observable/combineLatest"); +var joinAllInternals_1 = require("./joinAllInternals"); +function combineLatestAll(project) { + return joinAllInternals_1.joinAllInternals(combineLatest_1.combineLatest, project); +} +exports.combineLatestAll = combineLatestAll; + +},{"../observable/combineLatest":425,"./joinAllInternals":497}],464:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.combineLatestWith = void 0; +var combineLatest_1 = require("./combineLatest"); +function combineLatestWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return combineLatest_1.combineLatest.apply(void 0, __spreadArray([], __read(otherSources))); +} +exports.combineLatestWith = combineLatestWith; + +},{"./combineLatest":462}],465:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concat = void 0; +var lift_1 = require("../util/lift"); +var concatAll_1 = require("./concatAll"); +var args_1 = require("../util/args"); +var from_1 = require("../observable/from"); +function concat() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + return lift_1.operate(function (source, subscriber) { + concatAll_1.concatAll()(from_1.from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + }); +} +exports.concat = concat; + +},{"../observable/from":432,"../util/args":604,"../util/lift":623,"./concatAll":466}],466:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatAll = void 0; +var mergeAll_1 = require("./mergeAll"); +function concatAll() { + return mergeAll_1.mergeAll(1); +} +exports.concatAll = concatAll; + +},{"./mergeAll":504}],467:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatMap = void 0; +var mergeMap_1 = require("./mergeMap"); +var isFunction_1 = require("../util/isFunction"); +function concatMap(project, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? mergeMap_1.mergeMap(project, resultSelector, 1) : mergeMap_1.mergeMap(project, 1); +} +exports.concatMap = concatMap; + +},{"../util/isFunction":616,"./mergeMap":506}],468:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatMapTo = void 0; +var concatMap_1 = require("./concatMap"); +var isFunction_1 = require("../util/isFunction"); +function concatMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? concatMap_1.concatMap(function () { return innerObservable; }, resultSelector) : concatMap_1.concatMap(function () { return innerObservable; }); +} +exports.concatMapTo = concatMapTo; + +},{"../util/isFunction":616,"./concatMap":467}],469:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatWith = void 0; +var concat_1 = require("./concat"); +function concatWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return concat_1.concat.apply(void 0, __spreadArray([], __read(otherSources))); +} +exports.concatWith = concatWith; + +},{"./concat":465}],470:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.connect = void 0; +var Subject_1 = require("../Subject"); +var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require("../util/lift"); +var fromSubscribable_1 = require("../observable/fromSubscribable"); +var DEFAULT_CONFIG = { + connector: function () { return new Subject_1.Subject(); }, +}; +function connect(selector, config) { + if (config === void 0) { config = DEFAULT_CONFIG; } + var connector = config.connector; + return lift_1.operate(function (source, subscriber) { + var subject = connector(); + innerFrom_1.innerFrom(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); +} +exports.connect = connect; + +},{"../Subject":415,"../observable/fromSubscribable":435,"../observable/innerFrom":438,"../util/lift":623}],471:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.count = void 0; +var reduce_1 = require("./reduce"); +function count(predicate) { + return reduce_1.reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0); +} +exports.count = count; + +},{"./reduce":521}],472:[function(require,module,exports){ +"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"); +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; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, emit, noop_1.noop); + innerFrom_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, function () { + emit(); + subscriber.complete(); + }, undefined, function () { + lastValue = durationSubscriber = null; + })); + }); +} +exports.debounce = debounce; + +},{"../observable/innerFrom":438,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],473:[function(require,module,exports){ +"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"); +function debounceTime(dueTime, scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + return lift_1.operate(function (source, subscriber) { + var activeTask = null; + var lastValue = null; + var lastTime = null; + var emit = function () { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + var targetTime = lastTime + dueTime; + var now = scheduler.now(); + if (now < targetTime) { + activeTask = this.schedule(undefined, targetTime - now); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe(OperatorSubscriber_1.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; + })); + }); +} +exports.debounceTime = debounceTime; + +},{"../scheduler/async":587,"../util/lift":623,"./OperatorSubscriber":452}],474:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultIfEmpty = void 0; +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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + subscriber.next(value); + }, function () { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); +} +exports.defaultIfEmpty = defaultIfEmpty; + +},{"../util/lift":623,"./OperatorSubscriber":452}],475:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.delay = void 0; +var async_1 = require("../scheduler/async"); +var delayWhen_1 = require("./delayWhen"); +var timer_1 = require("../observable/timer"); +function delay(due, scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + var duration = timer_1.timer(due, scheduler); + return delayWhen_1.delayWhen(function () { return duration; }); +} +exports.delay = delay; + +},{"../observable/timer":449,"../scheduler/async":587,"./delayWhen":476}],476:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.delayWhen = void 0; +var concat_1 = require("../observable/concat"); +var take_1 = require("./take"); +var ignoreElements_1 = require("./ignoreElements"); +var mapTo_1 = require("./mapTo"); +var mergeMap_1 = require("./mergeMap"); +var innerFrom_1 = require("../observable/innerFrom"); +function delayWhen(delayDurationSelector, subscriptionDelay) { + if (subscriptionDelay) { + return function (source) { + return concat_1.concat(subscriptionDelay.pipe(take_1.take(1), ignoreElements_1.ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + }; + } + return mergeMap_1.mergeMap(function (value, index) { return innerFrom_1.innerFrom(delayDurationSelector(value, index)).pipe(take_1.take(1), mapTo_1.mapTo(value)); }); +} +exports.delayWhen = delayWhen; + +},{"../observable/concat":426,"../observable/innerFrom":438,"./ignoreElements":495,"./mapTo":500,"./mergeMap":506,"./take":545}],477:[function(require,module,exports){ +"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"); +function dematerialize() { + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (notification) { return Notification_1.observeNotification(notification, subscriber); })); + }); +} +exports.dematerialize = dematerialize; + +},{"../Notification":410,"../util/lift":623,"./OperatorSubscriber":452}],478:[function(require,module,exports){ +"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 innerFrom_1 = require("../observable/innerFrom"); +function distinct(keySelector, flushes) { + return lift_1.operate(function (source, subscriber) { + var distinctKeys = new Set(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + })); + flushes && innerFrom_1.innerFrom(flushes).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop_1.noop)); + }); +} +exports.distinct = distinct; + +},{"../observable/innerFrom":438,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],479:[function(require,module,exports){ +"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"); +function distinctUntilChanged(comparator, keySelector) { + 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(OperatorSubscriber_1.createOperatorSubscriber(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; +} + +},{"../util/identity":612,"../util/lift":623,"./OperatorSubscriber":452}],480:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.distinctUntilKeyChanged = void 0; +var distinctUntilChanged_1 = require("./distinctUntilChanged"); +function distinctUntilKeyChanged(key, compare) { + return distinctUntilChanged_1.distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; }); +} +exports.distinctUntilKeyChanged = distinctUntilKeyChanged; + +},{"./distinctUntilChanged":479}],481:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.elementAt = void 0; +var ArgumentOutOfRangeError_1 = require("../util/ArgumentOutOfRangeError"); +var filter_1 = require("./filter"); +var throwIfEmpty_1 = require("./throwIfEmpty"); +var defaultIfEmpty_1 = require("./defaultIfEmpty"); +var take_1 = require("./take"); +function elementAt(index, defaultValue) { + if (index < 0) { + throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + } + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(filter_1.filter(function (v, i) { return i === index; }), take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); })); + }; +} +exports.elementAt = elementAt; + +},{"../util/ArgumentOutOfRangeError":597,"./defaultIfEmpty":474,"./filter":488,"./take":545,"./throwIfEmpty":552}],482:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.endWith = void 0; +var concat_1 = require("../observable/concat"); +var of_1 = require("../observable/of"); +function endWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + return function (source) { return concat_1.concat(source, of_1.of.apply(void 0, __spreadArray([], __read(values)))); }; +} +exports.endWith = endWith; + +},{"../observable/concat":426,"../observable/of":442}],483:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.every = void 0; +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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, function () { + subscriber.next(true); + subscriber.complete(); + })); + }); +} +exports.every = every; + +},{"../util/lift":623,"./OperatorSubscriber":452}],484:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.exhaust = void 0; +var exhaustAll_1 = require("./exhaustAll"); +exports.exhaust = exhaustAll_1.exhaustAll; + +},{"./exhaustAll":485}],485:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.exhaustAll = void 0; +var exhaustMap_1 = require("./exhaustMap"); +var identity_1 = require("../util/identity"); +function exhaustAll() { + return exhaustMap_1.exhaustMap(identity_1.identity); +} +exports.exhaustAll = exhaustAll; + +},{"../util/identity":612,"./exhaustMap":486}],486:[function(require,module,exports){ +"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"); +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 lift_1.operate(function (source, subscriber) { + var index = 0; + var innerSub = null; + var isComplete = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (outerValue) { + if (!innerSub) { + innerSub = OperatorSubscriber_1.createOperatorSubscriber(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; + +},{"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452,"./map":499}],487:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.expand = void 0; +var lift_1 = require("../util/lift"); +var mergeInternals_1 = require("./mergeInternals"); +function expand(project, concurrent, scheduler) { + if (concurrent === void 0) { concurrent = Infinity; } + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return lift_1.operate(function (source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler); + }); +} +exports.expand = expand; + +},{"../util/lift":623,"./mergeInternals":505}],488:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.filter = void 0; +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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); + }); +} +exports.filter = filter; + +},{"../util/lift":623,"./OperatorSubscriber":452}],489:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.finalize = void 0; +var lift_1 = require("../util/lift"); +function finalize(callback) { + return lift_1.operate(function (source, subscriber) { + try { + source.subscribe(subscriber); + } + finally { + subscriber.add(callback); + } + }); +} +exports.finalize = finalize; + +},{"../util/lift":623}],490:[function(require,module,exports){ +"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"); +function find(predicate, thisArg) { + return lift_1.operate(createFind(predicate, thisArg, 'value')); +} +exports.find = find; +function createFind(predicate, thisArg, emit) { + var findIndex = emit === 'index'; + return function (source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.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(); + })); + }; +} +exports.createFind = createFind; + +},{"../util/lift":623,"./OperatorSubscriber":452}],491:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.findIndex = void 0; +var lift_1 = require("../util/lift"); +var find_1 = require("./find"); +function findIndex(predicate, thisArg) { + return lift_1.operate(find_1.createFind(predicate, thisArg, 'index')); +} +exports.findIndex = findIndex; + +},{"../util/lift":623,"./find":490}],492:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.first = void 0; +var EmptyError_1 = require("../util/EmptyError"); +var filter_1 = require("./filter"); +var take_1 = require("./take"); +var defaultIfEmpty_1 = require("./defaultIfEmpty"); +var throwIfEmpty_1 = require("./throwIfEmpty"); +var identity_1 = require("../util/identity"); +function first(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); })); + }; +} +exports.first = first; + +},{"../util/EmptyError":598,"../util/identity":612,"./defaultIfEmpty":474,"./filter":488,"./take":545,"./throwIfEmpty":552}],493:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.flatMap = void 0; +var mergeMap_1 = require("./mergeMap"); +exports.flatMap = mergeMap_1.mergeMap; + +},{"./mergeMap":506}],494:[function(require,module,exports){ +"use strict"; +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"); +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); + } + 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 activeGroups = 0; + var teardownAttempted = false; + var groupBySourceSubscriber = new OperatorSubscriber_1.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_1.Subject())); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = OperatorSubscriber_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_1.innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + } + } + 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; + }); + source.subscribe(groupBySourceSubscriber); + function createGroupedObservable(key, groupSubject) { + var result = new Observable_1.Observable(function (groupSubscriber) { + activeGroups++; + var innerSub = groupSubject.subscribe(groupSubscriber); + return function () { + innerSub.unsubscribe(); + --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key; + return result; + } + }); +} +exports.groupBy = groupBy; + +},{"../Observable":412,"../Subject":415,"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452}],495:[function(require,module,exports){ +"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"); +function ignoreElements() { + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, noop_1.noop)); + }); +} +exports.ignoreElements = ignoreElements; + +},{"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],496:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEmpty = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function isEmpty() { + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + subscriber.next(false); + subscriber.complete(); + }, function () { + subscriber.next(true); + subscriber.complete(); + })); + }); +} +exports.isEmpty = isEmpty; + +},{"../util/lift":623,"./OperatorSubscriber":452}],497:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinAllInternals = void 0; +var identity_1 = require("../util/identity"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var pipe_1 = require("../util/pipe"); +var mergeMap_1 = require("./mergeMap"); +var toArray_1 = require("./toArray"); +function joinAllInternals(joinFn, project) { + return pipe_1.pipe(toArray_1.toArray(), mergeMap_1.mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs_1.mapOneOrManyArgs(project) : identity_1.identity); +} +exports.joinAllInternals = joinAllInternals; + +},{"../util/identity":612,"../util/mapOneOrManyArgs":624,"../util/pipe":627,"./mergeMap":506,"./toArray":557}],498:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.last = void 0; +var EmptyError_1 = require("../util/EmptyError"); +var filter_1 = require("./filter"); +var takeLast_1 = require("./takeLast"); +var throwIfEmpty_1 = require("./throwIfEmpty"); +var defaultIfEmpty_1 = require("./defaultIfEmpty"); +var identity_1 = require("../util/identity"); +function last(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); })); + }; +} +exports.last = last; + +},{"../util/EmptyError":598,"../util/identity":612,"./defaultIfEmpty":474,"./filter":488,"./takeLast":546,"./throwIfEmpty":552}],499:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.map = void 0; +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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); +} +exports.map = map; + +},{"../util/lift":623,"./OperatorSubscriber":452}],500:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mapTo = void 0; +var map_1 = require("./map"); +function mapTo(value) { + return map_1.map(function () { return value; }); +} +exports.mapTo = mapTo; + +},{"./map":499}],501:[function(require,module,exports){ +"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"); +function materialize() { + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(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; + +},{"../Notification":410,"../util/lift":623,"./OperatorSubscriber":452}],502:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.max = void 0; +var reduce_1 = require("./reduce"); +var isFunction_1 = require("../util/isFunction"); +function max(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); }); +} +exports.max = max; + +},{"../util/isFunction":616,"./reduce":521}],503:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.merge = void 0; +var lift_1 = require("../util/lift"); +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var mergeAll_1 = require("./mergeAll"); +var args_1 = require("../util/args"); +var from_1 = require("../observable/from"); +function merge() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + var concurrent = args_1.popNumber(args, Infinity); + args = argsOrArgArray_1.argsOrArgArray(args); + return lift_1.operate(function (source, subscriber) { + mergeAll_1.mergeAll(concurrent)(from_1.from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + }); +} +exports.merge = merge; + +},{"../observable/from":432,"../util/args":604,"../util/argsOrArgArray":606,"../util/lift":623,"./mergeAll":504}],504:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeAll = void 0; +var mergeMap_1 = require("./mergeMap"); +var identity_1 = require("../util/identity"); +function mergeAll(concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + return mergeMap_1.mergeMap(identity_1.identity, concurrent); +} +exports.mergeAll = mergeAll; + +},{"../util/identity":612,"./mergeMap":506}],505:[function(require,module,exports){ +"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, additionalFinalizer) { + var buffer = []; + var active = 0; + var index = 0; + var isComplete = false; + var checkComplete = function () { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + 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(OperatorSubscriber_1.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_1.executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); + } + else { + doInnerSub(bufferedValue); + } + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } + catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, outerNext, function () { + isComplete = true; + checkComplete(); + })); + return function () { + additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); + }; +} +exports.mergeInternals = mergeInternals; + +},{"../observable/innerFrom":438,"../util/executeSchedule":611,"./OperatorSubscriber":452}],506:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeMap = void 0; +var map_1 = require("./map"); +var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require("../util/lift"); +var mergeInternals_1 = require("./mergeInternals"); +var isFunction_1 = require("../util/isFunction"); +function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap(function (a, i) { return map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom_1.innerFrom(project(a, i))); }, concurrent); + } + else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return lift_1.operate(function (source, subscriber) { return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent); }); +} +exports.mergeMap = mergeMap; + +},{"../observable/innerFrom":438,"../util/isFunction":616,"../util/lift":623,"./map":499,"./mergeInternals":505}],507:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeMapTo = void 0; +var mergeMap_1 = require("./mergeMap"); +var isFunction_1 = require("../util/isFunction"); +function mergeMapTo(innerObservable, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap_1.mergeMap(function () { return innerObservable; }, resultSelector, concurrent); + } + if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return mergeMap_1.mergeMap(function () { return innerObservable; }, concurrent); +} +exports.mergeMapTo = mergeMapTo; + +},{"../util/isFunction":616,"./mergeMap":506}],508:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeScan = void 0; +var lift_1 = require("../util/lift"); +var mergeInternals_1 = require("./mergeInternals"); +function mergeScan(accumulator, seed, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + return lift_1.operate(function (source, subscriber) { + var state = seed; + return mergeInternals_1.mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) { + state = value; + }, false, undefined, function () { return (state = null); }); + }); +} +exports.mergeScan = mergeScan; + +},{"../util/lift":623,"./mergeInternals":505}],509:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeWith = void 0; +var merge_1 = require("./merge"); +function mergeWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return merge_1.merge.apply(void 0, __spreadArray([], __read(otherSources))); +} +exports.mergeWith = mergeWith; + +},{"./merge":503}],510:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.min = void 0; +var reduce_1 = require("./reduce"); +var isFunction_1 = require("../util/isFunction"); +function min(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); }); +} +exports.min = min; + +},{"../util/isFunction":616,"./reduce":521}],511:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.multicast = void 0; +var ConnectableObservable_1 = require("../observable/ConnectableObservable"); +var isFunction_1 = require("../util/isFunction"); +var connect_1 = require("./connect"); +function multicast(subjectOrSubjectFactory, selector) { + var subjectFactory = isFunction_1.isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; }; + if (isFunction_1.isFunction(selector)) { + return connect_1.connect(selector, { + connector: subjectFactory, + }); + } + return function (source) { return new ConnectableObservable_1.ConnectableObservable(source, subjectFactory); }; +} +exports.multicast = multicast; + +},{"../observable/ConnectableObservable":421,"../util/isFunction":616,"./connect":470}],512:[function(require,module,exports){ +"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"); +function observeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(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; + +},{"../util/executeSchedule":611,"../util/lift":623,"./OperatorSubscriber":452}],513:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.onErrorResumeNext = exports.onErrorResumeNextWith = void 0; +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var onErrorResumeNext_1 = require("../observable/onErrorResumeNext"); +function onErrorResumeNextWith() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return function (source) { return onErrorResumeNext_1.onErrorResumeNext.apply(void 0, __spreadArray([source], __read(nextSources))); }; +} +exports.onErrorResumeNextWith = onErrorResumeNextWith; +exports.onErrorResumeNext = onErrorResumeNextWith; + +},{"../observable/onErrorResumeNext":443,"../util/argsOrArgArray":606}],514:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pairwise = void 0; +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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); +} +exports.pairwise = pairwise; + +},{"../util/lift":623,"./OperatorSubscriber":452}],515:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pluck = void 0; +var map_1 = require("./map"); +function pluck() { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + var length = properties.length; + if (length === 0) { + throw new Error('list of properties cannot be empty.'); + } + return map_1.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]]; + if (typeof p !== 'undefined') { + currentProp = p; + } + else { + return undefined; + } + } + return currentProp; + }); +} +exports.pluck = pluck; + +},{"./map":499}],516:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.publish = void 0; +var Subject_1 = require("../Subject"); +var multicast_1 = require("./multicast"); +var connect_1 = require("./connect"); +function publish(selector) { + return selector ? function (source) { return connect_1.connect(selector)(source); } : function (source) { return multicast_1.multicast(new Subject_1.Subject())(source); }; +} +exports.publish = publish; + +},{"../Subject":415,"./connect":470,"./multicast":511}],517:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.publishBehavior = void 0; +var BehaviorSubject_1 = require("../BehaviorSubject"); +var ConnectableObservable_1 = require("../observable/ConnectableObservable"); +function publishBehavior(initialValue) { + return function (source) { + var subject = new BehaviorSubject_1.BehaviorSubject(initialValue); + return new ConnectableObservable_1.ConnectableObservable(source, function () { return subject; }); + }; +} +exports.publishBehavior = publishBehavior; + +},{"../BehaviorSubject":409,"../observable/ConnectableObservable":421}],518:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.publishLast = void 0; +var AsyncSubject_1 = require("../AsyncSubject"); +var ConnectableObservable_1 = require("../observable/ConnectableObservable"); +function publishLast() { + return function (source) { + var subject = new AsyncSubject_1.AsyncSubject(); + return new ConnectableObservable_1.ConnectableObservable(source, function () { return subject; }); + }; +} +exports.publishLast = publishLast; + +},{"../AsyncSubject":408,"../observable/ConnectableObservable":421}],519:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.publishReplay = void 0; +var ReplaySubject_1 = require("../ReplaySubject"); +var multicast_1 = require("./multicast"); +var isFunction_1 = require("../util/isFunction"); +function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + if (selectorOrScheduler && !isFunction_1.isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + var selector = isFunction_1.isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; + return function (source) { return multicast_1.multicast(new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); }; +} +exports.publishReplay = publishReplay; + +},{"../ReplaySubject":413,"../util/isFunction":616,"./multicast":511}],520:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.raceWith = void 0; +var race_1 = require("../observable/race"); +var lift_1 = require("../util/lift"); +var identity_1 = require("../util/identity"); +function raceWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return !otherSources.length + ? identity_1.identity + : lift_1.operate(function (source, subscriber) { + race_1.raceInit(__spreadArray([source], __read(otherSources)))(subscriber); + }); +} +exports.raceWith = raceWith; + +},{"../observable/race":446,"../util/identity":612,"../util/lift":623}],521:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.reduce = void 0; +var scanInternals_1 = require("./scanInternals"); +var lift_1 = require("../util/lift"); +function reduce(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, false, true)); +} +exports.reduce = reduce; + +},{"../util/lift":623,"./scanInternals":530}],522:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.refCount = void 0; +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 = OperatorSubscriber_1.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; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); +} +exports.refCount = refCount; + +},{"../util/lift":623,"./OperatorSubscriber":452}],523:[function(require,module,exports){ +"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"); +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 { + count = countOrConfig; + } + } + return count <= 0 + ? 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 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + notifierSubscriber_1.unsubscribe(); + subscribeToSource(); + }); + notifier.subscribe(notifierSubscriber_1); + } + else { + subscribeToSource(); + } + }; + var subscribeToSource = function () { + var syncUnsub = false; + sourceSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } + else { + syncUnsub = true; + } + } + else { + subscriber.complete(); + } + })); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); +} +exports.repeat = repeat; + +},{"../observable/empty":430,"../observable/innerFrom":438,"../observable/timer":449,"../util/lift":623,"./OperatorSubscriber":452}],524:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.repeatWhen = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +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; + var syncResub = false; + var completions$; + var isNotifierComplete = false; + var isMainComplete = false; + var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; + var getCompletionSubject = function () { + if (!completions$) { + completions$ = new Subject_1.Subject(); + innerFrom_1.innerFrom(notifier(completions$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + if (innerSub) { + subscribeForRepeatWhen(); + } + else { + syncResub = true; + } + }, function () { + isNotifierComplete = true; + checkComplete(); + })); + } + return completions$; + }; + var subscribeForRepeatWhen = function () { + isMainComplete = false; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRepeatWhen(); + } + }; + subscribeForRepeatWhen(); + }); +} +exports.repeatWhen = repeatWhen; + +},{"../Subject":415,"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452}],525:[function(require,module,exports){ +"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"); +function retry(configOrCount) { + if (configOrCount === void 0) { configOrCount = Infinity; } + var config; + if (configOrCount && typeof configOrCount === 'object') { + config = configOrCount; + } + else { + config = { + count: configOrCount, + }; + } + 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(OperatorSubscriber_1.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_1.timer(delay) : innerFrom_1.innerFrom(delay(err, soFar)); + var notifierSubscriber_1 = OperatorSubscriber_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(); + }); +} +exports.retry = retry; + +},{"../observable/innerFrom":438,"../observable/timer":449,"../util/identity":612,"../util/lift":623,"./OperatorSubscriber":452}],526:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.retryWhen = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, function (err) { + if (!errors$) { + errors$ = new Subject_1.Subject(); + innerFrom_1.innerFrom(notifier(errors$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + return innerSub ? subscribeForRetryWhen() : (syncResub = true); + })); + } + if (errors$) { + errors$.next(err); + } + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRetryWhen(); + } + }; + subscribeForRetryWhen(); + }); +} +exports.retryWhen = retryWhen; + +},{"../Subject":415,"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452}],527:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sample = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + })); + innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }, noop_1.noop)); + }); +} +exports.sample = sample; + +},{"../observable/innerFrom":438,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],528:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sampleTime = void 0; +var async_1 = require("../scheduler/async"); +var sample_1 = require("./sample"); +var interval_1 = require("../observable/interval"); +function sampleTime(period, scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + return sample_1.sample(interval_1.interval(period, scheduler)); +} +exports.sampleTime = sampleTime; + +},{"../observable/interval":439,"../scheduler/async":587,"./sample":527}],529:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scan = void 0; +var lift_1 = require("../util/lift"); +var scanInternals_1 = require("./scanInternals"); +function scan(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, true)); +} +exports.scan = scan; + +},{"../util/lift":623,"./scanInternals":530}],530:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scanInternals = void 0; +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(OperatorSubscriber_1.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(); + }))); + }; +} +exports.scanInternals = scanInternals; + +},{"./OperatorSubscriber":452}],531:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sequenceEqual = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +function sequenceEqual(compareTo, comparator) { + if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } + return lift_1.operate(function (source, subscriber) { + var aState = createState(); + var bState = createState(); + var emit = function (isEqual) { + subscriber.next(isEqual); + subscriber.complete(); + }; + var createSubscriber = function (selfState, otherState) { + var sequenceEqualSubscriber = OperatorSubscriber_1.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(); + }); + return sequenceEqualSubscriber; + }; + source.subscribe(createSubscriber(aState, bState)); + innerFrom_1.innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); + }); +} +exports.sequenceEqual = sequenceEqual; +function createState() { + return { + buffer: [], + complete: false, + }; +} + +},{"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452}],532:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.share = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var Subject_1 = require("../Subject"); +var Subscriber_1 = require("../Subscriber"); +var lift_1 = require("../util/lift"); +function share(options) { + if (options === void 0) { options = {}; } + var _a = options.connector, connector = _a === void 0 ? function () { return new Subject_1.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; + var resetConnection; + var subject; + var refCount = 0; + var hasCompleted = false; + var hasErrored = false; + var cancelReset = function () { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = undefined; + }; + var reset = function () { + cancelReset(); + connection = subject = undefined; + hasCompleted = hasErrored = false; + }; + var resetAndUnsubscribe = function () { + var conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return lift_1.operate(function (source, subscriber) { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + var dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); + subscriber.add(function () { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection && + refCount > 0) { + connection = new Subscriber_1.SafeSubscriber({ + next: function (value) { return dest.next(value); }, + error: function (err) { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: function () { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + }, + }); + innerFrom_1.innerFrom(source).subscribe(connection); + } + })(wrapperSource); + }; +} +exports.share = share; +function handleReset(reset, on) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + if (on === true) { + reset(); + return; + } + if (on === false) { + return; + } + var onSubscriber = new Subscriber_1.SafeSubscriber({ + next: function () { + onSubscriber.unsubscribe(); + reset(); + }, + }); + return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber); +} + +},{"../Subject":415,"../Subscriber":416,"../observable/innerFrom":438,"../util/lift":623}],533:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.shareReplay = void 0; +var ReplaySubject_1 = require("../ReplaySubject"); +var share_1 = require("./share"); +function shareReplay(configOrBufferSize, windowTime, scheduler) { + var _a, _b, _c; + var bufferSize; + var refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === 'object') { + (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler); + } + else { + bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity); + } + return share_1.share({ + connector: function () { return new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler); }, + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount, + }); +} +exports.shareReplay = shareReplay; + +},{"../ReplaySubject":413,"./share":532}],534:[function(require,module,exports){ +"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"); +function single(predicate) { + return lift_1.operate(function (source, subscriber) { + var hasValue = false; + var singleValue; + var seenValue = false; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(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; + +},{"../util/EmptyError":598,"../util/NotFoundError":600,"../util/SequenceError":602,"../util/lift":623,"./OperatorSubscriber":452}],535:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.skip = void 0; +var filter_1 = require("./filter"); +function skip(count) { + return filter_1.filter(function (_, index) { return count <= index; }); +} +exports.skip = skip; + +},{"./filter":488}],536:[function(require,module,exports){ +"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"); +function skipLast(skipCount) { + return skipCount <= 0 + ? + identity_1.identity + : lift_1.operate(function (source, subscriber) { + var ring = new Array(skipCount); + var seen = 0; + source.subscribe(OperatorSubscriber_1.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; + }; + }); +} +exports.skipLast = skipLast; + +},{"../util/identity":612,"../util/lift":623,"./OperatorSubscriber":452}],537:[function(require,module,exports){ +"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"); +function skipUntil(notifier) { + return lift_1.operate(function (source, subscriber) { + var taking = false; + var skipSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); + taking = true; + }, noop_1.noop); + innerFrom_1.innerFrom(notifier).subscribe(skipSubscriber); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); + }); +} +exports.skipUntil = skipUntil; + +},{"../observable/innerFrom":438,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],538:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.skipWhile = void 0; +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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); + }); +} +exports.skipWhile = skipWhile; + +},{"../util/lift":623,"./OperatorSubscriber":452}],539:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.startWith = void 0; +var concat_1 = require("../observable/concat"); +var args_1 = require("../util/args"); +var lift_1 = require("../util/lift"); +function startWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(values); + return lift_1.operate(function (source, subscriber) { + (scheduler ? concat_1.concat(values, source, scheduler) : concat_1.concat(values, source)).subscribe(subscriber); + }); +} +exports.startWith = startWith; + +},{"../observable/concat":426,"../util/args":604,"../util/lift":623}],540:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.subscribeOn = void 0; +var lift_1 = require("../util/lift"); +function subscribeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return lift_1.operate(function (source, subscriber) { + subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay)); + }); +} +exports.subscribeOn = subscribeOn; + +},{"../util/lift":623}],541:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.switchAll = void 0; +var switchMap_1 = require("./switchMap"); +var identity_1 = require("../util/identity"); +function switchAll() { + return switchMap_1.switchMap(identity_1.identity); +} +exports.switchAll = switchAll; + +},{"../util/identity":612,"./switchMap":542}],542:[function(require,module,exports){ +"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"); +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(OperatorSubscriber_1.createOperatorSubscriber(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 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { + innerSubscriber = null; + checkComplete(); + }))); + }, function () { + isComplete = true; + checkComplete(); + })); + }); +} +exports.switchMap = switchMap; + +},{"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452}],543:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.switchMapTo = void 0; +var switchMap_1 = require("./switchMap"); +var isFunction_1 = require("../util/isFunction"); +function switchMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? switchMap_1.switchMap(function () { return innerObservable; }, resultSelector) : switchMap_1.switchMap(function () { return innerObservable; }); +} +exports.switchMapTo = switchMapTo; + +},{"../util/isFunction":616,"./switchMap":542}],544:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.switchScan = void 0; +var switchMap_1 = require("./switchMap"); +var lift_1 = require("../util/lift"); +function switchScan(accumulator, seed) { + return lift_1.operate(function (source, subscriber) { + var state = seed; + switchMap_1.switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber); + return function () { + state = null; + }; + }); +} +exports.switchScan = switchScan; + +},{"../util/lift":623,"./switchMap":542}],545:[function(require,module,exports){ +"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"); +function take(count) { + return count <= 0 + ? + function () { return empty_1.EMPTY; } + : lift_1.operate(function (source, subscriber) { + var seen = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); +} +exports.take = take; + +},{"../observable/empty":430,"../util/lift":623,"./OperatorSubscriber":452}],546:[function(require,module,exports){ +"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."); +}; +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"); +function takeLast(count) { + return count <= 0 + ? function () { return empty_1.EMPTY; } + : lift_1.operate(function (source, subscriber) { + var buffer = []; + source.subscribe(OperatorSubscriber_1.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; + })); + }); +} +exports.takeLast = takeLast; + +},{"../observable/empty":430,"../util/lift":623,"./OperatorSubscriber":452}],547:[function(require,module,exports){ +"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"); +function takeUntil(notifier) { + return lift_1.operate(function (source, subscriber) { + innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop_1.noop)); + !subscriber.closed && source.subscribe(subscriber); + }); +} +exports.takeUntil = takeUntil; + +},{"../observable/innerFrom":438,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],548:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.takeWhile = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function takeWhile(predicate, inclusive) { + if (inclusive === void 0) { inclusive = false; } + return lift_1.operate(function (source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); +} +exports.takeWhile = takeWhile; + +},{"../util/lift":623,"./OperatorSubscriber":452}],549:[function(require,module,exports){ +"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"); +function tap(observerOrNext, error, complete) { + 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(OperatorSubscriber_1.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_1.identity; +} +exports.tap = tap; + +},{"../util/identity":612,"../util/isFunction":616,"../util/lift":623,"./OperatorSubscriber":452}],550:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.throttle = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +function throttle(durationSelector, config) { + return lift_1.operate(function (source, subscriber) { + var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c; + 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; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + var cleanupThrottling = function () { + throttled = null; + isComplete && subscriber.complete(); + }; + var startThrottle = function (value) { + return (throttled = innerFrom_1.innerFrom(durationSelector(value)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + }; + var send = function () { + if (hasValue) { + hasValue = false; + var value = sendValue; + sendValue = null; + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + source.subscribe(OperatorSubscriber_1.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(); + })); + }); +} +exports.throttle = throttle; + +},{"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452}],551:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.throttleTime = void 0; +var async_1 = require("../scheduler/async"); +var throttle_1 = require("./throttle"); +var timer_1 = require("../observable/timer"); +function throttleTime(duration, scheduler, config) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + var duration$ = timer_1.timer(duration, scheduler); + return throttle_1.throttle(function () { return duration$; }, config); +} +exports.throttleTime = throttleTime; + +},{"../observable/timer":449,"../scheduler/async":587,"./throttle":550}],552:[function(require,module,exports){ +"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"); +function throwIfEmpty(errorFactory) { + if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } + return lift_1.operate(function (source, subscriber) { + var hasValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(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(); +} + +},{"../util/EmptyError":598,"../util/lift":623,"./OperatorSubscriber":452}],553:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TimeInterval = exports.timeInterval = void 0; +var async_1 = require("../scheduler/async"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function timeInterval(scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + return lift_1.operate(function (source, subscriber) { + var last = scheduler.now(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var now = scheduler.now(); + var interval = now - last; + last = now; + subscriber.next(new TimeInterval(value, interval)); + })); + }); +} +exports.timeInterval = timeInterval; +var TimeInterval = (function () { + function TimeInterval(value, interval) { + this.value = value; + this.interval = interval; + } + return TimeInterval; +}()); +exports.TimeInterval = TimeInterval; + +},{"../scheduler/async":587,"../util/lift":623,"./OperatorSubscriber":452}],554:[function(require,module,exports){ +"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"); +exports.TimeoutError = createErrorClass_1.createErrorClass(function (_super) { + return function TimeoutErrorImpl(info) { + if (info === void 0) { info = null; } + _super(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + this.info = info; + }; +}); +function timeout(config, schedulerArg) { + 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; + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return lift_1.operate(function (source, subscriber) { + var originalSourceSubscription; + var timerSubscription; + 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); + }; + originalSourceSubscription = source.subscribe(OperatorSubscriber_1.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; + })); + !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); + }); +} +exports.timeout = timeout; +function timeoutErrorFactory(info) { + throw new exports.TimeoutError(info); +} + +},{"../observable/innerFrom":438,"../scheduler/async":587,"../util/createErrorClass":608,"../util/executeSchedule":611,"../util/isDate":615,"../util/lift":623,"./OperatorSubscriber":452}],555:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timeoutWith = void 0; +var async_1 = require("../scheduler/async"); +var isDate_1 = require("../util/isDate"); +var timeout_1 = require("./timeout"); +function timeoutWith(due, withObservable, scheduler) { + var first; + var each; + var _with; + scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async_1.async; + if (isDate_1.isValidDate(due)) { + first = due; + } + else if (typeof due === 'number') { + each = due; + } + if (withObservable) { + _with = function () { return withObservable; }; + } + else { + throw new TypeError('No observable provided to switch to'); + } + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return timeout_1.timeout({ + first: first, + each: each, + scheduler: scheduler, + with: _with, + }); +} +exports.timeoutWith = timeoutWith; + +},{"../scheduler/async":587,"../util/isDate":615,"./timeout":554}],556:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timestamp = void 0; +var dateTimestampProvider_1 = require("../scheduler/dateTimestampProvider"); +var map_1 = require("./map"); +function timestamp(timestampProvider) { + if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider_1.dateTimestampProvider; } + return map_1.map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); }); +} +exports.timestamp = timestamp; + +},{"../scheduler/dateTimestampProvider":588,"./map":499}],557:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toArray = void 0; +var reduce_1 = require("./reduce"); +var lift_1 = require("../util/lift"); +var arrReducer = function (arr, value) { return (arr.push(value), arr); }; +function toArray() { + return lift_1.operate(function (source, subscriber) { + reduce_1.reduce(arrReducer, [])(source).subscribe(subscriber); + }); +} +exports.toArray = toArray; + +},{"../util/lift":623,"./reduce":521}],558:[function(require,module,exports){ +"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 innerFrom_1 = require("../observable/innerFrom"); +function window(windowBoundaries) { + return lift_1.operate(function (source, subscriber) { + var windowSubject = new Subject_1.Subject(); + subscriber.next(windowSubject.asObservable()); + var errorHandler = function (err) { + windowSubject.error(err); + subscriber.error(err); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { + windowSubject.complete(); + subscriber.complete(); + }, errorHandler)); + innerFrom_1.innerFrom(windowBoundaries).subscribe(OperatorSubscriber_1.createOperatorSubscriber(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; + }; + }); +} +exports.window = window; + +},{"../Subject":415,"../observable/innerFrom":438,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],559:[function(require,module,exports){ +"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."); +}; +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"); +function windowCount(windowSize, startWindowEvery) { + 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(OperatorSubscriber_1.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_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; + +},{"../Subject":415,"../util/lift":623,"./OperatorSubscriber":452}],560:[function(require,module,exports){ +"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"); +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 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; + window.complete(); + subs.unsubscribe(); + arrRemove_1.arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + var startWindow = function () { + if (windowRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var window_1 = new Subject_1.Subject(); + var record_1 = { + window: window_1, + subs: subs, + seen: 0, + }; + windowRecords.push(record_1); + subscriber.next(window_1.asObservable()); + 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 { + restartOnClose = true; + } + startWindow(); + var loop = function (cb) { return windowRecords.slice().forEach(cb); }; + var terminate = function (cb) { + loop(function (_a) { + var window = _a.window; + return cb(window); + }); + cb(subscriber); + subscriber.unsubscribe(); + }; + source.subscribe(OperatorSubscriber_1.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; + }; + }); +} +exports.windowTime = windowTime; + +},{"../Subject":415,"../Subscription":417,"../scheduler/async":587,"../util/args":604,"../util/arrRemove":607,"../util/executeSchedule":611,"../util/lift":623,"./OperatorSubscriber":452}],561:[function(require,module,exports){ +"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."); +}; +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"); +function windowToggle(openings, closingSelector) { + return lift_1.operate(function (source, subscriber) { + var windows = []; + var handleError = function (err) { + while (0 < windows.length) { + windows.shift().error(err); + } + subscriber.error(err); + }; + innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(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(OperatorSubscriber_1.createOperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError))); + }, noop_1.noop)); + source.subscribe(OperatorSubscriber_1.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(); + } + })); + }); +} +exports.windowToggle = windowToggle; + +},{"../Subject":415,"../Subscription":417,"../observable/innerFrom":438,"../util/arrRemove":607,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],562:[function(require,module,exports){ +"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"); +function windowWhen(closingSelector) { + return lift_1.operate(function (source, subscriber) { + var window; + var closingSubscriber; + var handleError = function (err) { + window.error(err); + subscriber.error(err); + }; + var openWindow = function () { + 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) { + handleError(err); + return; + } + closingNotifier.subscribe((closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + }; + openWindow(); + source.subscribe(OperatorSubscriber_1.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; + })); + }); +} +exports.windowWhen = windowWhen; + +},{"../Subject":415,"../observable/innerFrom":438,"../util/lift":623,"./OperatorSubscriber":452}],563:[function(require,module,exports){ +"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 { + 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; +}; +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"); +function withLatestFrom() { + var inputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + inputs[_i] = arguments[_i]; + } + var project = args_1.popResultSelector(inputs); + return lift_1.operate(function (source, subscriber) { + var len = inputs.length; + var otherValues = new Array(len); + var hasValue = inputs.map(function () { return false; }); + var ready = false; + var _loop_1 = function (i) { + innerFrom_1.innerFrom(inputs[i]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(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(OperatorSubscriber_1.createOperatorSubscriber(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; + +},{"../observable/innerFrom":438,"../util/args":604,"../util/identity":612,"../util/lift":623,"../util/noop":625,"./OperatorSubscriber":452}],564:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.zip = void 0; +var zip_1 = require("../observable/zip"); +var lift_1 = require("../util/lift"); +function zip() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + return lift_1.operate(function (source, subscriber) { + zip_1.zip.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); + }); +} +exports.zip = zip; + +},{"../observable/zip":451,"../util/lift":623}],565:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.zipAll = void 0; +var zip_1 = require("../observable/zip"); +var joinAllInternals_1 = require("./joinAllInternals"); +function zipAll(project) { + return joinAllInternals_1.joinAllInternals(zip_1.zip, project); +} +exports.zipAll = zipAll; + +},{"../observable/zip":451,"./joinAllInternals":497}],566:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.zipWith = void 0; +var zip_1 = require("./zip"); +function zipWith() { + var otherInputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherInputs[_i] = arguments[_i]; + } + return zip_1.zip.apply(void 0, __spreadArray([], __read(otherInputs))); +} +exports.zipWith = zipWith; + +},{"./zip":564}],567:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleArray = void 0; +var Observable_1 = require("../Observable"); +function scheduleArray(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var i = 0; + return scheduler.schedule(function () { + if (i === input.length) { + subscriber.complete(); + } + else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); +} +exports.scheduleArray = scheduleArray; + +},{"../Observable":412}],568:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleAsyncIterable = void 0; +var Observable_1 = require("../Observable"); +var executeSchedule_1 = require("../util/executeSchedule"); +function scheduleAsyncIterable(input, scheduler) { + if (!input) { + throw new Error('Iterable cannot be null'); + } + return new Observable_1.Observable(function (subscriber) { + executeSchedule_1.executeSchedule(subscriber, scheduler, function () { + var iterator = input[Symbol.asyncIterator](); + executeSchedule_1.executeSchedule(subscriber, scheduler, function () { + iterator.next().then(function (result) { + if (result.done) { + subscriber.complete(); + } + else { + subscriber.next(result.value); + } + }); + }, 0, true); + }); + }); +} +exports.scheduleAsyncIterable = scheduleAsyncIterable; + +},{"../Observable":412,"../util/executeSchedule":611}],569:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleIterable = void 0; +var Observable_1 = require("../Observable"); +var iterator_1 = require("../symbol/iterator"); +var isFunction_1 = require("../util/isFunction"); +var executeSchedule_1 = require("../util/executeSchedule"); +function scheduleIterable(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var iterator; + executeSchedule_1.executeSchedule(subscriber, scheduler, function () { + iterator = input[iterator_1.iterator](); + executeSchedule_1.executeSchedule(subscriber, scheduler, function () { + var _a; + var value; + var done; + try { + (_a = iterator.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_1.isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); }; + }); +} +exports.scheduleIterable = scheduleIterable; + +},{"../Observable":412,"../symbol/iterator":594,"../util/executeSchedule":611,"../util/isFunction":616}],570:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleObservable = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var observeOn_1 = require("../operators/observeOn"); +var subscribeOn_1 = require("../operators/subscribeOn"); +function scheduleObservable(input, scheduler) { + return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); +} +exports.scheduleObservable = scheduleObservable; + +},{"../observable/innerFrom":438,"../operators/observeOn":512,"../operators/subscribeOn":540}],571:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.schedulePromise = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var observeOn_1 = require("../operators/observeOn"); +var subscribeOn_1 = require("../operators/subscribeOn"); +function schedulePromise(input, scheduler) { + return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); +} +exports.schedulePromise = schedulePromise; + +},{"../observable/innerFrom":438,"../operators/observeOn":512,"../operators/subscribeOn":540}],572:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleReadableStreamLike = void 0; +var scheduleAsyncIterable_1 = require("./scheduleAsyncIterable"); +var isReadableStreamLike_1 = require("../util/isReadableStreamLike"); +function scheduleReadableStreamLike(input, scheduler) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(input), scheduler); +} +exports.scheduleReadableStreamLike = scheduleReadableStreamLike; + +},{"../util/isReadableStreamLike":621,"./scheduleAsyncIterable":568}],573:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduled = void 0; +var scheduleObservable_1 = require("./scheduleObservable"); +var schedulePromise_1 = require("./schedulePromise"); +var scheduleArray_1 = require("./scheduleArray"); +var scheduleIterable_1 = require("./scheduleIterable"); +var scheduleAsyncIterable_1 = require("./scheduleAsyncIterable"); +var isInteropObservable_1 = require("../util/isInteropObservable"); +var isPromise_1 = require("../util/isPromise"); +var isArrayLike_1 = require("../util/isArrayLike"); +var isIterable_1 = require("../util/isIterable"); +var isAsyncIterable_1 = require("../util/isAsyncIterable"); +var throwUnobservableError_1 = require("../util/throwUnobservableError"); +var isReadableStreamLike_1 = require("../util/isReadableStreamLike"); +var scheduleReadableStreamLike_1 = require("./scheduleReadableStreamLike"); +function scheduled(input, scheduler) { + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return scheduleObservable_1.scheduleObservable(input, scheduler); + } + if (isArrayLike_1.isArrayLike(input)) { + return scheduleArray_1.scheduleArray(input, scheduler); + } + if (isPromise_1.isPromise(input)) { + return schedulePromise_1.schedulePromise(input, scheduler); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(input, scheduler); + } + if (isIterable_1.isIterable(input)) { + return scheduleIterable_1.scheduleIterable(input, scheduler); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return scheduleReadableStreamLike_1.scheduleReadableStreamLike(input, scheduler); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); +} +exports.scheduled = scheduled; + +},{"../util/isArrayLike":613,"../util/isAsyncIterable":614,"../util/isInteropObservable":617,"../util/isIterable":618,"../util/isPromise":620,"../util/isReadableStreamLike":621,"../util/throwUnobservableError":629,"./scheduleArray":567,"./scheduleAsyncIterable":568,"./scheduleIterable":569,"./scheduleObservable":570,"./schedulePromise":571,"./scheduleReadableStreamLike":572}],574:[function(require,module,exports){ +"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.Action = void 0; +var Subscription_1 = require("../Subscription"); +var Action = (function (_super) { + __extends(Action, _super); + function Action(scheduler, work) { + return _super.call(this) || this; + } + Action.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + return this; + }; + return Action; +}(Subscription_1.Subscription)); +exports.Action = Action; + +},{"../Subscription":417}],575:[function(require,module,exports){ +"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.AnimationFrameAction = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var animationFrameProvider_1 = require("./animationFrameProvider"); +var AnimationFrameAction = (function (_super) { + __extends(AnimationFrameAction, _super); + function AnimationFrameAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + 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); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); })); + }; + AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + var actions = scheduler.actions; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); + scheduler._scheduled = undefined; + } + return undefined; + }; + return AnimationFrameAction; +}(AsyncAction_1.AsyncAction)); +exports.AnimationFrameAction = AnimationFrameAction; + +},{"./AsyncAction":579,"./animationFrameProvider":585}],576:[function(require,module,exports){ +"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.AnimationFrameScheduler = void 0; +var AsyncScheduler_1 = require("./AsyncScheduler"); +var AnimationFrameScheduler = (function (_super) { + __extends(AnimationFrameScheduler, _super); + function AnimationFrameScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler.prototype.flush = function (action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = undefined; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.AnimationFrameScheduler = AnimationFrameScheduler; + +},{"./AsyncScheduler":580}],577:[function(require,module,exports){ +"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.AsapAction = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var immediateProvider_1 = require("./immediateProvider"); +var AsapAction = (function (_super) { + __extends(AsapAction, _super); + function AsapAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AsapAction.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); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = immediateProvider_1.immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); + }; + AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + var actions = scheduler.actions; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + immediateProvider_1.immediateProvider.clearImmediate(id); + if (scheduler._scheduled === id) { + scheduler._scheduled = undefined; + } + } + return undefined; + }; + return AsapAction; +}(AsyncAction_1.AsyncAction)); +exports.AsapAction = AsapAction; + +},{"./AsyncAction":579,"./immediateProvider":589}],578:[function(require,module,exports){ +"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.AsapScheduler = void 0; +var AsyncScheduler_1 = require("./AsyncScheduler"); +var AsapScheduler = (function (_super) { + __extends(AsapScheduler, _super); + function AsapScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler.prototype.flush = function (action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = undefined; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.AsapScheduler = AsapScheduler; + +},{"./AsyncScheduler":580}],579:[function(require,module,exports){ +"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.AsyncAction = void 0; +var Action_1 = require("./Action"); +var intervalProvider_1 = require("./intervalProvider"); +var arrRemove_1 = require("../util/arrRemove"); +var AsyncAction = (function (_super) { + __extends(AsyncAction, _super); + function AsyncAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction.prototype.schedule = function (state, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) { + if (delay === void 0) { delay = 0; } + return intervalProvider_1.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; + } + if (id != null) { + intervalProvider_1.intervalProvider.clearInterval(id); + } + return undefined; + }; + AsyncAction.prototype.execute = function (state, delay) { + if (this.closed) { + return new Error('executing a cancelled action'); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } + else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction.prototype._execute = function (state, _delay) { + var errored = false; + var errorValue; + try { + this.work(state); + } + catch (e) { + errored = true; + errorValue = e ? e : new Error('Scheduled action threw falsy error'); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction.prototype.unsubscribe = function () { + if (!this.closed) { + var _a = this, id = _a.id, scheduler = _a.scheduler; + var actions = scheduler.actions; + this.work = this.state = this.scheduler = null; + this.pending = false; + arrRemove_1.arrRemove(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + _super.prototype.unsubscribe.call(this); + } + }; + return AsyncAction; +}(Action_1.Action)); +exports.AsyncAction = AsyncAction; + +},{"../util/arrRemove":607,"./Action":574,"./intervalProvider":590}],580:[function(require,module,exports){ +"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.AsyncScheduler = void 0; +var Scheduler_1 = require("../Scheduler"); +var AsyncScheduler = (function (_super) { + __extends(AsyncScheduler, _super); + function AsyncScheduler(SchedulerAction, now) { + if (now === void 0) { now = Scheduler_1.Scheduler.now; } + var _this = _super.call(this, SchedulerAction, now) || this; + _this.actions = []; + _this._active = false; + return _this; + } + AsyncScheduler.prototype.flush = function (action) { + var actions = this.actions; + if (this._active) { + actions.push(action); + return; + } + var error; + this._active = true; + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions.shift())); + this._active = false; + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler; +}(Scheduler_1.Scheduler)); +exports.AsyncScheduler = AsyncScheduler; + +},{"../Scheduler":414}],581:[function(require,module,exports){ +"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.QueueAction = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var QueueAction = (function (_super) { + __extends(QueueAction, _super); + function QueueAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + QueueAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction.prototype.execute = function (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); + } + scheduler.flush(this); + return 0; + }; + return QueueAction; +}(AsyncAction_1.AsyncAction)); +exports.QueueAction = QueueAction; + +},{"./AsyncAction":579}],582:[function(require,module,exports){ +"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.QueueScheduler = void 0; +var AsyncScheduler_1 = require("./AsyncScheduler"); +var QueueScheduler = (function (_super) { + __extends(QueueScheduler, _super); + function QueueScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.QueueScheduler = QueueScheduler; + +},{"./AsyncScheduler":580}],583:[function(require,module,exports){ +"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.VirtualAction = exports.VirtualTimeScheduler = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var Subscription_1 = require("../Subscription"); +var AsyncScheduler_1 = require("./AsyncScheduler"); +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; + _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 error; + var action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if ((error = action.execute(action.state, action.delay))) { + break; + } + } + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler.frameTimeFactor = 10; + return VirtualTimeScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.VirtualTimeScheduler = VirtualTimeScheduler; +var VirtualAction = (function (_super) { + __extends(VirtualAction, _super); + function VirtualAction(scheduler, work, index) { + if (index === void 0) { index = (scheduler.index += 1); } + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler.index = index; + return _this; + } + VirtualAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (Number.isFinite(delay)) { + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } + else { + return Subscription_1.Subscription.EMPTY; + } + }; + 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 1; + }; + VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + return undefined; + }; + VirtualAction.prototype._execute = function (state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction.sortActions = function (a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } + else if (a.index > b.index) { + return 1; + } + else { + return -1; + } + } + else if (a.delay > b.delay) { + return 1; + } + else { + return -1; + } + }; + return VirtualAction; +}(AsyncAction_1.AsyncAction)); +exports.VirtualAction = VirtualAction; + +},{"../Subscription":417,"./AsyncAction":579,"./AsyncScheduler":580}],584:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.animationFrame = exports.animationFrameScheduler = void 0; +var AnimationFrameAction_1 = require("./AnimationFrameAction"); +var AnimationFrameScheduler_1 = require("./AnimationFrameScheduler"); +exports.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction); +exports.animationFrame = exports.animationFrameScheduler; + +},{"./AnimationFrameAction":575,"./AnimationFrameScheduler":576}],585:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.animationFrameProvider = void 0; +var Subscription_1 = require("../Subscription"); +exports.animationFrameProvider = { + schedule: function (callback) { + var request = requestAnimationFrame; + var cancel = cancelAnimationFrame; + var delegate = exports.animationFrameProvider.delegate; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + var handle = request(function (timestamp) { + cancel = undefined; + callback(timestamp); + }); + return new Subscription_1.Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); }); + }, + requestAnimationFrame: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = exports.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + }, + cancelAnimationFrame: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = exports.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + }, + delegate: undefined, +}; + +},{"../Subscription":417}],586:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.asap = exports.asapScheduler = void 0; +var AsapAction_1 = require("./AsapAction"); +var AsapScheduler_1 = require("./AsapScheduler"); +exports.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); +exports.asap = exports.asapScheduler; + +},{"./AsapAction":577,"./AsapScheduler":578}],587:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.async = exports.asyncScheduler = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var AsyncScheduler_1 = require("./AsyncScheduler"); +exports.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); +exports.async = exports.asyncScheduler; + +},{"./AsyncAction":579,"./AsyncScheduler":580}],588:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dateTimestampProvider = void 0; +exports.dateTimestampProvider = { + now: function () { + return (exports.dateTimestampProvider.delegate || Date).now(); + }, + delegate: undefined, +}; + +},{}],589:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.immediateProvider = void 0; +var Immediate_1 = require("../util/Immediate"); +var setImmediate = Immediate_1.Immediate.setImmediate, clearImmediate = Immediate_1.Immediate.clearImmediate; +exports.immediateProvider = { + setImmediate: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = exports.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args))); + }, + clearImmediate: function (handle) { + var delegate = exports.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); + }, + delegate: undefined, +}; + +},{"../util/Immediate":599}],590:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.intervalProvider = void 0; +exports.intervalProvider = { + setInterval: function (handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = exports.intervalProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { + return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args))); + } + return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args))); + }, + clearInterval: function (handle) { + var delegate = exports.intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: undefined, +}; + +},{}],591:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.performanceTimestampProvider = void 0; +exports.performanceTimestampProvider = { + now: function () { + return (exports.performanceTimestampProvider.delegate || performance).now(); + }, + delegate: undefined, +}; + +},{}],592:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.queue = exports.queueScheduler = void 0; +var QueueAction_1 = require("./QueueAction"); +var QueueScheduler_1 = require("./QueueScheduler"); +exports.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); +exports.queue = exports.queueScheduler; + +},{"./QueueAction":581,"./QueueScheduler":582}],593:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timeoutProvider = void 0; +exports.timeoutProvider = { + setTimeout: function (handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = exports.timeoutProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { + return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args))); + } + return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args))); + }, + clearTimeout: function (handle) { + var delegate = exports.timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: undefined, +}; + +},{}],594:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.iterator = exports.getSymbolIterator = void 0; +function getSymbolIterator() { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator'; + } + return Symbol.iterator; +} +exports.getSymbolIterator = getSymbolIterator; +exports.iterator = getSymbolIterator(); + +},{}],595:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.observable = void 0; +exports.observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })(); + +},{}],596:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +},{}],597:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ArgumentOutOfRangeError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.ArgumentOutOfRangeError = createErrorClass_1.createErrorClass(function (_super) { + return function ArgumentOutOfRangeErrorImpl() { + _super(this); + this.name = 'ArgumentOutOfRangeError'; + this.message = 'argument out of range'; + }; +}); + +},{"./createErrorClass":608}],598:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EmptyError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.EmptyError = createErrorClass_1.createErrorClass(function (_super) { return function EmptyErrorImpl() { + _super(this); + this.name = 'EmptyError'; + this.message = 'no elements in sequence'; +}; }); + +},{"./createErrorClass":608}],599:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TestTools = exports.Immediate = void 0; +var nextHandle = 1; +var resolved; +var activeHandles = {}; +function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; +} +exports.Immediate = { + setImmediate: function (cb) { + var handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(function () { return findAndClearHandle(handle) && cb(); }); + return handle; + }, + clearImmediate: function (handle) { + findAndClearHandle(handle); + }, +}; +exports.TestTools = { + pending: function () { + return Object.keys(activeHandles).length; + } +}; + +},{}],600:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NotFoundError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.NotFoundError = createErrorClass_1.createErrorClass(function (_super) { + return function NotFoundErrorImpl(message) { + _super(this); + this.name = 'NotFoundError'; + this.message = message; + }; +}); + +},{"./createErrorClass":608}],601:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ObjectUnsubscribedError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.ObjectUnsubscribedError = createErrorClass_1.createErrorClass(function (_super) { + return function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = 'ObjectUnsubscribedError'; + this.message = 'object unsubscribed'; + }; +}); + +},{"./createErrorClass":608}],602:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SequenceError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.SequenceError = createErrorClass_1.createErrorClass(function (_super) { + return function SequenceErrorImpl(message) { + _super(this); + this.name = 'SequenceError'; + this.message = message; + }; +}); + +},{"./createErrorClass":608}],603:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UnsubscriptionError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.UnsubscriptionError = createErrorClass_1.createErrorClass(function (_super) { + 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 ') + : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; + }; +}); + +},{"./createErrorClass":608}],604:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.popNumber = exports.popScheduler = exports.popResultSelector = void 0; +var isFunction_1 = require("./isFunction"); +var isScheduler_1 = require("./isScheduler"); +function last(arr) { + return arr[arr.length - 1]; +} +function popResultSelector(args) { + return isFunction_1.isFunction(last(args)) ? args.pop() : undefined; +} +exports.popResultSelector = popResultSelector; +function popScheduler(args) { + return isScheduler_1.isScheduler(last(args)) ? args.pop() : undefined; +} +exports.popScheduler = popScheduler; +function popNumber(args, defaultValue) { + return typeof last(args) === 'number' ? args.pop() : defaultValue; +} +exports.popNumber = popNumber; + +},{"./isFunction":616,"./isScheduler":622}],605:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.argsArgArrayOrObject = void 0; +var isArray = Array.isArray; +var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys; +function argsArgArrayOrObject(args) { + if (args.length === 1) { + var first_1 = args[0]; + if (isArray(first_1)) { + return { args: first_1, keys: null }; + } + if (isPOJO(first_1)) { + var keys = getKeys(first_1); + return { + args: keys.map(function (key) { return first_1[key]; }), + keys: keys, + }; + } + } + return { args: args, keys: null }; +} +exports.argsArgArrayOrObject = argsArgArrayOrObject; +function isPOJO(obj) { + return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; +} + +},{}],606:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.argsOrArgArray = void 0; +var isArray = Array.isArray; +function argsOrArgArray(args) { + return args.length === 1 && isArray(args[0]) ? args[0] : args; +} +exports.argsOrArgArray = argsOrArgArray; + +},{}],607:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.arrRemove = void 0; +function arrRemove(arr, item) { + if (arr) { + var index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } +} +exports.arrRemove = arrRemove; + +},{}],608:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createErrorClass = void 0; +function createErrorClass(createImpl) { + var _super = function (instance) { + Error.call(instance); + instance.stack = new Error().stack; + }; + var ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; +} +exports.createErrorClass = createErrorClass; + +},{}],609:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createObject = void 0; +function createObject(keys, values) { + return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {}); +} +exports.createObject = createObject; + +},{}],610:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.captureError = exports.errorContext = void 0; +var config_1 = require("../config"); +var context = null; +function errorContext(cb) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + var isRoot = !context; + if (isRoot) { + context = { errorThrown: false, error: null }; + } + cb(); + if (isRoot) { + var _a = context, errorThrown = _a.errorThrown, error = _a.error; + context = null; + if (errorThrown) { + throw error; + } + } + } + else { + cb(); + } +} +exports.errorContext = errorContext; +function captureError(err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } +} +exports.captureError = captureError; + +},{"../config":418}],611:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.executeSchedule = void 0; +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 { + this.unsubscribe(); + } + }, delay); + parentSubscription.add(scheduleSubscription); + if (!repeat) { + return scheduleSubscription; + } +} +exports.executeSchedule = executeSchedule; + +},{}],612:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.identity = void 0; +function identity(x) { + return x; +} +exports.identity = identity; + +},{}],613:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isArrayLike = void 0; +exports.isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); + +},{}],614:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isAsyncIterable = void 0; +var isFunction_1 = require("./isFunction"); +function isAsyncIterable(obj) { + return Symbol.asyncIterator && isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); +} +exports.isAsyncIterable = isAsyncIterable; + +},{"./isFunction":616}],615:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isValidDate = void 0; +function isValidDate(value) { + return value instanceof Date && !isNaN(value); +} +exports.isValidDate = isValidDate; + +},{}],616:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isFunction = void 0; +function isFunction(value) { + return typeof value === 'function'; +} +exports.isFunction = isFunction; + +},{}],617:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isInteropObservable = void 0; +var observable_1 = require("../symbol/observable"); +var isFunction_1 = require("./isFunction"); +function isInteropObservable(input) { + return isFunction_1.isFunction(input[observable_1.observable]); +} +exports.isInteropObservable = isInteropObservable; + +},{"../symbol/observable":595,"./isFunction":616}],618:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isIterable = void 0; +var iterator_1 = require("../symbol/iterator"); +var isFunction_1 = require("./isFunction"); +function isIterable(input) { + return isFunction_1.isFunction(input === null || input === void 0 ? void 0 : input[iterator_1.iterator]); +} +exports.isIterable = isIterable; + +},{"../symbol/iterator":594,"./isFunction":616}],619:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isObservable = void 0; +var Observable_1 = require("../Observable"); +var isFunction_1 = require("./isFunction"); +function isObservable(obj) { + return !!obj && (obj instanceof Observable_1.Observable || (isFunction_1.isFunction(obj.lift) && isFunction_1.isFunction(obj.subscribe))); +} +exports.isObservable = isObservable; + +},{"../Observable":412,"./isFunction":616}],620:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isPromise = void 0; +var isFunction_1 = require("./isFunction"); +function isPromise(value) { + return isFunction_1.isFunction(value === null || value === void 0 ? void 0 : value.then); +} +exports.isPromise = isPromise; + +},{"./isFunction":616}],621:[function(require,module,exports){ +"use strict"; +var __generator = (this && this.__generator) || function (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 }; + } +}; +var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } +var __asyncGenerator = (this && this.__asyncGenerator) || function (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]); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isReadableStreamLike = exports.readableStreamLikeToAsyncGenerator = void 0; +var isFunction_1 = require("./isFunction"); +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: + if (!true) return [3, 8]; + 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]; + } + }); + }); +} +exports.readableStreamLikeToAsyncGenerator = readableStreamLikeToAsyncGenerator; +function isReadableStreamLike(obj) { + return isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); +} +exports.isReadableStreamLike = isReadableStreamLike; + +},{"./isFunction":616}],622:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isScheduler = void 0; +var isFunction_1 = require("./isFunction"); +function isScheduler(value) { + return value && isFunction_1.isFunction(value.schedule); +} +exports.isScheduler = isScheduler; + +},{"./isFunction":616}],623:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.operate = exports.hasLift = void 0; +var isFunction_1 = require("./isFunction"); +function hasLift(source) { + return isFunction_1.isFunction(source === null || source === void 0 ? void 0 : source.lift); +} +exports.hasLift = hasLift; +function operate(init) { + return function (source) { + if (hasLift(source)) { + return source.lift(function (liftedSource) { + try { + return init(liftedSource, this); + } + catch (err) { + this.error(err); + } + }); + } + throw new TypeError('Unable to lift unknown Observable type'); + }; +} +exports.operate = operate; + +},{"./isFunction":616}],624:[function(require,module,exports){ +"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 { + 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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mapOneOrManyArgs = void 0; +var map_1 = require("../operators/map"); +var isArray = Array.isArray; +function callOrApply(fn, args) { + return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args); +} +function mapOneOrManyArgs(fn) { + return map_1.map(function (args) { return callOrApply(fn, args); }); +} +exports.mapOneOrManyArgs = mapOneOrManyArgs; + +},{"../operators/map":499}],625:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.noop = void 0; +function noop() { } +exports.noop = noop; + +},{}],626:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.not = void 0; +function not(pred, thisArg) { + return function (value, index) { return !pred.call(thisArg, value, index); }; +} +exports.not = not; + +},{}],627:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pipeFromArray = exports.pipe = void 0; +var identity_1 = require("./identity"); +function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); +} +exports.pipe = pipe; +function pipeFromArray(fns) { + if (fns.length === 0) { + return identity_1.identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function (prev, fn) { return fn(prev); }, input); + }; +} +exports.pipeFromArray = pipeFromArray; + +},{"./identity":612}],628:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.reportUnhandledError = void 0; +var config_1 = require("../config"); +var timeoutProvider_1 = require("../scheduler/timeoutProvider"); +function reportUnhandledError(err) { + timeoutProvider_1.timeoutProvider.setTimeout(function () { + var onUnhandledError = config_1.config.onUnhandledError; + if (onUnhandledError) { + onUnhandledError(err); + } + else { + throw err; + } + }); +} +exports.reportUnhandledError = reportUnhandledError; + +},{"../config":418,"../scheduler/timeoutProvider":593}],629:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createInvalidObservableTypeError = void 0; +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."); +} +exports.createInvalidObservableTypeError = createInvalidObservableTypeError; + +},{}],630:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var gOPD = require('gopd'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $floor = GetIntrinsic('%Math.floor%'); + +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(fn, 'length', length, true, true); + } else { + define(fn, 'length', length); + } + } + return fn; +}; + +},{"define-data-property":351,"get-intrinsic":358,"gopd":359,"has-property-descriptors":361}],631:[function(require,module,exports){ +'use strict'; + +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +var $TypeError = TypeError; + +module.exports = function setFunctionName(fn, name) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + var loose = arguments.length > 2 && !!arguments[2]; + if (!loose || functionsHaveConfigurableNames) { + if (hasDescriptors) { + define(fn, 'name', name, true, true); + } else { + define(fn, 'name', name); + } + } + return fn; +}; + +},{"define-data-property":351,"functions-have-names":357,"has-property-descriptors":361}],632:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var inspect = require('object-inspect'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $WeakMap = GetIntrinsic('%WeakMap%', true); +var $Map = GetIntrinsic('%Map%', true); + +var $weakMapGet = callBound('WeakMap.prototype.get', true); +var $weakMapSet = callBound('WeakMap.prototype.set', true); +var $weakMapHas = callBound('WeakMap.prototype.has', true); +var $mapGet = callBound('Map.prototype.get', true); +var $mapSet = callBound('Map.prototype.set', true); +var $mapHas = callBound('Map.prototype.has', true); + +/* + * This function traverses the list returning the node corresponding to the + * given key. + * + * That node is also moved to the head of the list, so that if it's accessed + * again we don't need to traverse the whole list. By doing so, all the recently + * used nodes can be accessed relatively quickly. + */ +var listGetNode = function (list, key) { // eslint-disable-line consistent-return + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + curr.next = list.next; + list.next = curr; // eslint-disable-line no-param-reassign + return curr; + } + } +}; + +var listGet = function (objects, key) { + var node = listGetNode(objects, key); + return node && node.value; +}; +var listSet = function (objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + // Prepend the new node to the beginning of the list + objects.next = { // eslint-disable-line no-param-reassign + key: key, + next: objects.next, + value: value + }; + } +}; +var listHas = function (objects, key) { return !!listGetNode(objects, key); }; @@ -15818,7 +23452,7 @@ module.exports = function getSideChannel() { return channel; }; -},{"call-bind/callBound":43,"get-intrinsic":358,"object-inspect":387}],410:[function(require,module,exports){ +},{"call-bind/callBound":43,"get-intrinsic":358,"object-inspect":387}],633:[function(require,module,exports){ 'use strict'; var SLOT = require('internal-slot'); @@ -15860,7 +23494,7 @@ module.exports = function getStopIterationIterator(origIterator) { return siIterator; }; -},{"internal-slot":368}],411:[function(require,module,exports){ +},{"internal-slot":368}],634:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -15912,7 +23546,7 @@ function addBrowser(fn) { * @link https://stackoverflow.com/a/26193516/3443137 */ } -},{}],412:[function(require,module,exports){ +},{}],635:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -15973,7 +23607,7 @@ function getSize() { return LISTENERS.size; } }).call(this)}).call(this,require('_process')) -},{"./browser.js":411,"./node.js":413,"_process":401}],413:[function(require,module,exports){ +},{"./browser.js":634,"./node.js":636,"_process":401}],636:[function(require,module,exports){ (function (process){(function (){ "use strict"; @@ -16012,7 +23646,7 @@ function addNode(fn) { }); } }).call(this)}).call(this,require('_process')) -},{"_process":401}],414:[function(require,module,exports){ +},{"_process":401}],637:[function(require,module,exports){ 'use strict'; var isString = require('is-string'); @@ -16044,7 +23678,7 @@ module.exports = function whichBoxedPrimitive(value) { } }; -},{"is-bigint":371,"is-boolean-object":372,"is-number-object":377,"is-string":381,"is-symbol":382}],415:[function(require,module,exports){ +},{"is-bigint":371,"is-boolean-object":372,"is-number-object":377,"is-string":381,"is-symbol":382}],638:[function(require,module,exports){ 'use strict'; var isMap = require('is-map'); @@ -16070,7 +23704,7 @@ module.exports = function whichCollection(value) { return false; }; -},{"is-map":375,"is-set":379,"is-weakmap":384,"is-weakset":385}],416:[function(require,module,exports){ +},{"is-map":375,"is-set":379,"is-weakmap":384,"is-weakset":385}],639:[function(require,module,exports){ (function (global){(function (){ 'use strict'; @@ -16166,13 +23800,14 @@ module.exports = function whichTypedArray(value) { }; }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"available-typed-arrays":39,"call-bind":44,"call-bind/callBound":43,"for-each":354,"gopd":359,"has-tostringtag/shams":365}],417:[function(require,module,exports){ +},{"available-typed-arrays":39,"call-bind":44,"call-bind/callBound":43,"for-each":354,"gopd":359,"has-tostringtag/shams":365}],640:[function(require,module,exports){ "use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); var _util = require("./util.js"); +var _rxjs = require("rxjs"); /* eslint-disable */ /** * used in docs/e2e.html @@ -16419,7 +24054,7 @@ function run() { // Worker test window.startWorkerTest = /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() { - var worker, t, perRun, k, done, amountTime; + var worker, t, perRun, k, done, messages$, workerListener, amountTime; return _regenerator["default"].wrap(function _callee5$(_context5) { while (1) switch (_context5.prev = _context5.next) { case 0: @@ -16460,13 +24095,18 @@ function run() { perRun = 100; k = 0; done = 0; - case 14: + messages$ = new _rxjs.Subject(); + workerListener = function workerListener(msg) { + messages$.next(msg); + }; + channel.addEventListener('message', workerListener); + case 17: if (!(t > 0)) { - _context5.next = 20; + _context5.next = 23; break; } t--; - _context5.next = 18; + _context5.next = 21; return Promise.all(new Array(perRun).fill(0).map( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() { var msgId, waitForResponsePromise; return _regenerator["default"].wrap(function _callee4$(_context4) { @@ -16481,17 +24121,16 @@ function run() { case 3: msgId = 'worker-test-' + startTime + '-' + k++; waitForResponsePromise = new Promise(function (res) { - var listener = function listener(msg) { + var sub = messages$.subscribe(function (msg) { if (msg.answer == true && msg.original.id === msgId) { console.dir('msg for response:;:'); console.dir(msg); done++; messageCountWorkerContainer.innerHTML = done; - channel.removeEventListener('message', listener); + sub.unsubscribe(); res(); } - }; - channel.addEventListener('message', listener); + }); }); channel.postMessage({ from: 'main-worker', @@ -16515,15 +24154,16 @@ function run() { } }, _callee4); })))); - case 18: - _context5.next = 14; + case 21: + _context5.next = 17; break; - case 20: + case 23: + channel.removeEventListener('message', workerListener); body.style.backgroundColor = 'green'; stateContainer.innerHTML = 'SUCCESS'; amountTime = new Date().getTime() - startTime; document.getElementById('time-amount').innerHTML = amountTime + 'ms'; - case 24: + case 28: case "end": return _context5.stop(); } @@ -16540,7 +24180,7 @@ try { console.log('error in run-function:'); console.error(error); } -},{"../../":2,"./util.js":418,"@babel/polyfill":14,"@babel/runtime/helpers/asyncToGenerator":16,"@babel/runtime/helpers/interopRequireDefault":17,"@babel/runtime/regenerator":20,"async-test-util":25}],418:[function(require,module,exports){ +},{"../../":2,"./util.js":641,"@babel/polyfill":14,"@babel/runtime/helpers/asyncToGenerator":16,"@babel/runtime/helpers/interopRequireDefault":17,"@babel/runtime/regenerator":20,"async-test-util":25,"rxjs":407}],641:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -16559,4 +24199,4 @@ function getParameterByName(name, url) { if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); } -},{}]},{},[417]); +},{}]},{},[640]); diff --git a/docs/iframe.js b/docs/iframe.js index fe7f1ca6..646f205c 100644 --- a/docs/iframe.js +++ b/docs/iframe.js @@ -238,18 +238,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); @@ -1392,14 +1381,15 @@ var microSeconds = exports.microSeconds = _util.microSeconds; var type = exports.type = 'native'; function create(channelName) { var state = { + time: (0, _util.microSeconds)(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = function (msg) { + state.bc.onmessage = function (msgEvent) { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; return state; @@ -1455,7 +1445,7 @@ var NativeMethod = exports.NativeMethod = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.SimulateMethod = void 0; +exports.SimulateMethod = exports.SIMULATE_DELAY_TIME = void 0; exports.averageResponseTime = averageResponseTime; exports.canBeUsed = canBeUsed; exports.close = close; @@ -1470,30 +1460,36 @@ var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { + time: microSeconds(), name: channelName, messagesCallback: null }; + console.log('created channel ' + state.counter); SIMULATE_CHANNELS.add(state); return state; } function close(channelState) { SIMULATE_CHANNELS["delete"](channelState); } +var SIMULATE_DELAY_TIME = exports.SIMULATE_DELAY_TIME = 5; function postMessage(channelState, messageJson) { return new Promise(function (res) { return setTimeout(function () { var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function (channel) { - return channel.name === channelState.name; - }).filter(function (channel) { - return channel !== channelState; - }).filter(function (channel) { - return !!channel.messagesCallback; - }).forEach(function (channel) { - return channel.messagesCallback(messageJson); + channelArray.forEach(function (channel) { + if (channel.name === channelState.name && + // has same name + channel !== channelState && + // not own channel + !!channel.messagesCallback && + // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } }); res(); - }, 5); + }, SIMULATE_DELAY_TIME); }); } function onMessage(channelState, fn) { @@ -1503,7 +1499,7 @@ function canBeUsed() { return true; } function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } var SimulateMethod = exports.SimulateMethod = { create: create, @@ -1596,25 +1592,21 @@ function randomToken() { return Math.random().toString(36).substring(2); } var lastMs = 0; -var additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ function microSeconds() { - var ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + var ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** diff --git a/docs/index.js b/docs/index.js index 421a0dfd..01d38746 100644 --- a/docs/index.js +++ b/docs/index.js @@ -238,18 +238,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); @@ -1392,14 +1381,15 @@ var microSeconds = exports.microSeconds = _util.microSeconds; var type = exports.type = 'native'; function create(channelName) { var state = { + time: (0, _util.microSeconds)(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = function (msg) { + state.bc.onmessage = function (msgEvent) { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; return state; @@ -1455,7 +1445,7 @@ var NativeMethod = exports.NativeMethod = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.SimulateMethod = void 0; +exports.SimulateMethod = exports.SIMULATE_DELAY_TIME = void 0; exports.averageResponseTime = averageResponseTime; exports.canBeUsed = canBeUsed; exports.close = close; @@ -1470,30 +1460,36 @@ var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { + time: microSeconds(), name: channelName, messagesCallback: null }; + console.log('created channel ' + state.counter); SIMULATE_CHANNELS.add(state); return state; } function close(channelState) { SIMULATE_CHANNELS["delete"](channelState); } +var SIMULATE_DELAY_TIME = exports.SIMULATE_DELAY_TIME = 5; function postMessage(channelState, messageJson) { return new Promise(function (res) { return setTimeout(function () { var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function (channel) { - return channel.name === channelState.name; - }).filter(function (channel) { - return channel !== channelState; - }).filter(function (channel) { - return !!channel.messagesCallback; - }).forEach(function (channel) { - return channel.messagesCallback(messageJson); + channelArray.forEach(function (channel) { + if (channel.name === channelState.name && + // has same name + channel !== channelState && + // not own channel + !!channel.messagesCallback && + // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } }); res(); - }, 5); + }, SIMULATE_DELAY_TIME); }); } function onMessage(channelState, fn) { @@ -1503,7 +1499,7 @@ function canBeUsed() { return true; } function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } var SimulateMethod = exports.SimulateMethod = { create: create, @@ -1596,25 +1592,21 @@ function randomToken() { return Math.random().toString(36).substring(2); } var lastMs = 0; -var additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ function microSeconds() { - var ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + var ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** diff --git a/docs/leader-iframe.js b/docs/leader-iframe.js index 69ebe9ea..a12c6ced 100644 --- a/docs/leader-iframe.js +++ b/docs/leader-iframe.js @@ -238,18 +238,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); @@ -1392,14 +1381,15 @@ var microSeconds = exports.microSeconds = _util.microSeconds; var type = exports.type = 'native'; function create(channelName) { var state = { + time: (0, _util.microSeconds)(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = function (msg) { + state.bc.onmessage = function (msgEvent) { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; return state; @@ -1455,7 +1445,7 @@ var NativeMethod = exports.NativeMethod = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.SimulateMethod = void 0; +exports.SimulateMethod = exports.SIMULATE_DELAY_TIME = void 0; exports.averageResponseTime = averageResponseTime; exports.canBeUsed = canBeUsed; exports.close = close; @@ -1470,30 +1460,36 @@ var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { + time: microSeconds(), name: channelName, messagesCallback: null }; + console.log('created channel ' + state.counter); SIMULATE_CHANNELS.add(state); return state; } function close(channelState) { SIMULATE_CHANNELS["delete"](channelState); } +var SIMULATE_DELAY_TIME = exports.SIMULATE_DELAY_TIME = 5; function postMessage(channelState, messageJson) { return new Promise(function (res) { return setTimeout(function () { var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function (channel) { - return channel.name === channelState.name; - }).filter(function (channel) { - return channel !== channelState; - }).filter(function (channel) { - return !!channel.messagesCallback; - }).forEach(function (channel) { - return channel.messagesCallback(messageJson); + channelArray.forEach(function (channel) { + if (channel.name === channelState.name && + // has same name + channel !== channelState && + // not own channel + !!channel.messagesCallback && + // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } }); res(); - }, 5); + }, SIMULATE_DELAY_TIME); }); } function onMessage(channelState, fn) { @@ -1503,7 +1499,7 @@ function canBeUsed() { return true; } function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } var SimulateMethod = exports.SimulateMethod = { create: create, @@ -1596,25 +1592,21 @@ function randomToken() { return Math.random().toString(36).substring(2); } var lastMs = 0; -var additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ function microSeconds() { - var ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + var ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** diff --git a/docs/worker.js b/docs/worker.js index 4ab196c7..7524d2e9 100644 --- a/docs/worker.js +++ b/docs/worker.js @@ -238,18 +238,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); @@ -1392,14 +1381,15 @@ var microSeconds = exports.microSeconds = _util.microSeconds; var type = exports.type = 'native'; function create(channelName) { var state = { + time: (0, _util.microSeconds)(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = function (msg) { + state.bc.onmessage = function (msgEvent) { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; return state; @@ -1455,7 +1445,7 @@ var NativeMethod = exports.NativeMethod = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.SimulateMethod = void 0; +exports.SimulateMethod = exports.SIMULATE_DELAY_TIME = void 0; exports.averageResponseTime = averageResponseTime; exports.canBeUsed = canBeUsed; exports.close = close; @@ -1470,30 +1460,36 @@ var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { + time: microSeconds(), name: channelName, messagesCallback: null }; + console.log('created channel ' + state.counter); SIMULATE_CHANNELS.add(state); return state; } function close(channelState) { SIMULATE_CHANNELS["delete"](channelState); } +var SIMULATE_DELAY_TIME = exports.SIMULATE_DELAY_TIME = 5; function postMessage(channelState, messageJson) { return new Promise(function (res) { return setTimeout(function () { var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function (channel) { - return channel.name === channelState.name; - }).filter(function (channel) { - return channel !== channelState; - }).filter(function (channel) { - return !!channel.messagesCallback; - }).forEach(function (channel) { - return channel.messagesCallback(messageJson); + channelArray.forEach(function (channel) { + if (channel.name === channelState.name && + // has same name + channel !== channelState && + // not own channel + !!channel.messagesCallback && + // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } }); res(); - }, 5); + }, SIMULATE_DELAY_TIME); }); } function onMessage(channelState, fn) { @@ -1503,7 +1499,7 @@ function canBeUsed() { return true; } function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } var SimulateMethod = exports.SimulateMethod = { create: create, @@ -1596,25 +1592,21 @@ function randomToken() { return Math.random().toString(36).substring(2); } var lastMs = 0; -var additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ function microSeconds() { - var ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + var ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** diff --git a/package.json b/package.json index 236dfd19..6c92bdef 100644 --- a/package.json +++ b/package.json @@ -99,22 +99,23 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.23.2", + "@babel/runtime": "7.23.4", "oblivious-set": "1.4.0", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { - "@babel/cli": "7.23.0", - "@babel/core": "7.23.2", + "@babel/cli": "7.23.4", + "@babel/core": "7.23.3", "@babel/plugin-proposal-object-rest-spread": "7.20.7", - "@babel/plugin-transform-member-expression-literals": "7.22.5", - "@babel/plugin-transform-property-literals": "7.22.5", - "@babel/plugin-transform-runtime": "7.23.2", + "@babel/plugin-transform-member-expression-literals": "7.23.3", + "@babel/plugin-transform-property-literals": "7.23.3", + "@babel/plugin-transform-runtime": "7.23.4", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.23.2", - "@babel/types": "7.23.0", - "@types/core-js": "2.5.7", + "@babel/preset-env": "7.23.3", + "@babel/types": "7.23.4", + "@rollup/plugin-terser": "0.4.4", + "@types/core-js": "2.5.8", "assert": "2.1.0", "async-test-util": "2.2.1", "browserify": "17.0.0", @@ -125,7 +126,7 @@ "copyfiles": "2.4.1", "cross-env": "7.0.3", "detect-node": "2.1.0", - "eslint": "8.52.0", + "eslint": "8.54.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.7.0", @@ -147,11 +148,10 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.5", - "rollup": "4.1.5", - "@rollup/plugin-terser": "0.4.4", - "testcafe": "3.3.0", + "rollup": "4.6.0", + "testcafe": "3.4.0", "ts-node": "10.9.1", - "typescript": "5.2.2", + "typescript": "5.3.2", "uglify-js": "3.17.4", "watchify": "4.0.0", "webpack": "5.89.0", diff --git a/src/broadcast-channel.js b/src/broadcast-channel.js index f37d9eb5..75088df4 100644 --- a/src/broadcast-channel.js +++ b/src/broadcast-channel.js @@ -193,7 +193,6 @@ function _post(broadcastChannel, type, msg) { const awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID; return awaitPrepare.then(() => { - const sendPromise = broadcastChannel.method.postMessage( broadcastChannel._state, msgObj @@ -249,19 +248,7 @@ function _startListening(channel) { const listenerFn = msgObj => { channel._addEL[msgObj.type] .forEach(listenerObject => { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - const hundredMsInMicro = 100 * 1000; - const minMessageTime = listenerObject.time - hundredMsInMicro; - - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); diff --git a/src/methods/native.js b/src/methods/native.js index fa14d229..44228eda 100644 --- a/src/methods/native.js +++ b/src/methods/native.js @@ -10,14 +10,15 @@ export const type = 'native'; export function create(channelName) { const state = { + time: micro(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = msg => { + state.bc.onmessage = msgEvent => { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; diff --git a/src/methods/node.js b/src/methods/node.js index e27626e2..37dfde3a 100644 --- a/src/methods/node.js +++ b/src/methods/node.js @@ -272,11 +272,15 @@ export async function openClientConnection(channelName, readerUuid) { * @return {Promise} */ export function writeMessage(channelName, readerUuid, messageJson, paths) { + + let time = messageJson.time; + if (!time) { + time = microSeconds(); + } + paths = paths || getPaths(channelName); - const time = microSeconds(); const writeObject = { uuid: readerUuid, - time, data: messageJson }; @@ -451,8 +455,8 @@ export function _filterMessage(msgObj, state) { if (msgObj.senderUuid === state.uuid) return false; // not send by own if (state.emittedMessagesIds.has(msgObj.token)) return false; // not already emitted if (!state.messagesCallback) return false; // no listener - if (msgObj.time < state.messagesCallbackTime) return false; // not older then onMessageCallback - if (msgObj.time < state.time) return false; // msgObj is older then channel + if (msgObj.time < state.messagesCallbackTime) return false; // not older than onMessageCallback + if (msgObj.time < state.time) return false; // msgObj is older than channel state.emittedMessagesIds.add(msgObj.token); return true; diff --git a/src/methods/simulate.js b/src/methods/simulate.js index f1e0cb6b..467f3261 100644 --- a/src/methods/simulate.js +++ b/src/methods/simulate.js @@ -10,11 +10,11 @@ const SIMULATE_CHANNELS = new Set(); export function create(channelName) { const state = { + time: microSeconds(), name: channelName, messagesCallback: null }; SIMULATE_CHANNELS.add(state); - return state; } @@ -22,16 +22,23 @@ export function close(channelState) { SIMULATE_CHANNELS.delete(channelState); } +export const SIMULATE_DELAY_TIME = 5; + export function postMessage(channelState, messageJson) { return new Promise(res => setTimeout(() => { const channelArray = Array.from(SIMULATE_CHANNELS); - channelArray - .filter(channel => channel.name === channelState.name) - .filter(channel => channel !== channelState) - .filter(channel => !!channel.messagesCallback) - .forEach(channel => channel.messagesCallback(messageJson)); + channelArray.forEach(channel => { + if ( + channel.name === channelState.name && // has same name + channel !== channelState && // not own channel + !!channel.messagesCallback && // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } + }); res(); - }, 5)); + }, SIMULATE_DELAY_TIME)); } export function onMessage(channelState, fn) { @@ -44,7 +51,7 @@ export function canBeUsed() { export function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } export const SimulateMethod = { diff --git a/src/util.js b/src/util.js index 5737ccad..b21592b9 100644 --- a/src/util.js +++ b/src/util.js @@ -28,25 +28,21 @@ export function randomToken() { let lastMs = 0; -let additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ export function microSeconds() { - const ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + let ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** diff --git a/test/integration.test.js b/test/integration.test.js index c64768eb..15203451 100644 --- a/test/integration.test.js +++ b/test/integration.test.js @@ -194,7 +194,7 @@ function runTest(channelOptions) { /** * We have to wait 200ms here because only 'too old' messages should be filtered out. - * Becuase the JavaScript time precision is not good enough, we also emit messages that are only a bit off. + * Because the JavaScript time precision is not good enough, we also emit messages that are only a bit off. * This ensures we do not miss out messages which would be way more critical then getting additionals. */ await AsyncTestUtil.wait(200); @@ -253,14 +253,13 @@ function runTest(channelOptions) { channel.close(); otherChannel.close(); }); - it('should not read messages created before the channel was created', async () => { + it('should not read messages created before the channel was created (one message)', async () => { await AsyncTestUtil.wait(100); const channelName = AsyncTestUtil.randomString(12); const channel = new BroadcastChannel(channelName, channelOptions); await channel.postMessage('foo1'); - await AsyncTestUtil.wait(50); const otherChannel = new BroadcastChannel(channelName, channelOptions); const emittedOther = []; @@ -274,6 +273,35 @@ function runTest(channelOptions) { assert.equal(emittedOther.length, 2); + await channel.close(); + await otherChannel.close(); + }); + it('should not read messages created before the channel was created (many messages)', async () => { + await AsyncTestUtil.wait(100); + + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + + new Array(10).fill(0).forEach(() => { + /** + * Do not await here! + * It should not receive these messages even + * when the postMessage() was called but not finished yet. + */ + channel.postMessage('msg_from_before'); + }); + const otherChannel = new BroadcastChannel(channelName, channelOptions); + const emittedOther = []; + otherChannel.onmessage = msg => emittedOther.push(msg); + + await channel.postMessage('foo2'); + await channel.postMessage('foo3'); + + await AsyncTestUtil.waitUntil(() => emittedOther.length >= 2); + await AsyncTestUtil.wait(100); + + assert.equal(emittedOther.length, 2); + channel.close(); otherChannel.close(); }); @@ -743,13 +771,13 @@ if (isNode) { useOptions.push({ type: 'node', node: { - useFastPath: true + useFastPath: false } }); useOptions.push({ type: 'node', node: { - useFastPath: false + useFastPath: true } }); } else { diff --git a/test/scripts/e2e.js b/test/scripts/e2e.js index 5a2095db..f501fd61 100644 --- a/test/scripts/e2e.js +++ b/test/scripts/e2e.js @@ -14,7 +14,9 @@ var { randomNumber, randomBoolean } = require('async-test-util'); - +import { + Subject +} from 'rxjs'; function run() { console.log('run()'); @@ -136,6 +138,8 @@ function run() { }); }); } + + await wait(1000); console.log('========== START SENDING MESSAGES ' + channel.type); startTime = new Date().getTime(); channel.postMessage({ @@ -258,6 +262,15 @@ function run() { const perRun = 100; let k = 0; let done = 0; + + + const messages$ = new Subject(); + const workerListener = msg => { + messages$.next(msg); + } + channel.addEventListener('message', workerListener); + await wait(1000); + while (t > 0) { t--; await Promise.all( @@ -269,17 +282,16 @@ function run() { const msgId = 'worker-test-' + startTime + '-' + k++; const waitForResponsePromise = new Promise(res => { - const listener = msg => { + const sub = messages$.subscribe(msg => { if (msg.answer == true && msg.original.id === msgId) { console.dir('msg for response:;:'); console.dir(msg); done++; messageCountWorkerContainer.innerHTML = done; - channel.removeEventListener('message', listener); + sub.unsubscribe(); res(); } - }; - channel.addEventListener('message', listener); + }); }); channel.postMessage({ from: 'main-worker', @@ -300,6 +312,8 @@ function run() { ); } + channel.removeEventListener('message', workerListener); + body.style.backgroundColor = 'green'; stateContainer.innerHTML = 'SUCCESS' const amountTime = new Date().getTime() - startTime; diff --git a/test/unit/node.method.test.js b/test/unit/node.method.test.js index 4cb7cc64..dd21283e 100644 --- a/test/unit/node.method.test.js +++ b/test/unit/node.method.test.js @@ -127,11 +127,11 @@ describe('unit/node.method.test.js', () => { await NodeMethod.ensureFoldersExist(channelName); const sockets = await Promise.all( new Array(2).fill(0) - .map(async () => { - const readerUuid = AsyncTestUtil.randomString(6); - const socket = await NodeMethod.createSocketEventEmitter(channelName, readerUuid); - return socket; - }) + .map(async () => { + const readerUuid = AsyncTestUtil.randomString(6); + const socket = await NodeMethod.createSocketEventEmitter(channelName, readerUuid); + return socket; + }) ); sockets.forEach(socket => socket.server.close()); }); @@ -143,12 +143,12 @@ describe('unit/node.method.test.js', () => { // ensure we have more then 30 channel-folders const sockets = await Promise.all( new Array(35).fill(0) - .map(async () => { - const uid = AsyncTestUtil.randomString(6); - const cN = AsyncTestUtil.randomString(12); - await NodeMethod.ensureFoldersExist(cN); - return NodeMethod.createSocketEventEmitter(cN, uid); - }) + .map(async () => { + const uid = AsyncTestUtil.randomString(6); + const cN = AsyncTestUtil.randomString(12); + await NodeMethod.ensureFoldersExist(cN); + return NodeMethod.createSocketEventEmitter(cN, uid); + }) ); await NodeMethod.ensureFoldersExist(channelName); @@ -199,7 +199,11 @@ describe('unit/node.method.test.js', () => { foo: 'bar' }; - const msgObj = await NodeMethod.writeMessage(channelName, readerUuid, messageJson); + const msgObj = await NodeMethod.writeMessage( + channelName, + readerUuid, + messageJson + ); const exists = require('fs').existsSync(msgObj.path); assert.ok(exists); @@ -216,12 +220,12 @@ describe('unit/node.method.test.js', () => { const sockets = await Promise.all( new Array(5).fill(0) - .map(() => AsyncTestUtil.randomString(6)) - .map(async (readerUuid) => { - await NodeMethod.createSocketInfoFile(channelName, readerUuid); - const s = await NodeMethod.createSocketEventEmitter(channelName, readerUuid); - return s; - }) + .map(() => AsyncTestUtil.randomString(6)) + .map(async (readerUuid) => { + await NodeMethod.createSocketInfoFile(channelName, readerUuid); + const s = await NodeMethod.createSocketEventEmitter(channelName, readerUuid); + return s; + }) ); const uuids = await NodeMethod.getReadersUuids(channelName); @@ -266,7 +270,6 @@ describe('unit/node.method.test.js', () => { const messages = await NodeMethod.getAllMessages(channelName); assert.equal(messages.length, 2); assert.ok(messages[0].path); - assert.ok(messages[0].time); assert.ok(messages[0].senderUuid); assert.ok(messages[0].token); }); @@ -299,7 +302,7 @@ describe('unit/node.method.test.js', () => { // write 5 messages await Promise.all( new Array(5).fill(0) - .map(() => NodeMethod.writeMessage(channelName, readerUuid, messageJson)) + .map(() => NodeMethod.writeMessage(channelName, readerUuid, messageJson)) ); // w8 until they time out @@ -437,7 +440,7 @@ describe('unit/node.method.test.js', () => { }); }); describe('other', () => { - it('should have cleaned up the messages', async function() { + it('should have cleaned up the messages', async function () { this.timeout(1000 * 20); // slow on windows const channelOptions = { node: { @@ -454,7 +457,7 @@ describe('unit/node.method.test.js', () => { // send 100 messages await Promise.all( new Array(100).fill(0) - .map(() => NodeMethod.postMessage(channelStateOwn, msgJson)) + .map(() => NodeMethod.postMessage(channelStateOwn, msgJson)) ); // w8 until ttl has reached @@ -463,7 +466,7 @@ describe('unit/node.method.test.js', () => { // send 100 messages again to trigger cleanup await Promise.all( new Array(100).fill(0) - .map(() => NodeMethod.postMessage(channelStateOwn, msgJson)) + .map(() => NodeMethod.postMessage(channelStateOwn, msgJson)) ); // ensure only the last 100 messages are here @@ -508,15 +511,15 @@ describe('unit/node.method.test.js', () => { const channelName = AsyncTestUtil.randomString(12); const readers = await Promise.all( new Array(50).fill(0) - .map(async () => { - const channelState = await NodeMethod.create(channelName); - const emitted = []; - NodeMethod.onMessage(channelState, msg => emitted.push(msg), new Date().getMilliseconds()); - return { - channelState, - emitted - }; - }) + .map(async () => { + const channelState = await NodeMethod.create(channelName); + const emitted = []; + NodeMethod.onMessage(channelState, msg => emitted.push(msg), new Date().getMilliseconds()); + return { + channelState, + emitted + }; + }) ); const senderState = await NodeMethod.create(channelName); @@ -524,9 +527,9 @@ describe('unit/node.method.test.js', () => { // send 100 messages await Promise.all( new Array(100).fill(0) - .map(() => NodeMethod.postMessage(senderState, { - foo: 'bar' - })) + .map(() => NodeMethod.postMessage(senderState, { + foo: 'bar' + })) ); await AsyncTestUtil.waitUntil(() => { @@ -553,8 +556,8 @@ describe('unit/node.method.test.js', () => { const otherStates = await Promise.all( new Array(10) - .fill(0) - .map(() => NodeMethod.create(channelName)) + .fill(0) + .map(() => NodeMethod.create(channelName)) ); NodeMethod.refreshReaderClients(channelStateOwn); From 5b0f7aa15e8f9c8032a36863332a7580f0d93f11 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Mon, 27 Nov 2023 23:46:27 +0100 Subject: [PATCH 56/82] 7.0.0 --- CHANGELOG.md | 4 ++ dist/es5node/broadcast-channel.js | 13 +----- dist/es5node/methods/native.js | 5 ++- dist/es5node/methods/node.js | 10 +++-- dist/es5node/methods/simulate.js | 27 +++++++------ dist/es5node/util.js | 16 +++----- dist/esbrowser/broadcast-channel.js | 13 +----- dist/esbrowser/methods/native.js | 5 ++- dist/esbrowser/methods/node.js | 10 +++-- dist/esbrowser/methods/simulate.js | 25 +++++++----- dist/esbrowser/util.js | 16 +++----- dist/esnode/broadcast-channel.js | 13 +----- dist/esnode/methods/native.js | 5 ++- dist/esnode/methods/node.js | 10 +++-- dist/esnode/methods/simulate.js | 25 +++++++----- dist/esnode/util.js | 16 +++----- dist/lib/broadcast-channel.js | 13 +----- dist/lib/browser.js | 61 ++++++++++++----------------- dist/lib/browser.min.js | 2 +- dist/lib/methods/native.js | 5 ++- dist/lib/methods/node.js | 10 +++-- dist/lib/methods/simulate.js | 27 +++++++------ dist/lib/util.js | 16 +++----- docs/e2e.js | 22 ++++++----- docs/iframe.js | 1 - docs/index.js | 1 - docs/leader-iframe.js | 1 - docs/worker.js | 1 - package.json | 2 +- 29 files changed, 171 insertions(+), 204 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6655f43..c3e054d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ ## X.X.X (comming soon) +## 7.0.0 (27 November 2023) + +- CHANGE do not emit messages that have been existed before the channel was created. + ## 6.0.0 (30 October 2023) - ADD support for the Deno runtime diff --git a/dist/es5node/broadcast-channel.js b/dist/es5node/broadcast-channel.js index 07f70413..8cfed316 100644 --- a/dist/es5node/broadcast-channel.js +++ b/dist/es5node/broadcast-channel.js @@ -237,18 +237,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); diff --git a/dist/es5node/methods/native.js b/dist/es5node/methods/native.js index 0ae3d2c1..9f6d0dff 100644 --- a/dist/es5node/methods/native.js +++ b/dist/es5node/methods/native.js @@ -17,14 +17,15 @@ var microSeconds = exports.microSeconds = _util.microSeconds; var type = exports.type = 'native'; function create(channelName) { var state = { + time: (0, _util.microSeconds)(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = function (msg) { + state.bc.onmessage = function (msgEvent) { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; return state; diff --git a/dist/es5node/methods/node.js b/dist/es5node/methods/node.js index e67c3425..97cad7b7 100644 --- a/dist/es5node/methods/node.js +++ b/dist/es5node/methods/node.js @@ -440,11 +440,13 @@ function _openClientConnection() { return _openClientConnection.apply(this, arguments); } function writeMessage(channelName, readerUuid, messageJson, paths) { + var time = messageJson.time; + if (!time) { + time = microSeconds(); + } paths = paths || getPaths(channelName); - var time = microSeconds(); var writeObject = { uuid: readerUuid, - time: time, data: messageJson }; var token = (0, _util2.randomToken)(); @@ -687,8 +689,8 @@ function _filterMessage(msgObj, state) { if (msgObj.senderUuid === state.uuid) return false; // not send by own if (state.emittedMessagesIds.has(msgObj.token)) return false; // not already emitted if (!state.messagesCallback) return false; // no listener - if (msgObj.time < state.messagesCallbackTime) return false; // not older then onMessageCallback - if (msgObj.time < state.time) return false; // msgObj is older then channel + if (msgObj.time < state.messagesCallbackTime) return false; // not older than onMessageCallback + if (msgObj.time < state.time) return false; // msgObj is older than channel state.emittedMessagesIds.add(msgObj.token); return true; diff --git a/dist/es5node/methods/simulate.js b/dist/es5node/methods/simulate.js index 99077bad..f9d7afd3 100644 --- a/dist/es5node/methods/simulate.js +++ b/dist/es5node/methods/simulate.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.SimulateMethod = void 0; +exports.SimulateMethod = exports.SIMULATE_DELAY_TIME = void 0; exports.averageResponseTime = averageResponseTime; exports.canBeUsed = canBeUsed; exports.close = close; @@ -18,6 +18,7 @@ var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { + time: microSeconds(), name: channelName, messagesCallback: null }; @@ -27,21 +28,25 @@ function create(channelName) { function close(channelState) { SIMULATE_CHANNELS["delete"](channelState); } +var SIMULATE_DELAY_TIME = exports.SIMULATE_DELAY_TIME = 5; function postMessage(channelState, messageJson) { return new Promise(function (res) { return setTimeout(function () { var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function (channel) { - return channel.name === channelState.name; - }).filter(function (channel) { - return channel !== channelState; - }).filter(function (channel) { - return !!channel.messagesCallback; - }).forEach(function (channel) { - return channel.messagesCallback(messageJson); + channelArray.forEach(function (channel) { + if (channel.name === channelState.name && + // has same name + channel !== channelState && + // not own channel + !!channel.messagesCallback && + // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } }); res(); - }, 5); + }, SIMULATE_DELAY_TIME); }); } function onMessage(channelState, fn) { @@ -51,7 +56,7 @@ function canBeUsed() { return true; } function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } var SimulateMethod = exports.SimulateMethod = { create: create, diff --git a/dist/es5node/util.js b/dist/es5node/util.js index 7a81b411..2c50eb73 100644 --- a/dist/es5node/util.js +++ b/dist/es5node/util.js @@ -38,25 +38,21 @@ function randomToken() { return Math.random().toString(36).substring(2); } var lastMs = 0; -var additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ function microSeconds() { - var ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + var ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** diff --git a/dist/esbrowser/broadcast-channel.js b/dist/esbrowser/broadcast-channel.js index c2d44376..a9150fb4 100644 --- a/dist/esbrowser/broadcast-channel.js +++ b/dist/esbrowser/broadcast-channel.js @@ -230,18 +230,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); diff --git a/dist/esbrowser/methods/native.js b/dist/esbrowser/methods/native.js index 6c1bbf88..9e38e952 100644 --- a/dist/esbrowser/methods/native.js +++ b/dist/esbrowser/methods/native.js @@ -3,14 +3,15 @@ export var microSeconds = micro; export var type = 'native'; export function create(channelName) { var state = { + time: micro(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = function (msg) { + state.bc.onmessage = function (msgEvent) { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; return state; diff --git a/dist/esbrowser/methods/node.js b/dist/esbrowser/methods/node.js index 31bd7da1..6fb420be 100644 --- a/dist/esbrowser/methods/node.js +++ b/dist/esbrowser/methods/node.js @@ -407,11 +407,13 @@ function _openClientConnection() { return _openClientConnection.apply(this, arguments); } export function writeMessage(channelName, readerUuid, messageJson, paths) { + var time = messageJson.time; + if (!time) { + time = microSeconds(); + } paths = paths || getPaths(channelName); - var time = microSeconds(); var writeObject = { uuid: readerUuid, - time: time, data: messageJson }; var token = randomToken(); @@ -654,8 +656,8 @@ export function _filterMessage(msgObj, state) { if (msgObj.senderUuid === state.uuid) return false; // not send by own if (state.emittedMessagesIds.has(msgObj.token)) return false; // not already emitted if (!state.messagesCallback) return false; // no listener - if (msgObj.time < state.messagesCallbackTime) return false; // not older then onMessageCallback - if (msgObj.time < state.time) return false; // msgObj is older then channel + if (msgObj.time < state.messagesCallbackTime) return false; // not older than onMessageCallback + if (msgObj.time < state.time) return false; // msgObj is older than channel state.emittedMessagesIds.add(msgObj.token); return true; diff --git a/dist/esbrowser/methods/simulate.js b/dist/esbrowser/methods/simulate.js index b9debb13..9d624539 100644 --- a/dist/esbrowser/methods/simulate.js +++ b/dist/esbrowser/methods/simulate.js @@ -4,6 +4,7 @@ export var type = 'simulate'; var SIMULATE_CHANNELS = new Set(); export function create(channelName) { var state = { + time: microSeconds(), name: channelName, messagesCallback: null }; @@ -13,21 +14,25 @@ export function create(channelName) { export function close(channelState) { SIMULATE_CHANNELS["delete"](channelState); } +export var SIMULATE_DELAY_TIME = 5; export function postMessage(channelState, messageJson) { return new Promise(function (res) { return setTimeout(function () { var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function (channel) { - return channel.name === channelState.name; - }).filter(function (channel) { - return channel !== channelState; - }).filter(function (channel) { - return !!channel.messagesCallback; - }).forEach(function (channel) { - return channel.messagesCallback(messageJson); + channelArray.forEach(function (channel) { + if (channel.name === channelState.name && + // has same name + channel !== channelState && + // not own channel + !!channel.messagesCallback && + // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } }); res(); - }, 5); + }, SIMULATE_DELAY_TIME); }); } export function onMessage(channelState, fn) { @@ -37,7 +42,7 @@ export function canBeUsed() { return true; } export function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } export var SimulateMethod = { create: create, diff --git a/dist/esbrowser/util.js b/dist/esbrowser/util.js index 697cd8fc..e8160cbf 100644 --- a/dist/esbrowser/util.js +++ b/dist/esbrowser/util.js @@ -26,25 +26,21 @@ export function randomToken() { return Math.random().toString(36).substring(2); } var lastMs = 0; -var additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ export function microSeconds() { - var ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + var ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** diff --git a/dist/esnode/broadcast-channel.js b/dist/esnode/broadcast-channel.js index c2d44376..a9150fb4 100644 --- a/dist/esnode/broadcast-channel.js +++ b/dist/esnode/broadcast-channel.js @@ -230,18 +230,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); diff --git a/dist/esnode/methods/native.js b/dist/esnode/methods/native.js index 6c1bbf88..9e38e952 100644 --- a/dist/esnode/methods/native.js +++ b/dist/esnode/methods/native.js @@ -3,14 +3,15 @@ export var microSeconds = micro; export var type = 'native'; export function create(channelName) { var state = { + time: micro(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = function (msg) { + state.bc.onmessage = function (msgEvent) { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; return state; diff --git a/dist/esnode/methods/node.js b/dist/esnode/methods/node.js index 31bd7da1..6fb420be 100644 --- a/dist/esnode/methods/node.js +++ b/dist/esnode/methods/node.js @@ -407,11 +407,13 @@ function _openClientConnection() { return _openClientConnection.apply(this, arguments); } export function writeMessage(channelName, readerUuid, messageJson, paths) { + var time = messageJson.time; + if (!time) { + time = microSeconds(); + } paths = paths || getPaths(channelName); - var time = microSeconds(); var writeObject = { uuid: readerUuid, - time: time, data: messageJson }; var token = randomToken(); @@ -654,8 +656,8 @@ export function _filterMessage(msgObj, state) { if (msgObj.senderUuid === state.uuid) return false; // not send by own if (state.emittedMessagesIds.has(msgObj.token)) return false; // not already emitted if (!state.messagesCallback) return false; // no listener - if (msgObj.time < state.messagesCallbackTime) return false; // not older then onMessageCallback - if (msgObj.time < state.time) return false; // msgObj is older then channel + if (msgObj.time < state.messagesCallbackTime) return false; // not older than onMessageCallback + if (msgObj.time < state.time) return false; // msgObj is older than channel state.emittedMessagesIds.add(msgObj.token); return true; diff --git a/dist/esnode/methods/simulate.js b/dist/esnode/methods/simulate.js index b9debb13..9d624539 100644 --- a/dist/esnode/methods/simulate.js +++ b/dist/esnode/methods/simulate.js @@ -4,6 +4,7 @@ export var type = 'simulate'; var SIMULATE_CHANNELS = new Set(); export function create(channelName) { var state = { + time: microSeconds(), name: channelName, messagesCallback: null }; @@ -13,21 +14,25 @@ export function create(channelName) { export function close(channelState) { SIMULATE_CHANNELS["delete"](channelState); } +export var SIMULATE_DELAY_TIME = 5; export function postMessage(channelState, messageJson) { return new Promise(function (res) { return setTimeout(function () { var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function (channel) { - return channel.name === channelState.name; - }).filter(function (channel) { - return channel !== channelState; - }).filter(function (channel) { - return !!channel.messagesCallback; - }).forEach(function (channel) { - return channel.messagesCallback(messageJson); + channelArray.forEach(function (channel) { + if (channel.name === channelState.name && + // has same name + channel !== channelState && + // not own channel + !!channel.messagesCallback && + // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } }); res(); - }, 5); + }, SIMULATE_DELAY_TIME); }); } export function onMessage(channelState, fn) { @@ -37,7 +42,7 @@ export function canBeUsed() { return true; } export function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } export var SimulateMethod = { create: create, diff --git a/dist/esnode/util.js b/dist/esnode/util.js index 697cd8fc..e8160cbf 100644 --- a/dist/esnode/util.js +++ b/dist/esnode/util.js @@ -26,25 +26,21 @@ export function randomToken() { return Math.random().toString(36).substring(2); } var lastMs = 0; -var additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ export function microSeconds() { - var ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + var ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** diff --git a/dist/lib/broadcast-channel.js b/dist/lib/broadcast-channel.js index 07f70413..8cfed316 100644 --- a/dist/lib/broadcast-channel.js +++ b/dist/lib/broadcast-channel.js @@ -237,18 +237,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); diff --git a/dist/lib/browser.js b/dist/lib/browser.js index 13b5d399..5d4b78d5 100644 --- a/dist/lib/browser.js +++ b/dist/lib/browser.js @@ -238,18 +238,7 @@ function _startListening(channel) { var listenerFn = function listenerFn(msgObj) { channel._addEL[msgObj.type].forEach(function (listenerObject) { - /** - * Getting the current time in JavaScript has no good precision. - * So instead of only listening to events that happened 'after' the listener - * was added, we also listen to events that happened 100ms before it. - * This ensures that when another process, like a WebWorker, sends events - * we do not miss them out because their timestamp is a bit off compared to the main process. - * Not doing this would make messages missing when we send data directly after subscribing and awaiting a response. - * @link https://johnresig.com/blog/accuracy-of-javascript-time/ - */ - var hundredMsInMicro = 100 * 1000; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { + if (msgObj.time >= listenerObject.time) { listenerObject.fn(msgObj.data); } }); @@ -1400,14 +1389,15 @@ var microSeconds = exports.microSeconds = _util.microSeconds; var type = exports.type = 'native'; function create(channelName) { var state = { + time: (0, _util.microSeconds)(), messagesCallback: null, bc: new BroadcastChannel(channelName), subFns: [] // subscriberFunctions }; - state.bc.onmessage = function (msg) { + state.bc.onmessage = function (msgEvent) { if (state.messagesCallback) { - state.messagesCallback(msg.data); + state.messagesCallback(msgEvent.data); } }; return state; @@ -1463,7 +1453,7 @@ var NativeMethod = exports.NativeMethod = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.SimulateMethod = void 0; +exports.SimulateMethod = exports.SIMULATE_DELAY_TIME = void 0; exports.averageResponseTime = averageResponseTime; exports.canBeUsed = canBeUsed; exports.close = close; @@ -1478,6 +1468,7 @@ var type = exports.type = 'simulate'; var SIMULATE_CHANNELS = new Set(); function create(channelName) { var state = { + time: microSeconds(), name: channelName, messagesCallback: null }; @@ -1487,21 +1478,25 @@ function create(channelName) { function close(channelState) { SIMULATE_CHANNELS["delete"](channelState); } +var SIMULATE_DELAY_TIME = exports.SIMULATE_DELAY_TIME = 5; function postMessage(channelState, messageJson) { return new Promise(function (res) { return setTimeout(function () { var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function (channel) { - return channel.name === channelState.name; - }).filter(function (channel) { - return channel !== channelState; - }).filter(function (channel) { - return !!channel.messagesCallback; - }).forEach(function (channel) { - return channel.messagesCallback(messageJson); + channelArray.forEach(function (channel) { + if (channel.name === channelState.name && + // has same name + channel !== channelState && + // not own channel + !!channel.messagesCallback && + // has subscribers + channel.time < messageJson.time // channel not created after postMessage() call + ) { + channel.messagesCallback(messageJson); + } }); res(); - }, 5); + }, SIMULATE_DELAY_TIME); }); } function onMessage(channelState, fn) { @@ -1511,7 +1506,7 @@ function canBeUsed() { return true; } function averageResponseTime() { - return 5; + return SIMULATE_DELAY_TIME; } var SimulateMethod = exports.SimulateMethod = { create: create, @@ -1604,25 +1599,21 @@ function randomToken() { return Math.random().toString(36).substring(2); } var lastMs = 0; -var additional = 0; /** - * returns the current time in micro-seconds, + * Returns the current unix time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ function microSeconds() { - var ms = Date.now(); - if (ms === lastMs) { - additional++; - return ms * 1000 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1000; + var ret = Date.now() * 1000; // milliseconds to microseconds + if (ret <= lastMs) { + ret = lastMs + 1; } + lastMs = ret; + return ret; } /** diff --git a/dist/lib/browser.min.js b/dist/lib/browser.min.js index 7e09252a..530a9ca4 100644 --- a/dist/lib/browser.min.js +++ b/dist/lib/browser.min.js @@ -1 +1 @@ -!function o(r,i,s){function a(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return a(r[t][1][e]||e)},n,n.exports,o,r,i,s)}return i[t].exports}for(var u="function"==typeof require&&require,e=0;e=t&&e.fn(n.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function f(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!l(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}e._pubkey=!0,e.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return c(this,"message",e)},postInternal:function(e){return c(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};f(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,d(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();d(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});f(this,e,n)},close:function(){var e,t=this;if(!this.closed)return a.delete(this),this.closed=!0,e=this._prepP||r.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:20}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;var o=e("./util.js"),r=e("./leader-election-util.js");(n.LeaderElectionWebLock=function(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,o.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,u.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,u.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,u.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,u.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=L,n.cleanOldMessages=v,n.close=g,n.commitIndexedDBTransaction=d,n.create=_,n.createDatabase=u,n.getAllMessages=function(e){var n=e.transaction(c,"readonly",l),o=n.objectStore(c),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=y,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=n.microSeconds=r.microSeconds,o="pubkey.broadcast-channel-0-",c="messages",l=n.TRANSACTION_SETTINGS={durability:"relaxed"};n.type="idb";function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function u(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(c,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:Date.now(),data:n},r=e.transaction([c],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(c).add(o),d(r)})}function h(e,o){var r,i=e.transaction(c,"readonly",l),s=i.objectStore(c),a=[],u=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(u),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return u=IDBKeyRange.bound(o+1,1/0),s.openCursor(u)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time{this._to=!1,o(this)},0))}clear(){this.map.clear()}},n.removeTooOldValues=o,n.now=i},{}],18:[function(e,t,n){var o,r,t=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}try{o="function"==typeof setTimeout?setTimeout:i}catch(e){o=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}function a(t){if(o===setTimeout)return setTimeout(t,0);if((o===i||!o)&&setTimeout)return(o=setTimeout)(t,0);try{return o(t,0)}catch(e){try{return o.call(null,t,0)}catch(e){return o.call(this,t,0)}}}var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length)&&h()}function h(){if(!l){for(var e=a(f),t=(l=!0,c.length);t;){for(u=c,c=[];++d=e.time&&e.fn(t.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function f(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!l(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}e._pubkey=!0,e.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return u(this,"message",e)},postInternal:function(e){return u(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};f(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,d(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();d(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});f(this,e,n)},close:function(){var e,t=this;if(!this.closed)return a.delete(this),this.closed=!0,e=this._prepP||r.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:20}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;var o=e("./util.js"),r=e("./leader-election-util.js");(n.LeaderElectionWebLock=function(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,o.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,c.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,c.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,c.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,c.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=y,n.cleanOldMessages=_,n.close=g,n.commitIndexedDBTransaction=d,n.create=v,n.createDatabase=c,n.getAllMessages=function(e){var n=e.transaction(u,"readonly",l),o=n.objectStore(u),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=L,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=n.microSeconds=r.microSeconds,o="pubkey.broadcast-channel-0-",u="messages",l=n.TRANSACTION_SETTINGS={durability:"relaxed"};n.type="idb";function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function c(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(u,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:Date.now(),data:n},r=e.transaction([u],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(u).add(o),d(r)})}function h(e,o){var r,i=e.transaction(u,"readonly",l),s=i.objectStore(u),a=[],c=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(c),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return c=IDBKeyRange.bound(o+1,1/0),s.openCursor(c)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time{this._to=!1,o(this)},0))}clear(){this.map.clear()}},n.removeTooOldValues=o,n.now=i},{}],18:[function(e,t,n){var o,r,t=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}try{o="function"==typeof setTimeout?setTimeout:i}catch(e){o=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}function a(t){if(o===setTimeout)return setTimeout(t,0);if((o===i||!o)&&setTimeout)return(o=setTimeout)(t,0);try{return o(t,0)}catch(e){try{return o.call(null,t,0)}catch(e){return o.call(this,t,0)}}}var c,u=[],l=!1,d=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length)&&h()}function h(){if(!l){for(var e=a(f),t=(l=!0,u.length);t;){for(c=u,u=[];++d 0)) { - _context5.next = 23; + _context5.next = 25; break; } t--; - _context5.next = 21; + _context5.next = 23; return Promise.all(new Array(perRun).fill(0).map( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() { var msgId, waitForResponsePromise; return _regenerator["default"].wrap(function _callee4$(_context4) { @@ -24154,16 +24158,16 @@ function run() { } }, _callee4); })))); - case 21: - _context5.next = 17; - break; case 23: + _context5.next = 19; + break; + case 25: channel.removeEventListener('message', workerListener); body.style.backgroundColor = 'green'; stateContainer.innerHTML = 'SUCCESS'; amountTime = new Date().getTime() - startTime; document.getElementById('time-amount').innerHTML = amountTime + 'ms'; - case 28: + case 30: case "end": return _context5.stop(); } diff --git a/docs/iframe.js b/docs/iframe.js index 646f205c..d1cd6255 100644 --- a/docs/iframe.js +++ b/docs/iframe.js @@ -1464,7 +1464,6 @@ function create(channelName) { name: channelName, messagesCallback: null }; - console.log('created channel ' + state.counter); SIMULATE_CHANNELS.add(state); return state; } diff --git a/docs/index.js b/docs/index.js index 01d38746..b5ea0d9c 100644 --- a/docs/index.js +++ b/docs/index.js @@ -1464,7 +1464,6 @@ function create(channelName) { name: channelName, messagesCallback: null }; - console.log('created channel ' + state.counter); SIMULATE_CHANNELS.add(state); return state; } diff --git a/docs/leader-iframe.js b/docs/leader-iframe.js index a12c6ced..9e27c65b 100644 --- a/docs/leader-iframe.js +++ b/docs/leader-iframe.js @@ -1464,7 +1464,6 @@ function create(channelName) { name: channelName, messagesCallback: null }; - console.log('created channel ' + state.counter); SIMULATE_CHANNELS.add(state); return state; } diff --git a/docs/worker.js b/docs/worker.js index 7524d2e9..8266a54a 100644 --- a/docs/worker.js +++ b/docs/worker.js @@ -1464,7 +1464,6 @@ function create(channelName) { name: channelName, messagesCallback: null }; - console.log('created channel ' + state.counter); SIMULATE_CHANNELS.add(state); return state; } diff --git a/package.json b/package.json index 6c92bdef..3d56d2c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "broadcast-channel", - "version": "6.0.0", + "version": "7.0.0", "description": "A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers, NodeJs, Deno and iframes", "exports": { ".": { From 811608603be47ca807f1b5f0a6be5517c995184c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 10 Dec 2023 08:42:23 +0000 Subject: [PATCH 57/82] chore(deps): update dependency ts-node to v10.9.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d56d2c3..1a0e102a 100644 --- a/package.json +++ b/package.json @@ -150,7 +150,7 @@ "rimraf": "5.0.5", "rollup": "4.6.0", "testcafe": "3.4.0", - "ts-node": "10.9.1", + "ts-node": "10.9.2", "typescript": "5.3.2", "uglify-js": "3.17.4", "watchify": "4.0.0", From e0c02ac2c55ddbde403125c9a2ec25c45f9fde7c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 10 Dec 2023 11:02:33 +0000 Subject: [PATCH 58/82] chore(deps): update babel monorepo to v7.23.5 --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 1a0e102a..6f76904c 100644 --- a/package.json +++ b/package.json @@ -99,21 +99,21 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.23.4", + "@babel/runtime": "7.23.5", "oblivious-set": "1.4.0", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { "@babel/cli": "7.23.4", - "@babel/core": "7.23.3", + "@babel/core": "7.23.5", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.23.3", "@babel/plugin-transform-property-literals": "7.23.3", "@babel/plugin-transform-runtime": "7.23.4", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.23.3", - "@babel/types": "7.23.4", + "@babel/preset-env": "7.23.5", + "@babel/types": "7.23.5", "@rollup/plugin-terser": "0.4.4", "@types/core-js": "2.5.8", "assert": "2.1.0", From 0e53b70dd80f181a621db75511ca67c005905f12 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 29 Dec 2023 22:59:53 +0000 Subject: [PATCH 59/82] chore(deps): update babel monorepo --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6f76904c..c66fe4a2 100644 --- a/package.json +++ b/package.json @@ -99,21 +99,21 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.23.5", + "@babel/runtime": "7.23.7", "oblivious-set": "1.4.0", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { "@babel/cli": "7.23.4", - "@babel/core": "7.23.5", + "@babel/core": "7.23.7", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.23.3", "@babel/plugin-transform-property-literals": "7.23.3", - "@babel/plugin-transform-runtime": "7.23.4", + "@babel/plugin-transform-runtime": "7.23.7", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.23.5", - "@babel/types": "7.23.5", + "@babel/preset-env": "7.23.7", + "@babel/types": "7.23.6", "@rollup/plugin-terser": "0.4.4", "@types/core-js": "2.5.8", "assert": "2.1.0", From 97c37f62cba61800c017b952da70769288c708a5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 30 Dec 2023 00:16:07 +0000 Subject: [PATCH 60/82] chore(deps): update dependency eslint to v8.56.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c66fe4a2..1edf8509 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "copyfiles": "2.4.1", "cross-env": "7.0.3", "detect-node": "2.1.0", - "eslint": "8.54.0", + "eslint": "8.56.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.7.0", From c45f7bc54996828e436ef870f2789899ab2ab2cf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 22:24:37 +0000 Subject: [PATCH 61/82] chore(deps): update babel monorepo to v7.23.8 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1edf8509..41b56774 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.23.7", + "@babel/runtime": "7.23.8", "oblivious-set": "1.4.0", "p-queue": "6.6.2", "unload": "2.4.1" @@ -112,7 +112,7 @@ "@babel/plugin-transform-property-literals": "7.23.3", "@babel/plugin-transform-runtime": "7.23.7", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.23.7", + "@babel/preset-env": "7.23.8", "@babel/types": "7.23.6", "@rollup/plugin-terser": "0.4.4", "@types/core-js": "2.5.8", From 45f0716bfe30ea2954b3e98ccb8fdbed37713bf9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 00:11:02 +0000 Subject: [PATCH 62/82] chore(deps): update dependency typescript to v5.3.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 41b56774..cdca1344 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "rollup": "4.6.0", "testcafe": "3.4.0", "ts-node": "10.9.2", - "typescript": "5.3.2", + "typescript": "5.3.3", "uglify-js": "3.17.4", "watchify": "4.0.0", "webpack": "5.89.0", From 8daab5b13319ecdaedd1772b3cc81803be0fe688 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 12:23:32 +0000 Subject: [PATCH 63/82] chore(deps): update babel monorepo --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index cdca1344..b243a47e 100644 --- a/package.json +++ b/package.json @@ -99,21 +99,21 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.23.8", + "@babel/runtime": "7.24.0", "oblivious-set": "1.4.0", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { - "@babel/cli": "7.23.4", - "@babel/core": "7.23.7", + "@babel/cli": "7.23.9", + "@babel/core": "7.24.0", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.23.3", "@babel/plugin-transform-property-literals": "7.23.3", - "@babel/plugin-transform-runtime": "7.23.7", + "@babel/plugin-transform-runtime": "7.24.0", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.23.8", - "@babel/types": "7.23.6", + "@babel/preset-env": "7.24.0", + "@babel/types": "7.24.0", "@rollup/plugin-terser": "0.4.4", "@types/core-js": "2.5.8", "assert": "2.1.0", From 387c7ff27c0e67e00fedd158f471a00a158edb35 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 16:08:25 +0000 Subject: [PATCH 64/82] chore(deps): update actions/setup-node action to v4.0.2 --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e191f58b..28388bea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v4.0.2 with: node-version-file: ".nvmrc" @@ -102,7 +102,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v4.0.2 with: node-version: ${{ matrix.node }} @@ -138,7 +138,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v4.0.2 with: node-version-file: ".nvmrc" From bfceb760edd9fc7c1766887be63eecd02a8f25d3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 20:27:27 +0000 Subject: [PATCH 65/82] chore(deps): update dependency webpack to v5.91.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b243a47e..71373623 100644 --- a/package.json +++ b/package.json @@ -154,7 +154,7 @@ "typescript": "5.3.3", "uglify-js": "3.17.4", "watchify": "4.0.0", - "webpack": "5.89.0", + "webpack": "5.91.0", "webpack-cli": "5.1.4" } } From 2dbcd80b1d50dc73c8e9f174c5d50f4c026d0c03 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 22:19:27 +0000 Subject: [PATCH 66/82] chore(deps): update dependency karma-firefox-launcher to v2.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 71373623..3a30b2d1 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "karma-detect-browsers": "2.3.3", "karma-edge-launcher": "0.4.2", "karma-env-preprocessor": "0.1.1", - "karma-firefox-launcher": "2.1.2", + "karma-firefox-launcher": "2.1.3", "karma-ie-launcher": "1.0.0", "karma-mocha": "2.0.1", "karma-opera-launcher": "1.0.0", From b59667a35d7ca5b159de7a8519ea8210b7fd31f9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:06:18 +0000 Subject: [PATCH 67/82] chore(deps): update dependency node to v20.12.1 --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index d5a15960..bc78e9f2 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.10.0 +20.12.1 From b17d1434273064dcdb9a8e7500b11a8a5db75027 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 20:06:12 +0000 Subject: [PATCH 68/82] chore(deps): update babel monorepo --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 3a30b2d1..5627e5dd 100644 --- a/package.json +++ b/package.json @@ -99,20 +99,20 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.24.0", + "@babel/runtime": "7.24.4", "oblivious-set": "1.4.0", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { - "@babel/cli": "7.23.9", - "@babel/core": "7.24.0", + "@babel/cli": "7.24.1", + "@babel/core": "7.24.4", "@babel/plugin-proposal-object-rest-spread": "7.20.7", - "@babel/plugin-transform-member-expression-literals": "7.23.3", - "@babel/plugin-transform-property-literals": "7.23.3", - "@babel/plugin-transform-runtime": "7.24.0", + "@babel/plugin-transform-member-expression-literals": "7.24.1", + "@babel/plugin-transform-property-literals": "7.24.1", + "@babel/plugin-transform-runtime": "7.24.3", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.24.0", + "@babel/preset-env": "7.24.4", "@babel/types": "7.24.0", "@rollup/plugin-terser": "0.4.4", "@types/core-js": "2.5.8", From 8fe496f3f1af5cd0c54f2da693ac2008189c31bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:07:18 +0000 Subject: [PATCH 69/82] chore(deps): update dependency typescript to v5.4.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5627e5dd..f7b80bca 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "rollup": "4.6.0", "testcafe": "3.4.0", "ts-node": "10.9.2", - "typescript": "5.3.3", + "typescript": "5.4.5", "uglify-js": "3.17.4", "watchify": "4.0.0", "webpack": "5.91.0", From bb90f7a1f096866c33368450cad9e94a8d0d9ac9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 19:49:06 +0000 Subject: [PATCH 70/82] chore(deps): update dependency karma to v6.4.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f7b80bca..a1655ed7 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.7.0", - "karma": "6.4.2", + "karma": "6.4.3", "karma-babel-preprocessor": "8.0.2", "karma-browserify": "8.1.0", "karma-chrome-launcher": "3.2.0", From 181648d4badb3946bf9a013aa70c3860b2435caa Mon Sep 17 00:00:00 2001 From: Daniel Meyer <8926560+pubkey@users.noreply.github.com> Date: Tue, 14 May 2024 01:00:33 +0200 Subject: [PATCH 71/82] Update FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 2b2ef534..615a269b 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ # These are supported funding model platforms github: pubkey +custom: ["https://rxdb.info/premium", "https://rxdb.info/consulting"] From 0b1267b53b049f41ce56256da984519fa89dd1b0 Mon Sep 17 00:00:00 2001 From: Daniel Meyer <8926560+pubkey@users.noreply.github.com> Date: Tue, 14 May 2024 01:00:42 +0200 Subject: [PATCH 72/82] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 615a269b..d95a144c 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,4 +1,4 @@ # These are supported funding model platforms github: pubkey -custom: ["https://rxdb.info/premium", "https://rxdb.info/consulting"] +custom: ["https://rxdb.info/consulting"] From 6aea9bf2a6cdb38583f376dab7ceb9abb5442a47 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 18 Aug 2024 07:20:13 +0000 Subject: [PATCH 73/82] chore(deps): update dependency rollup to v4.21.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a1655ed7..1a2e68fc 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.5", - "rollup": "4.6.0", + "rollup": "4.21.0", "testcafe": "3.4.0", "ts-node": "10.9.2", "typescript": "5.4.5", From fe24982c4ab31fa4bfd7c5db010de1787cc3ab0b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 18 Aug 2024 09:52:56 +0000 Subject: [PATCH 74/82] chore(deps): update actions/setup-node action to v4.0.3 --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 28388bea..d7c61d1b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v4.0.2 + uses: actions/setup-node@v4.0.3 with: node-version-file: ".nvmrc" @@ -102,7 +102,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v4.0.2 + uses: actions/setup-node@v4.0.3 with: node-version: ${{ matrix.node }} @@ -138,7 +138,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v4.0.2 + uses: actions/setup-node@v4.0.3 with: node-version-file: ".nvmrc" From 3dc2d3294704e7947e9dde9e2c840222be54be0c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:00:28 +0000 Subject: [PATCH 75/82] chore(deps): update dependency eslint to v8.57.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1a2e68fc..6e015e2b 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "copyfiles": "2.4.1", "cross-env": "7.0.3", "detect-node": "2.1.0", - "eslint": "8.56.0", + "eslint": "8.57.1", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.7.0", From bbef01020eff5329f8fd792c76c9371db1e4090f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 19:35:03 +0000 Subject: [PATCH 76/82] chore(deps): update dependency karma to v6.4.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e015e2b..71d65d15 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "jest": "29.7.0", - "karma": "6.4.3", + "karma": "6.4.4", "karma-babel-preprocessor": "8.0.2", "karma-browserify": "8.1.0", "karma-chrome-launcher": "3.2.0", From 36dee5d6abe15287cbdc4a308091c8497751a751 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:00:36 +0000 Subject: [PATCH 77/82] chore(deps): update node.js to v20.18.1 (#1315) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index bc78e9f2..d4b7699d 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.12.1 +20.18.1 From e32834ef38bff5673cd393819b99f10eb9a23d40 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:26:38 +0000 Subject: [PATCH 78/82] chore(deps): update dependency browserify to v17.0.1 (#1325) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 71d65d15..ec37e3cd 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "@types/core-js": "2.5.8", "assert": "2.1.0", "async-test-util": "2.2.1", - "browserify": "17.0.0", + "browserify": "17.0.1", "child-process-promise": "2.2.1", "clone": "2.1.2", "concurrently": "8.2.2", From 70a64f5960f71bbe91ffcaf5f13820d36faf8278 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:23:15 +0000 Subject: [PATCH 79/82] chore(deps): update babel monorepo (#1316) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index ec37e3cd..7def264d 100644 --- a/package.json +++ b/package.json @@ -99,21 +99,21 @@ "lint" ], "dependencies": { - "@babel/runtime": "7.24.4", + "@babel/runtime": "7.26.0", "oblivious-set": "1.4.0", "p-queue": "6.6.2", "unload": "2.4.1" }, "devDependencies": { - "@babel/cli": "7.24.1", - "@babel/core": "7.24.4", + "@babel/cli": "7.25.9", + "@babel/core": "7.26.0", "@babel/plugin-proposal-object-rest-spread": "7.20.7", - "@babel/plugin-transform-member-expression-literals": "7.24.1", - "@babel/plugin-transform-property-literals": "7.24.1", - "@babel/plugin-transform-runtime": "7.24.3", + "@babel/plugin-transform-member-expression-literals": "7.25.9", + "@babel/plugin-transform-property-literals": "7.25.9", + "@babel/plugin-transform-runtime": "7.25.9", "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.24.4", - "@babel/types": "7.24.0", + "@babel/preset-env": "7.26.0", + "@babel/types": "7.26.3", "@rollup/plugin-terser": "0.4.4", "@types/core-js": "2.5.8", "assert": "2.1.0", From c3d62a990636f9ae77e7579bc54473654b4c1086 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 20:45:41 +0000 Subject: [PATCH 80/82] chore(deps): update dependency rimraf to v5.0.10 (#1323) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7def264d..941d520a 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "pre-commit": "1.2.2", "random-int": "3.0.0", "random-token": "0.0.8", - "rimraf": "5.0.5", + "rimraf": "5.0.10", "rollup": "4.21.0", "testcafe": "3.4.0", "ts-node": "10.9.2", From 6b11420cc03f2a71c69a7891a40fea9a183f4efa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:48:53 +0000 Subject: [PATCH 81/82] chore(deps): update dependency rollup to v4.29.0 (#1324) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 941d520a..c8930615 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "random-int": "3.0.0", "random-token": "0.0.8", "rimraf": "5.0.10", - "rollup": "4.21.0", + "rollup": "4.29.0", "testcafe": "3.4.0", "ts-node": "10.9.2", "typescript": "5.4.5", From 94e60a3968bfb316a327d4bc12e1af08809365aa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 21 Dec 2024 01:19:39 +0000 Subject: [PATCH 82/82] chore(deps): update dependency @babel/cli to v7.26.4 (#1329) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c8930615..bdb9f818 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "unload": "2.4.1" }, "devDependencies": { - "@babel/cli": "7.25.9", + "@babel/cli": "7.26.4", "@babel/core": "7.26.0", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.25.9",