From a834f0efa32229995fb6f6c7c181a5c62557a065 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Wed, 30 Apr 2025 14:12:04 -0700 Subject: [PATCH 01/20] temp --- products/distill/README.md | 32 +- products/userale/.babelrc | 22 - products/userale/babel.config.js | 22 - .../build/UserALEWebExtension/background.d.ts | 20 - .../build/UserALEWebExtension/background.js | 1560 -- .../UserALEWebExtension/browserAction.html | 89 - .../build/UserALEWebExtension/content.d.ts | 20 - .../build/UserALEWebExtension/content.js | 1302 -- .../build/UserALEWebExtension/globals.d.ts | 24 - .../build/UserALEWebExtension/manifest.json | 26 - .../UserALEWebExtension/messageTypes.d.ts | 25 - .../build/UserALEWebExtension/options.d.ts | 20 - .../build/UserALEWebExtension/options.html | 57 - .../build/UserALEWebExtension/options.js | 1350 -- products/userale/build/attachHandlers.d.ts | 99 - products/userale/build/configure.d.ts | 64 - .../userale/build/getInitialSettings.d.ts | 39 - products/userale/build/main.d.ts | 48 - products/userale/build/packageLogs.d.ts | 128 - products/userale/build/sendLogs.d.ts | 50 - products/userale/build/userale-2.4.0.js | 1395 -- products/userale/build/userale-2.4.0.js.map | 1 - products/userale/build/userale-2.4.0.min.js | 18 - products/userale/build/userale.d.ts | 163 - products/userale/build/utils/auth/index.d.ts | 49 - .../userale/build/utils/headers/index.d.ts | 49 - products/userale/build/utils/index.d.ts | 21 - products/userale/package-lock.json | 12911 ---------------- products/userale/package.json | 120 +- .../packages/flagon-userale-ext/.gitignore | 39 + .../flagon-userale-ext/.prettierrc.mjs | 26 + .../packages/flagon-userale-ext/README.md | 33 + .../flagon-userale-ext/assets/icon.png} | Bin .../packages/flagon-userale-ext/package.json | 45 + .../flagon-userale-ext/postcss.config.js | 9 + .../src/background/index.ts | 9 + .../src/background/messages/config_change.ts | 8 + .../src/background/messages/http_session.ts | 0 .../src/background/messages/issue_report.ts | 0 .../src/background/ports/log.ts | 15 + .../src/background/utils.ts | 12 + .../flagon-userale-ext/src/content.ts | 20 + .../flagon-userale-ext/src/options/auth.tsx | 101 + .../flagon-userale-ext/src/options/index.tsx | 14 + .../src/options/logging.tsx | 44 + .../packages/flagon-userale-ext/src/popup.tsx | 66 + .../packages/flagon-userale-ext/src/style.css | 3 + .../flagon-userale-ext/src/utils/storage.ts | 50 + .../flagon-userale-ext/tailwind.config.js | 7 + .../packages/flagon-userale-ext/tsconfig.json | 20 + .../flagon-userale}/.eslintrc.json | 0 .../{ => packages/flagon-userale}/.gitignore | 0 .../flagon-userale}/.husky/pre-commit | 0 .../flagon-userale}/CHANGELOG.md | 0 .../flagon-userale}/CONTRIBUTING.md | 0 .../{ => packages/flagon-userale}/README.md | 2 - .../packages/flagon-userale/build/main.d.ts | 289 + .../packages/flagon-userale/build/main.mjs | 1022 ++ .../flagon-userale/build/main.mjs.map | 1 + .../flagon-userale}/eslint.config.ts | 0 .../flagon-userale}/example/Dockerfile | 0 .../flagon-userale}/example/README.md | 0 .../custom-non-user-events-example/README.md | 0 .../custom-non-user-events-example/index.js | 0 .../flagon-userale}/example/index.html | 0 .../flagon-userale}/example/index.js | 0 .../example/kafka-rest-router.js | 0 .../example/log-label-example/README.md | 0 .../example/log-label-example/index.html | 0 .../flagon-userale}/example/log.schema.json | 0 .../flagon-userale}/example/no-logging.html | 0 .../example/react-app-example/.gitignore | 0 .../example/react-app-example/README.md | 0 .../react-app-example/package-lock.json | 0 .../example/react-app-example/package.json | 0 .../react-app-example/public/favicon.ico | Bin .../react-app-example/public/index.html | 0 .../react-app-example/public/logo192.png | Bin .../react-app-example/public/logo512.png | Bin .../example/react-app-example/src/App.css | 0 .../example/react-app-example/src/App.js | 0 .../example/react-app-example/src/index.css | 0 .../example/react-app-example/src/index.js | 0 .../example/react-app-example/src/logo.svg | 0 .../react-app-example/src/setupTests.js | 0 .../flagon-userale}/example/server.js | 0 .../flagon-userale}/example/test-client.ts | 0 .../example/webpackUserAleExample/.gitignore | 0 .../example/webpackUserAleExample/LICENSE | 0 .../example/webpackUserAleExample/README.md | 0 .../webpackUserAleExample/dist/main.js | 0 .../example/webpackUserAleExample/index.html | 0 .../example/webpackUserAleExample/index.js | 0 .../webpackUserAleExample/package-lock.json | 0 .../webpackUserAleExample/package.json | 0 .../webpackUserAleExample/webpack.config.js | 0 .../flagon-userale}/example/ws-index.html | 0 .../packages/flagon-userale/package.json | 106 + .../flagon-userale}/src/attachHandlers.ts | 0 .../src/callbacks/authHandler.ts | 15 + .../src/callbacks/callbackHandler.ts | 40 + .../src/callbacks/headersHandler.ts | 20 + .../src/callbacks/logHandler.ts | 20 + .../packages/flagon-userale/src/config.ts | 160 + .../flagon-userale}/src/configure.ts | 16 +- .../src/getInitialSettings.temp.ts} | 0 .../packages/flagon-userale/src/iife.ts | 0 .../flagon-userale/src/logPackager.ts | 276 + .../packages/flagon-userale/src/logSender.ts | 164 + .../flagon-userale/src/loggingEngine.ts | 125 + .../flagon-userale}/src/types.d.ts | 20 +- .../test/e2e/playwright.config.ts | 86 + .../test/e2e/spec/01-extension.spec.ts | 0 .../test/e2e/spec/01-package.spec.ts | 0 .../test/e2e/spec/02-shared.spec.ts | 94 + .../test/e2e/spec/03-websocket.spec.ts | 39 + .../e2e/spec/fixtures/extension.fixture.ts | 74 + .../flagon-userale}/test/unit/jest.config.ts | 0 .../flagon-userale}/test/unit/jest.setup.js | 0 .../test/unit/spec/attachHandlers.spec.ts | 0 .../test/unit/spec/auth.spec.ts | 0 .../test/unit/spec/configure.spec.ts | 0 .../test/unit/spec/getInitialSettings.spec.ts | 0 .../spec/getInitialSettings_fetchAll.html | 0 .../spec/getInitialSettings_userParam.html | 0 .../test/unit/spec/headers.spec.ts | 0 .../flagon-userale}/test/unit/spec/main.html | 0 .../test/unit/spec/main.spec.ts | 0 .../test/unit/spec/packageLogs.spec.ts | 0 .../test/unit/spec/sendLogs.spec.ts | 0 .../test/unit/spec/testUtils.ts | 0 .../flagon-userale}/tsconfig.json | 1 - .../packages/flagon-userale/tsup.config.js | 60 + products/userale/pnpm-lock.yaml | 12314 +++++++++++++++ products/userale/pnpm-workspace.yaml | 3 + products/userale/rollup.config.js | 122 - .../userale/src/UserALEWebExtension/README.md | 90 - .../src/UserALEWebExtension/background.ts | 273 - .../UserALEWebExtension/browserAction.html | 89 - .../src/UserALEWebExtension/content.ts | 57 - .../src/UserALEWebExtension/globals.ts | 31 - .../icons/UserALE Logo.png | Bin 6797 -> 0 bytes .../src/UserALEWebExtension/manifest.json | 26 - .../src/UserALEWebExtension/messageTypes.ts | 24 - .../src/UserALEWebExtension/options.html | 57 - .../src/UserALEWebExtension/options.ts | 122 - .../src/UserALEWebExtension/public/index.html | 26 - products/userale/src/main.ts | 157 - products/userale/src/packageLogs.ts | 471 - products/userale/src/sendLogs.ts | 156 - products/userale/src/utils/auth/index.ts | 81 - products/userale/src/utils/headers/index.ts | 88 - products/userale/src/utils/index.ts | 30 - 153 files changed, 15472 insertions(+), 21620 deletions(-) delete mode 100644 products/userale/.babelrc delete mode 100644 products/userale/babel.config.js delete mode 100644 products/userale/build/UserALEWebExtension/background.d.ts delete mode 100644 products/userale/build/UserALEWebExtension/background.js delete mode 100644 products/userale/build/UserALEWebExtension/browserAction.html delete mode 100644 products/userale/build/UserALEWebExtension/content.d.ts delete mode 100644 products/userale/build/UserALEWebExtension/content.js delete mode 100644 products/userale/build/UserALEWebExtension/globals.d.ts delete mode 100644 products/userale/build/UserALEWebExtension/manifest.json delete mode 100644 products/userale/build/UserALEWebExtension/messageTypes.d.ts delete mode 100644 products/userale/build/UserALEWebExtension/options.d.ts delete mode 100644 products/userale/build/UserALEWebExtension/options.html delete mode 100644 products/userale/build/UserALEWebExtension/options.js delete mode 100644 products/userale/build/attachHandlers.d.ts delete mode 100644 products/userale/build/configure.d.ts delete mode 100644 products/userale/build/getInitialSettings.d.ts delete mode 100644 products/userale/build/main.d.ts delete mode 100644 products/userale/build/packageLogs.d.ts delete mode 100644 products/userale/build/sendLogs.d.ts delete mode 100644 products/userale/build/userale-2.4.0.js delete mode 100644 products/userale/build/userale-2.4.0.js.map delete mode 100644 products/userale/build/userale-2.4.0.min.js delete mode 100644 products/userale/build/userale.d.ts delete mode 100644 products/userale/build/utils/auth/index.d.ts delete mode 100644 products/userale/build/utils/headers/index.d.ts delete mode 100644 products/userale/build/utils/index.d.ts delete mode 100644 products/userale/package-lock.json create mode 100644 products/userale/packages/flagon-userale-ext/.gitignore create mode 100644 products/userale/packages/flagon-userale-ext/.prettierrc.mjs create mode 100644 products/userale/packages/flagon-userale-ext/README.md rename products/userale/{build/UserALEWebExtension/icons/UserALE Logo.png => packages/flagon-userale-ext/assets/icon.png} (100%) create mode 100644 products/userale/packages/flagon-userale-ext/package.json create mode 100644 products/userale/packages/flagon-userale-ext/postcss.config.js create mode 100644 products/userale/packages/flagon-userale-ext/src/background/index.ts create mode 100644 products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts create mode 100644 products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts create mode 100644 products/userale/packages/flagon-userale-ext/src/background/messages/issue_report.ts create mode 100644 products/userale/packages/flagon-userale-ext/src/background/ports/log.ts create mode 100644 products/userale/packages/flagon-userale-ext/src/background/utils.ts create mode 100644 products/userale/packages/flagon-userale-ext/src/content.ts create mode 100644 products/userale/packages/flagon-userale-ext/src/options/auth.tsx create mode 100644 products/userale/packages/flagon-userale-ext/src/options/index.tsx create mode 100644 products/userale/packages/flagon-userale-ext/src/options/logging.tsx create mode 100644 products/userale/packages/flagon-userale-ext/src/popup.tsx create mode 100644 products/userale/packages/flagon-userale-ext/src/style.css create mode 100644 products/userale/packages/flagon-userale-ext/src/utils/storage.ts create mode 100644 products/userale/packages/flagon-userale-ext/tailwind.config.js create mode 100644 products/userale/packages/flagon-userale-ext/tsconfig.json rename products/userale/{ => packages/flagon-userale}/.eslintrc.json (100%) rename products/userale/{ => packages/flagon-userale}/.gitignore (100%) rename products/userale/{ => packages/flagon-userale}/.husky/pre-commit (100%) rename products/userale/{ => packages/flagon-userale}/CHANGELOG.md (100%) rename products/userale/{ => packages/flagon-userale}/CONTRIBUTING.md (100%) rename products/userale/{ => packages/flagon-userale}/README.md (99%) create mode 100644 products/userale/packages/flagon-userale/build/main.d.ts create mode 100644 products/userale/packages/flagon-userale/build/main.mjs create mode 100644 products/userale/packages/flagon-userale/build/main.mjs.map rename products/userale/{ => packages/flagon-userale}/eslint.config.ts (100%) rename products/userale/{ => packages/flagon-userale}/example/Dockerfile (100%) rename products/userale/{ => packages/flagon-userale}/example/README.md (100%) rename products/userale/{ => packages/flagon-userale}/example/custom-non-user-events-example/README.md (100%) rename products/userale/{ => packages/flagon-userale}/example/custom-non-user-events-example/index.js (100%) rename products/userale/{ => packages/flagon-userale}/example/index.html (100%) rename products/userale/{ => packages/flagon-userale}/example/index.js (100%) rename products/userale/{ => packages/flagon-userale}/example/kafka-rest-router.js (100%) rename products/userale/{ => packages/flagon-userale}/example/log-label-example/README.md (100%) rename products/userale/{ => packages/flagon-userale}/example/log-label-example/index.html (100%) rename products/userale/{ => packages/flagon-userale}/example/log.schema.json (100%) rename products/userale/{ => packages/flagon-userale}/example/no-logging.html (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/.gitignore (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/README.md (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/package-lock.json (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/package.json (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/public/favicon.ico (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/public/index.html (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/public/logo192.png (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/public/logo512.png (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/src/App.css (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/src/App.js (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/src/index.css (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/src/index.js (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/src/logo.svg (100%) rename products/userale/{ => packages/flagon-userale}/example/react-app-example/src/setupTests.js (100%) rename products/userale/{ => packages/flagon-userale}/example/server.js (100%) rename products/userale/{ => packages/flagon-userale}/example/test-client.ts (100%) rename products/userale/{ => packages/flagon-userale}/example/webpackUserAleExample/.gitignore (100%) rename products/userale/{ => packages/flagon-userale}/example/webpackUserAleExample/LICENSE (100%) rename products/userale/{ => packages/flagon-userale}/example/webpackUserAleExample/README.md (100%) rename products/userale/{ => packages/flagon-userale}/example/webpackUserAleExample/dist/main.js (100%) rename products/userale/{ => packages/flagon-userale}/example/webpackUserAleExample/index.html (100%) rename products/userale/{ => packages/flagon-userale}/example/webpackUserAleExample/index.js (100%) rename products/userale/{ => packages/flagon-userale}/example/webpackUserAleExample/package-lock.json (100%) rename products/userale/{ => packages/flagon-userale}/example/webpackUserAleExample/package.json (100%) rename products/userale/{ => packages/flagon-userale}/example/webpackUserAleExample/webpack.config.js (100%) rename products/userale/{ => packages/flagon-userale}/example/ws-index.html (100%) create mode 100644 products/userale/packages/flagon-userale/package.json rename products/userale/{ => packages/flagon-userale}/src/attachHandlers.ts (100%) create mode 100644 products/userale/packages/flagon-userale/src/callbacks/authHandler.ts create mode 100644 products/userale/packages/flagon-userale/src/callbacks/callbackHandler.ts create mode 100644 products/userale/packages/flagon-userale/src/callbacks/headersHandler.ts create mode 100644 products/userale/packages/flagon-userale/src/callbacks/logHandler.ts create mode 100644 products/userale/packages/flagon-userale/src/config.ts rename products/userale/{ => packages/flagon-userale}/src/configure.ts (93%) rename products/userale/{src/getInitialSettings.ts => packages/flagon-userale/src/getInitialSettings.temp.ts} (100%) create mode 100644 products/userale/packages/flagon-userale/src/iife.ts create mode 100644 products/userale/packages/flagon-userale/src/logPackager.ts create mode 100644 products/userale/packages/flagon-userale/src/logSender.ts create mode 100644 products/userale/packages/flagon-userale/src/loggingEngine.ts rename products/userale/{ => packages/flagon-userale}/src/types.d.ts (89%) create mode 100644 products/userale/packages/flagon-userale/test/e2e/playwright.config.ts rename products/userale/{ => packages/flagon-userale}/test/e2e/spec/01-extension.spec.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/e2e/spec/01-package.spec.ts (100%) create mode 100644 products/userale/packages/flagon-userale/test/e2e/spec/02-shared.spec.ts create mode 100644 products/userale/packages/flagon-userale/test/e2e/spec/03-websocket.spec.ts create mode 100644 products/userale/packages/flagon-userale/test/e2e/spec/fixtures/extension.fixture.ts rename products/userale/{ => packages/flagon-userale}/test/unit/jest.config.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/jest.setup.js (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/attachHandlers.spec.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/auth.spec.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/configure.spec.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/getInitialSettings.spec.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/getInitialSettings_fetchAll.html (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/getInitialSettings_userParam.html (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/headers.spec.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/main.html (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/main.spec.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/packageLogs.spec.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/sendLogs.spec.ts (100%) rename products/userale/{ => packages/flagon-userale}/test/unit/spec/testUtils.ts (100%) rename products/userale/{ => packages/flagon-userale}/tsconfig.json (97%) create mode 100644 products/userale/packages/flagon-userale/tsup.config.js create mode 100644 products/userale/pnpm-lock.yaml create mode 100644 products/userale/pnpm-workspace.yaml delete mode 100644 products/userale/rollup.config.js delete mode 100644 products/userale/src/UserALEWebExtension/README.md delete mode 100644 products/userale/src/UserALEWebExtension/background.ts delete mode 100644 products/userale/src/UserALEWebExtension/browserAction.html delete mode 100644 products/userale/src/UserALEWebExtension/content.ts delete mode 100644 products/userale/src/UserALEWebExtension/globals.ts delete mode 100644 products/userale/src/UserALEWebExtension/icons/UserALE Logo.png delete mode 100644 products/userale/src/UserALEWebExtension/manifest.json delete mode 100644 products/userale/src/UserALEWebExtension/messageTypes.ts delete mode 100644 products/userale/src/UserALEWebExtension/options.html delete mode 100644 products/userale/src/UserALEWebExtension/options.ts delete mode 100644 products/userale/src/UserALEWebExtension/public/index.html delete mode 100644 products/userale/src/main.ts delete mode 100644 products/userale/src/packageLogs.ts delete mode 100644 products/userale/src/sendLogs.ts delete mode 100644 products/userale/src/utils/auth/index.ts delete mode 100644 products/userale/src/utils/headers/index.ts delete mode 100644 products/userale/src/utils/index.ts diff --git a/products/distill/README.md b/products/distill/README.md index cdf4411..bfbb199 100644 --- a/products/distill/README.md +++ b/products/distill/README.md @@ -1,17 +1,21 @@ -> \ more contributor license agreements. See the NOTICE file distributed -> with this work for additional information regarding copyright -> ownership. The ASF licenses this file to You under the Apache License, -> Version 2.0 (the \"License\"); you may not use this file except in -> compliance with the License. You may obtain a copy of the License at -> -> > -> -> Unless required by applicable law or agreed to in writing, software -> distributed under the License is distributed on an \"AS IS\" BASIS, -> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -> implied. See the License for the specific language governing -> permissions and limitations under the License. \-\--\> + # Apache Flagon Distill diff --git a/products/userale/.babelrc b/products/userale/.babelrc deleted file mode 100644 index 72bb335..0000000 --- a/products/userale/.babelrc +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -{ - "presets": ["@babel/preset-env"], - "plugins": [ - ["@babel/transform-runtime"] - ] -} diff --git a/products/userale/babel.config.js b/products/userale/babel.config.js deleted file mode 100644 index 6f2adce..0000000 --- a/products/userale/babel.config.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -module.exports = { - presets: [ - ['@babel/preset-env', {targets: {node: 'current'}}], - '@babel/preset-typescript', - ], - }; diff --git a/products/userale/build/UserALEWebExtension/background.d.ts b/products/userale/build/UserALEWebExtension/background.d.ts deleted file mode 100644 index 70be523..0000000 --- a/products/userale/build/UserALEWebExtension/background.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export {}; diff --git a/products/userale/build/UserALEWebExtension/background.js b/products/userale/build/UserALEWebExtension/background.js deleted file mode 100644 index 813def1..0000000 --- a/products/userale/build/UserALEWebExtension/background.js +++ /dev/null @@ -1,1560 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol */ - - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var messageTypes; -(function (messageTypes) { - messageTypes["CONFIG_CHANGE"] = "USERALE_CONFIG_CHANGE"; - messageTypes["ADD_LOG"] = "USERALE_ADD_LOG"; - messageTypes["HTTP_SESSION"] = "USERALE_HTTP_SESSION"; - messageTypes["ISSUE_REPORT"] = "USERALE_ISSUE_REPORT"; -})(messageTypes || (messageTypes = {})); - -var version$1 = "2.4.0"; - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the 'License'); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -let sessionId = null; -let httpSessionId = null; -/** - * Extracts the initial configuration settings from the - * currently executing script tag. - * @return {Object} The extracted configuration object - */ -function getInitialSettings() { - if (sessionId === null) { - sessionId = getsessionId("userAlesessionId", "session_" + String(Date.now())); - } - if (httpSessionId === null) { - httpSessionId = getsessionId("userAleHttpSessionId", generatehttpSessionId()); - } - const script = document.currentScript || - (function () { - const scripts = document.getElementsByTagName("script"); - return scripts[scripts.length - 1]; - })(); - const get = script - ? script.getAttribute.bind(script) - : function () { - return null; - }; - const headers = get("data-headers"); - const settings = { - authHeader: get("data-auth") || null, - autostart: get("data-autostart") === "false" ? false : true, - browserSessionId: null, - custIndex: get("data-index") || null, - headers: headers ? JSON.parse(headers) : null, - httpSessionId: httpSessionId, - logCountThreshold: +(get("data-threshold") || 5), - logDetails: get("data-log-details") === "true" ? true : false, - resolution: +(get("data-resolution") || 500), - sessionId: get("data-session") || sessionId, - time: timeStampScale(document.createEvent("CustomEvent")), - toolName: get("data-tool") || null, - toolVersion: get("data-version") || null, - transmitInterval: +(get("data-interval") || 5000), - url: get("data-url") || "http://localhost:8000", - useraleVersion: get("data-userale-version") || null, - userFromParams: get("data-user-from-params") || null, - userId: get("data-user") || null, - }; - return settings; -} -/** - * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in - * storage when script is started. This prevents events like 'submit', which refresh page data - * from refreshing the current user session - * - */ -function getsessionId(sessionKey, value) { - if (window.sessionStorage.getItem(sessionKey) === null) { - window.sessionStorage.setItem(sessionKey, JSON.stringify(value)); - return value; - } - return JSON.parse(window.sessionStorage.getItem(sessionKey) || ""); -} -/** - * Creates a function to normalize the timestamp of the provided event. - * @param {Event} e An event containing a timeStamp property. - * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function. - */ -function timeStampScale(e) { - let tsScaler; - if (e.timeStamp && e.timeStamp > 0) { - const delta = Date.now() - e.timeStamp; - /** - * Returns a timestamp depending on various browser quirks. - * @param {?Number} ts A timestamp to use for normalization. - * @return {Number} A normalized timestamp. - */ - if (delta < 0) { - tsScaler = function () { - return e.timeStamp / 1000; - }; - } - else if (delta > e.timeStamp) { - const navStart = performance.timeOrigin; - tsScaler = function (ts) { - return ts + navStart; - }; - } - else { - tsScaler = function (ts) { - return ts; - }; - } - } - else { - tsScaler = function () { - return Date.now(); - }; - } - return tsScaler; -} -/** - * Creates a cryptographiclly random string to represent this http session. - * @return {String} A random 32 digit hex string - */ -function generatehttpSessionId() { - // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison - const len = 32; - const arr = new Uint8Array(len / 2); - window.crypto.getRandomValues(arr); - return Array.from(arr, (dec) => { - return dec.toString(16).padStart(2, "0"); - }).join(""); -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Singleton Configuration class -class Configuration { - // Private constructor to prevent external instantiation - constructor() { - // Public properties corresponding to fields in the Config interface - this.autostart = false; - this.authHeader = null; - this.browserSessionId = null; - this.custIndex = null; - this.headers = null; - this.httpSessionId = null; - this.logCountThreshold = 0; - this.logDetails = false; - this.on = false; - this.resolution = 0; - this.sessionId = null; - this.time = () => Date.now(); - this.toolName = null; - this.toolVersion = null; - this.transmitInterval = 0; - this.url = ""; - this.userFromParams = null; - this.useraleVersion = null; - this.userId = null; - this.version = null; - this.websocketsEnabled = false; - // Call the initialization method only if it's the first time instantiating - if (Configuration.instance === null) { - this.initialize(); - } - } - // Static method to get the singleton instance - static getInstance() { - if (Configuration.instance === null) { - Configuration.instance = new Configuration(); - } - return Configuration.instance; - } - initialize() { - const settings = getInitialSettings(); - this.update(settings); - } - /** - * Resets the configuration to its initial state. - */ - reset() { - this.initialize(); - } - /** - * Shallow merges a newConfig with the configuration class, updating it. - * Retrieves/updates the userid if userFromParams is provided. - * @param {Partial} newConfig Configuration object to merge into the current config. - */ - update(newConfig) { - Object.keys(newConfig).forEach((option) => { - if (option === "userFromParams") { - const userParamString = newConfig[option]; - const userId = userParamString - ? Configuration.getUserIdFromParams(userParamString) - : null; - if (userId) { - this["userId"] = userId; - } - } - const hasNewUserFromParams = newConfig["userFromParams"]; - const willNullifyUserId = option === "userId" && newConfig[option] === null; - if (willNullifyUserId && hasNewUserFromParams) { - return; - } - const newOption = newConfig[option]; - if (newOption !== undefined) { - this[option] = newOption; - } - }); - } - /** - * Attempts to extract the userid from the query parameters of the URL. - * @param {string} param The name of the query parameter containing the userid. - * @return {string | null} The extracted/decoded userid, or null if none is found. - */ - static getUserIdFromParams(param) { - const userField = param; - const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); - const results = window.location.href.match(regex); - if (results && results[2]) { - return decodeURIComponent(results[2].replace(/\+/g, " ")); - } - return null; - } -} -// Private static property to hold the singleton instance -Configuration.instance = null; - -var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var BrowserInfo = /** @class */ (function () { - function BrowserInfo(name, version, os) { - this.name = name; - this.version = version; - this.os = os; - this.type = 'browser'; - } - return BrowserInfo; -}()); -var NodeInfo = /** @class */ (function () { - function NodeInfo(version) { - this.version = version; - this.type = 'node'; - this.name = 'node'; - this.os = process.platform; - } - return NodeInfo; -}()); -var SearchBotDeviceInfo = /** @class */ (function () { - function SearchBotDeviceInfo(name, version, os, bot) { - this.name = name; - this.version = version; - this.os = os; - this.bot = bot; - this.type = 'bot-device'; - } - return SearchBotDeviceInfo; -}()); -var BotInfo = /** @class */ (function () { - function BotInfo() { - this.type = 'bot'; - this.bot = true; // NOTE: deprecated test name instead - this.name = 'bot'; - this.version = null; - this.os = null; - } - return BotInfo; -}()); -var ReactNativeInfo = /** @class */ (function () { - function ReactNativeInfo() { - this.type = 'react-native'; - this.name = 'react-native'; - this.version = null; - this.os = null; - } - return ReactNativeInfo; -}()); -// tslint:disable-next-line:max-line-length -var SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/; -var SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/; -var REQUIRED_VERSION_PARTS = 3; -var userAgentRules = [ - ['aol', /AOLShield\/([0-9\._]+)/], - ['edge', /Edge\/([0-9\._]+)/], - ['edge-ios', /EdgiOS\/([0-9\._]+)/], - ['yandexbrowser', /YaBrowser\/([0-9\._]+)/], - ['kakaotalk', /KAKAOTALK\s([0-9\.]+)/], - ['samsung', /SamsungBrowser\/([0-9\.]+)/], - ['silk', /\bSilk\/([0-9._-]+)\b/], - ['miui', /MiuiBrowser\/([0-9\.]+)$/], - ['beaker', /BeakerBrowser\/([0-9\.]+)/], - ['edge-chromium', /EdgA?\/([0-9\.]+)/], - [ - 'chromium-webview', - /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/, - ], - ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], - ['phantomjs', /PhantomJS\/([0-9\.]+)(:?\s|$)/], - ['crios', /CriOS\/([0-9\.]+)(:?\s|$)/], - ['firefox', /Firefox\/([0-9\.]+)(?:\s|$)/], - ['fxios', /FxiOS\/([0-9\.]+)/], - ['opera-mini', /Opera Mini.*Version\/([0-9\.]+)/], - ['opera', /Opera\/([0-9\.]+)(?:\s|$)/], - ['opera', /OPR\/([0-9\.]+)(:?\s|$)/], - ['pie', /^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/], - ['pie', /^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/], - ['netfront', /^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/], - ['ie', /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/], - ['ie', /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/], - ['ie', /MSIE\s(7\.0)/], - ['bb10', /BB10;\sTouch.*Version\/([0-9\.]+)/], - ['android', /Android\s([0-9\.]+)/], - ['ios', /Version\/([0-9\._]+).*Mobile.*Safari.*/], - ['safari', /Version\/([0-9\._]+).*Safari/], - ['facebook', /FB[AS]V\/([0-9\.]+)/], - ['instagram', /Instagram\s([0-9\.]+)/], - ['ios-webview', /AppleWebKit\/([0-9\.]+).*Mobile/], - ['ios-webview', /AppleWebKit\/([0-9\.]+).*Gecko\)$/], - ['curl', /^curl\/([0-9\.]+)$/], - ['searchbot', SEARCHBOX_UA_REGEX], -]; -var operatingSystemRules = [ - ['iOS', /iP(hone|od|ad)/], - ['Android OS', /Android/], - ['BlackBerry OS', /BlackBerry|BB10/], - ['Windows Mobile', /IEMobile/], - ['Amazon OS', /Kindle/], - ['Windows 3.11', /Win16/], - ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/], - ['Windows 98', /(Windows 98)|(Win98)/], - ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/], - ['Windows XP', /(Windows NT 5.1)|(Windows XP)/], - ['Windows Server 2003', /(Windows NT 5.2)/], - ['Windows Vista', /(Windows NT 6.0)/], - ['Windows 7', /(Windows NT 6.1)/], - ['Windows 8', /(Windows NT 6.2)/], - ['Windows 8.1', /(Windows NT 6.3)/], - ['Windows 10', /(Windows NT 10.0)/], - ['Windows ME', /Windows ME/], - ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/], - ['Open BSD', /OpenBSD/], - ['Sun OS', /SunOS/], - ['Chrome OS', /CrOS/], - ['Linux', /(Linux)|(X11)/], - ['Mac OS', /(Mac_PowerPC)|(Macintosh)/], - ['QNX', /QNX/], - ['BeOS', /BeOS/], - ['OS/2', /OS\/2/], -]; -function detect(userAgent) { - if (typeof document === 'undefined' && - typeof navigator !== 'undefined' && - navigator.product === 'ReactNative') { - return new ReactNativeInfo(); - } - if (typeof navigator !== 'undefined') { - return parseUserAgent(navigator.userAgent); - } - return getNodeVersion(); -} -function matchUserAgent(ua) { - // opted for using reduce here rather than Array#first with a regex.test call - // this is primarily because using the reduce we only perform the regex - // execution once rather than once for the test and for the exec again below - // probably something that needs to be benchmarked though - return (ua !== '' && - userAgentRules.reduce(function (matched, _a) { - var browser = _a[0], regex = _a[1]; - if (matched) { - return matched; - } - var uaMatch = regex.exec(ua); - return !!uaMatch && [browser, uaMatch]; - }, false)); -} -function parseUserAgent(ua) { - var matchedRule = matchUserAgent(ua); - if (!matchedRule) { - return null; - } - var name = matchedRule[0], match = matchedRule[1]; - if (name === 'searchbot') { - return new BotInfo(); - } - // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split) - var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3); - if (versionParts) { - if (versionParts.length < REQUIRED_VERSION_PARTS) { - versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true); - } - } - else { - versionParts = []; - } - var version = versionParts.join('.'); - var os = detectOS(ua); - var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua); - if (searchBotMatch && searchBotMatch[1]) { - return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]); - } - return new BrowserInfo(name, version, os); -} -function detectOS(ua) { - for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) { - var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1]; - var match = regex.exec(ua); - if (match) { - return os; - } - } - return null; -} -function getNodeVersion() { - var isNode = typeof process !== 'undefined' && process.version; - return isNode ? new NodeInfo(process.version.slice(1)) : null; -} -function createVersionParts(count) { - var output = []; - for (var ii = 0; ii < count; ii++) { - output.push('0'); - } - return output; -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const browserInfo = detect(); -let logs$1; -let config$1; -// Interval Logging Globals -let intervalId; -let intervalType; -let intervalPath; -let intervalTimer; -let intervalCounter; -let intervalLog; -const filterHandler = null; -const mapHandler = null; -let cbHandlers = {}; -/** - * Adds named callbacks to be executed when logging. - * @param {Object } newCallbacks An object containing named callback functions. - */ -function addCallbacks(...newCallbacks) { - newCallbacks.forEach((source) => { - let descriptors = {}; - descriptors = Object.keys(source).reduce((descriptors, key) => { - descriptors[key] = Object.getOwnPropertyDescriptor(source, key); - return descriptors; - }, descriptors); - Object.getOwnPropertySymbols(source).forEach((sym) => { - const descriptor = Object.getOwnPropertyDescriptor(source, sym); - if (descriptor === null || descriptor === void 0 ? void 0 : descriptor.enumerable) { - descriptors[sym] = descriptor; - } - }); - Object.defineProperties(cbHandlers, descriptors); - }); - return cbHandlers; -} -/** - * Assigns the config and log container to be used by the logging functions. - * @param {Array} newLogs Log container. - * @param {Object} newConfig Configuration to use while logging. - */ -function initPackager(newLogs, newConfig) { - logs$1 = newLogs; - config$1 = newConfig; - cbHandlers = {}; - intervalId = null; - intervalType = null; - intervalPath = null; - intervalTimer = null; - intervalCounter = 0; - intervalLog = null; -} -/** - * Transforms the provided HTML event into a log and appends it to the log queue. - * @param {Event} e The event to be logged. - * @param {Function} detailFcn The function to extract additional log parameters from the event. - * @return {boolean} Whether the event was logged. - */ -function packageLog(e, detailFcn) { - if (!config$1.on) { - return false; - } - let details = null; - if (detailFcn) { - details = detailFcn(e); - } - const timeFields = extractTimeFields(e.timeStamp && e.timeStamp > 0 ? config$1.time(e.timeStamp) : Date.now()); - let log = { - target: e.target ? getSelector(e.target) : null, - path: buildPath(e), - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: timeFields.milli, - microTime: timeFields.micro, - location: getLocation(e), - scrnRes: getScreenRes(), - type: e.type, - logType: "raw", - userAction: true, - details: details, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - attributes: buildAttrs(e), - style: buildCSS(e), - }; - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, e); - if (!log) { - return false; - } - } - } - logs$1.push(log); - return true; -} -/** - * Packages the provided customLog to include standard meta data and appends it to the log queue. - * @param {Logging.CustomLog} customLog The behavior to be logged. - * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. - * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) - * @return {boolean} Whether the event was logged. - */ -function packageCustomLog(customLog, detailFcn, userAction) { - if (!config$1.on) { - return false; - } - let details = null; - if (detailFcn.length === 0) { - // In the case of a union, the type checker will default to the more stringent - // type, i.e. the DetailFunction that expects an argument for safety purposes. - // To avoid this, we must explicitly check the type by asserting it receives - // no arguments (detailFcn.length === 0) and then cast it to the - // StaticDetailFunction type. - const staticDetailFcn = detailFcn; - details = staticDetailFcn(); - } - const metaData = { - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: Date.now(), - scrnRes: getScreenRes(), - logType: "custom", - userAction: userAction, - details: details, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - }; - let log = Object.assign(metaData, customLog); - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, null); - if (!log) { - return false; - } - } - } - logs$1.push(log); - return true; -} -/** - * Extract the millisecond and microsecond portions of a timestamp. - * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields. - * @return {Object} An object containing the millisecond - * and microsecond portions of the timestamp. - */ -function extractTimeFields(timeStamp) { - return { - milli: Math.floor(timeStamp), - micro: Number((timeStamp % 1).toFixed(3)), - }; -} -/** - * Track intervals and gather details about it. - * @param {Object} e - * @return boolean - */ -function packageIntervalLog(e) { - try { - const target = e.target ? getSelector(e.target) : null; - const path = buildPath(e); - const type = e.type; - const timestamp = Math.floor(e.timeStamp && e.timeStamp > 0 ? config$1.time(e.timeStamp) : Date.now()); - // Init - this should only happen once on initialization - if (intervalId == null) { - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - if ((intervalId !== target || intervalType !== type) && intervalTimer) { - // When to create log? On transition end - // @todo Possible for intervalLog to not be pushed in the event the interval never ends... - intervalLog = { - target: intervalId, - path: intervalPath, - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - count: intervalCounter, - duration: timestamp - intervalTimer, // microseconds - startTime: intervalTimer, - endTime: timestamp, - type: intervalType, - logType: "interval", - targetChange: intervalId !== target, - typeChange: intervalType !== type, - userAction: false, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - }; - if (typeof filterHandler === "function" && !filterHandler(intervalLog)) ; - if (typeof mapHandler === "function") ; - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - intervalLog = func(intervalLog, null); - if (!intervalLog) { - return false; - } - } - } - if (intervalLog) - logs$1.push(intervalLog); - // Reset - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - // Interval is still occuring, just update counter - if (intervalId == target && intervalType == type && intervalCounter) { - intervalCounter = intervalCounter + 1; - } - return true; - } - catch (_a) { - return false; - } -} -/** - * Extracts coordinate information from the event - * depending on a few browser quirks. - * @param {Event} e The event to extract coordinate information from. - * @return {Object} An object containing nullable x and y coordinates for the event. - */ -function getLocation(e) { - if (e instanceof MouseEvent) { - if (e.pageX != null) { - return { x: e.pageX, y: e.pageY }; - } - else if (e.clientX != null) { - return { - x: document.documentElement.scrollLeft + e.clientX, - y: document.documentElement.scrollTop + e.clientY, - }; - } - } - else { - return { x: null, y: null }; - } -} -/** - * Extracts innerWidth and innerHeight to provide estimates of screen resolution - * @return {Object} An object containing the innerWidth and InnerHeight - */ -function getScreenRes() { - return { width: window.innerWidth, height: window.innerHeight }; -} -/** - * Builds a string CSS selector from the provided element - * @param {EventTarget} ele The element from which the selector is built. - * @return {string} The CSS selector for the element, or Unknown if it can't be determined. - */ -function getSelector(ele) { - if (ele instanceof HTMLElement || ele instanceof Element) { - if (ele.localName) { - return (ele.localName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "")); - } - else if (ele.nodeName) { - return (ele.nodeName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "")); - } - } - else if (ele instanceof Document) { - return "#document"; - } - else if (ele === globalThis) { - return "Window"; - } - return "Unknown"; -} -/** - * Builds an array of elements from the provided event target, to the root element. - * @param {Event} e Event from which the path should be built. - * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. - */ -function buildPath(e) { - const path = e.composedPath(); - return selectorizePath(path); -} -/** - * Builds a CSS selector path from the provided list of elements. - * @param {EventTarget[]} path Array of HTML Elements from which the path should be built. - * @return {string[]} Array of string CSS selectors. - */ -function selectorizePath(path) { - let i = 0; - let pathEle; - const pathSelectors = []; - while ((pathEle = path[i])) { - pathSelectors.push(getSelector(pathEle)); - ++i; - pathEle = path[i]; - } - return pathSelectors; -} -function detectBrowser() { - return { - browser: browserInfo ? browserInfo.name : "", - version: browserInfo ? browserInfo.version : "", - }; -} -/** - * Builds an object containing attributes of an element. - * Attempts to parse all attribute values as JSON text. - * @param {Event} e Event from which the target element's attributes should be extracted. - * @return {Record} Object with element attributes as key-value pairs. - */ -function buildAttrs(e) { - const attributes = {}; - const attributeBlackList = ["style"]; - if (e.target && e.target instanceof Element) { - for (const attr of e.target.attributes) { - if (attributeBlackList.includes(attr.name)) - continue; - let val = attr.value; - try { - val = JSON.parse(val); - } - catch (error) { - // Ignore parsing errors, fallback to raw string value - } - attributes[attr.name] = val; - } - } - return attributes; -} -/** - * Builds an object containing all CSS properties of an element. - * @param {Event} e Event from which the target element's properties should be extracted. - * @return {Record} Object with all CSS properties as key-value pairs. - */ -function buildCSS(e) { - const properties = {}; - if (e.target && e.target instanceof HTMLElement) { - const styleObj = e.target.style; - for (let i = 0; i < styleObj.length; i++) { - const prop = styleObj[i]; - properties[prop] = styleObj.getPropertyValue(prop); - } - } - return properties; -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -//@todo: Investigate drag events and their behavior -let events; -let bufferBools; -let bufferedEvents; -let refreshEvents; -const intervalEvents = [ - "click", - "focus", - "blur", - "input", - "change", - "mouseover", - "submit", -]; -const windowEvents = ["load", "blur", "focus"]; -/** - * Maps a MouseEvent to an object containing useful information. - * @param {MouseEvent} e Event to extract data from - */ -function extractMouseDetails(e) { - return { - clicks: e.detail, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey, - // 'text' : e.target.innerHTML - }; -} -/** Maps a KeyboardEvent to an object containing useful infromation - * @param {KeyboardEvent} e Event to extract data from - */ -function extractKeyboardDetails(e) { - return { - key: e.key, - code: e.code, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey, - }; -} -/** - * Maps a ChangeEvent to an object containing useful information. - * @param {Events.ChangeEvent} e Event to extract data from - */ -function extractChangeDetails(e) { - return { - value: e.target.value, - }; -} -/** - * Maps a WheelEvent to an object containing useful information. - * @param {WheelEvent} e Event to extract data from - */ -function extractWheelDetails(e) { - return { - x: e.deltaX, - y: e.deltaY, - z: e.deltaZ, - }; -} -/** - * Maps a ScrollEvent to an object containing useful information. - */ -function extractScrollDetails() { - return { - x: window.scrollX, - y: window.scrollY, - }; -} -/** - * Maps a ResizeEvent to an object containing useful information. - */ -function extractResizeDetails() { - return { - width: window.outerWidth, - height: window.outerHeight, - }; -} -/** - * Defines the way information is extracted from various events. - * Also defines which events we will listen to. - * @param {Settings.Config} config Configuration object to read from. - */ -function defineDetails(config) { - // Events list - // Keys are event types - // Values are functions that return details object if applicable - events = { - click: extractMouseDetails, - dblclick: extractMouseDetails, - mousedown: extractMouseDetails, - mouseup: extractMouseDetails, - focus: null, - blur: null, - input: config.logDetails ? extractKeyboardDetails : null, - change: config.logDetails ? extractChangeDetails : null, - dragstart: null, - dragend: null, - drag: null, - drop: null, - keydown: config.logDetails ? extractKeyboardDetails : null, - mouseover: null, - }; - bufferBools = {}; - bufferedEvents = { - wheel: extractWheelDetails, - scroll: extractScrollDetails, - resize: extractResizeDetails, - }; - refreshEvents = { - submit: null, - }; -} -/** - * Hooks the event handlers for each event type of interest. - * @param {Configuration} config Configuration singleton to use. - * @return {boolean} Whether the operation succeeded - */ -function attachHandlers(config) { - try { - defineDetails(config); - Object.keys(events).forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageLog(e, events[ev]); - }, true); - }); - intervalEvents.forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageIntervalLog(e); - }, true); - }); - Object.keys(bufferedEvents).forEach(function (ev) { - bufferBools[ev] = true; - window.addEventListener(ev, function (e) { - if (bufferBools[ev]) { - bufferBools[ev] = false; - packageLog(e, bufferedEvents[ev]); - setTimeout(function () { - bufferBools[ev] = true; - }, config.resolution); - } - }, true); - }); - Object.keys(refreshEvents).forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageLog(e, events[ev]); - }, true); - }); - windowEvents.forEach(function (ev) { - window.addEventListener(ev, function (e) { - packageLog(e, function () { - return { window: true }; - }); - }, true); - }); - return true; - } - catch (_a) { - return false; - } -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -let sendIntervalId; -/** - * Initializes the log queue processors. - * @param {Array} logs Array of logs to append to. - * @param {Configuration} config Configuration object to use when logging. - */ -function initSender(logs, config) { - if (sendIntervalId) { - clearInterval(sendIntervalId); - } - sendIntervalId = sendOnInterval(logs, config); - sendOnClose(logs, config); -} -/** - * Checks the provided log array on an interval, flushing the logs - * if the queue has reached the threshold specified by the provided config. - * @param {Array} logs Array of logs to read from. - * @param {Configuration} config Configuration singleton to be read from. - * @return {Number} The newly created interval id. - */ -function sendOnInterval(logs, config) { - return setInterval(function () { - if (!config.on) { - return; - } - if (logs.length >= config.logCountThreshold) { - sendLogs(logs.slice(0), config); // Send a copy - logs.splice(0); // Clear array reference (no reassignment) - } - }, config.transmitInterval); -} -/** - * Attempts to flush the remaining logs when the window is closed. - * @param {Array} logs Array of logs to be flushed. - * @param {Configuration} config Configuration singleton to be read from. - */ -function sendOnClose(logs, config) { - window.addEventListener("pagehide", function () { - if (!config.on) { - return; - } - if (logs.length > 0) { - if (config.websocketsEnabled) { - const data = JSON.stringify(logs); - wsock.send(data); - } - else { - const headers = new Headers(); - headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); - if (config.authHeader) { - headers.set("Authorization", config.authHeader.toString()); - } - fetch(config.url, { - keepalive: true, - method: "POST", - headers: headers, - body: JSON.stringify(logs), - }).catch((error) => { - console.error(error); - }); - } - logs.splice(0); // clear log queue - } - }); -} -/** - * Sends the provided array of logs to the specified url, - * retrying the request up to the specified number of retries. - * @param {Array} logs Array of logs to send. - * @param {Configuration} config configuration singleton. - * @param {Number} retries Maximum number of attempts to send the logs. - */ -// @todo expose config object to sendLogs replate url with config.url -function sendLogs(logs, config, retries) { - const data = JSON.stringify(logs); - if (config.websocketsEnabled) { - wsock.send(data); - } - else { - const req = new XMLHttpRequest(); - req.open("POST", config.url); - if (config.authHeader) { - req.setRequestHeader("Authorization", typeof config.authHeader === "function" - ? config.authHeader() - : config.authHeader); - } - req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); - if (config.headers) { - Object.entries(config.headers).forEach(([header, value]) => { - req.setRequestHeader(header, value); - }); - } - req.onreadystatechange = function () { - if (req.readyState === 4 && req.status !== 200) ; - }; - req.send(data); - } -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const config = Configuration.getInstance(); -const logs = []; -const startLoadTimestamp = Date.now(); -let endLoadTimestamp; -window.onload = function () { - endLoadTimestamp = Date.now(); -}; -let started = false; -let wsock; -config.update({ - useraleVersion: version$1, -}); -initPackager(logs, config); -getWebsocketsEnabled(config); -if (config.autostart) { - setup(config); -} -/** - * Hooks the global event listener, and starts up the - * logging interval. - * @param {Configuration} config Configuration settings for the logger - */ -function setup(config) { - if (!started) { - setTimeout(function () { - const state = document.readyState; - if (config.autostart && - (state === "interactive" || state === "complete")) { - attachHandlers(config); - initSender(logs, config); - started = config.on = true; - packageCustomLog({ - type: "load", - details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp }, - }, () => ({}), false); - } - else { - setup(config); - } - }, 100); - } -} -/** - * Checks to see if the specified backend URL supporsts Websockets - * and updates the config accordingly - */ -function getWebsocketsEnabled(config) { - wsock = new WebSocket(config.url.replace("http://", "ws://")); - wsock.onerror = () => { - console.log("no websockets detected"); - }; - wsock.onopen = () => { - console.log("connection established with websockets"); - config.websocketsEnabled = true; - }; - wsock.onclose = () => { - sendOnClose(logs, config); - }; -} -// Export the Userale API -const version = version$1; -/** - * Updates the current configuration - * object with the provided values. - * @param {Partial} newConfig The configuration options to use. - * @return {Settings.Config} Returns the updated configuration. - */ -function options(newConfig) { - if (newConfig) { - config.update(newConfig); - } - return config; -} -/** - * Appends a log to the log queue. - * @param {Logging.CustomLog} customLog The log to append. - * @return {boolean} Whether the operation succeeded. - */ -function log(customLog) { - if (customLog) { - logs.push(customLog); - return true; - } - else { - return false; - } -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* eslint-disable */ -// browser is defined in firefox, but chrome uses the 'chrome' global. -var browser = window.browser || chrome; -const configKey = "useraleConfigPayload"; -/* eslint-enable */ - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Initalize userale plugin options -const defaultConfig = { - useraleConfig: { - url: "http://localhost:8000", - userId: "pluginUser", - authHeader: null, - toolName: "useralePlugin", - toolVersion: version, - }, - pluginConfig: { - // Default to a regex that will match no string - urlWhitelist: "(?!x)x", - }, -}; -let urlWhitelist; -const tabToHttpSession = {}; -let browserSessionId = null; -/** - * Add log to UserALE buffer for sending to backend - * @param {any} message The message to send - * @return {void} - */ -function addLog(message) { - let log$1 = message.payload; - log$1.browserSessionId = browserSessionId; - // Apply url filter to logs generated outside the background page. - log$1 = filterUrl(log$1); - if (log$1) { - log(log$1); - } -} -/** - * add tab id to http session id mapping - * @param {any} message The message to send - * @param {browser.runtime.MessageSender} sender The sender of the message - * @return {void} - */ -function updateTabToHttpSessionMapping(message, sender) { - var _a; - if ((_a = sender.tab) === null || _a === void 0 ? void 0 : _a.id) { - tabToHttpSession[sender.tab.id] = message.payload; - } -} -/** - * Apply the extension config to both the background and content instances of userale - * @param {Extension.ConfigPayload} config The extension config to apply - * @return {void} - */ -function updateConfig(payload) { - urlWhitelist = new RegExp(payload.pluginConfig.urlWhitelist); - options(payload.useraleConfig); - browser.storage.local.set({ [configKey]: payload }); - dispatchTabMessage({ - type: messageTypes.CONFIG_CHANGE, - payload: payload.useraleConfig, - }); -} -/** - * Send a message to all tabs - * @param {any} message The message to send - * @return {void} - */ -function dispatchTabMessage(message) { - // @ts-expect-error Typescript is not aware that firefox's broswer is overloaded - // to support chromium style MV2 callbacks - browser.tabs.query({}, function (tabs) { - tabs.forEach(function (tab) { - if (!tab.id) - return; - browser.tabs.sendMessage(tab.id, message); - }); - }); -} -/** - * Send a message to the current tab - * @param {any} message The message to send - * @return {void} - */ -function messageCurrentTab(message) { - // @ts-expect-error Typescript is not aware that firefox's broswer is overloaded - // to support chromium style MV2 callbacks - browser.tabs.query({ active: true, currentWindow: true }, function (tabs) { - if (tabs.length > 0) { - const activeTab = tabs[0]; - browser.tabs.sendMessage(activeTab.id, message); - } - else { - console.error("No active tab found"); - } - }); -} -/** - * Callback for filtering out logs with urls that do not match the regex defined in extension options. - * @param {Logging.Log} log The candidate log - * @return {Object} The transformed log - */ -function filterUrl(log) { - if (urlWhitelist.test(log.pageUrl)) { - return log; - } - return false; -} -/** - * Callback for setting the session id's of tab logs to that of the target tab - * @param {Logging.Log} log The candidate log - * @return {Object} The transformed log - */ -function injectSessions(log) { - var _a; - const id = (_a = log.details) === null || _a === void 0 ? void 0 : _a.id; - if (id && id in tabToHttpSession) { - log.httpSessionId = tabToHttpSession[id]; - } - else { - log.httpSessionId = null; - } - log.browserSessionId = browserSessionId; - return log; -} -// @ts-expect-error Typescript is not aware that firefox's broswer is overloaded -// to support chromium style MV2 callbacks -browser.storage.local.get([configKey], (res) => { - if (res[configKey]) { - updateConfig(res[configKey]); - } - else { - updateConfig(defaultConfig); - } - // Apply url filter to logs generated by the background page. - addCallbacks({ filterUrl, injectSessions }); - const userAleHttpSessionId = window.sessionStorage.getItem("userAleHttpSessionId"); - browserSessionId = userAleHttpSessionId - ? JSON.parse(userAleHttpSessionId) - : null; -}); -browser.runtime.onMessage.addListener(function (message, sender) { - switch (message.type) { - case messageTypes.ADD_LOG: - addLog(message); - break; - case messageTypes.HTTP_SESSION: - updateTabToHttpSessionMapping(message, sender); - break; - case messageTypes.CONFIG_CHANGE: - updateConfig(message.payload); - break; - case messageTypes.ISSUE_REPORT: - messageCurrentTab(message); - break; - default: - console.log("got unknown message type ", message); - } -}); -/** - * Extract tab details then log a tab event - * @param {integer} tabId The id of the target tab - * @param {Logging.CustomLog} data The data of the tab event - * @param {String} type The type of tab event - * @return {undefined} - */ -function packageTabLog(tabId, data, type) { - // @ts-expect-error Typescript is not aware that firefox's broswer is overloaded - // to support chromium style MV2 callbacks - browser.tabs.get(tabId, (tab) => { - packageDetailedTabLog(tab, data, type); - }); -} -/** - * Log a tab event with tab details - * @param {browser.tabs.Tab} tab The target tab object - * @param {Logging.CustomLog} data The data of the tab event - * @param {String} type The type of tab event - * @return {undefined} - */ -function packageDetailedTabLog(tab, data, type) { - Object.assign(data, { type }); - // Two fields in the Tab interface do not match our serializable JSONObject interface - // remove them before create custom log - const restOfTab = __rest(tab, ["mutedInfo", "sharingState"]); - const payload = Object.assign({}, restOfTab); - packageCustomLog(data, () => { - return payload; - }, true); -} -// Attach Handlers for tab events -// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs -browser.tabs.onActivated.addListener((activeInfo) => { - // Adds needed string indexing signature to payload that to - // make it conform to the JSONObject interface - const payload = Object.assign({}, activeInfo); - packageTabLog(activeInfo.tabId, payload, "tabs.onActivated"); -}); -browser.tabs.onAttached.addListener((tabId, attachInfo) => { - const payload = Object.assign({}, attachInfo); - packageTabLog(tabId, payload, "tabs.onAttached"); -}); -browser.tabs.onCreated.addListener((tab) => { - packageDetailedTabLog(tab, {}, "tabs.onCreated"); -}); -browser.tabs.onDetached.addListener((tabId, detachInfo) => { - const payload = Object.assign({}, detachInfo); - packageTabLog(tabId, payload, "tabs.onDetached"); -}); -browser.tabs.onMoved.addListener((tabId, moveInfo) => { - const payload = Object.assign({}, moveInfo); - packageTabLog(tabId, payload, "tabs.onMoved"); -}); -browser.tabs.onRemoved.addListener((tabId, removeInfo) => { - const payload = Object.assign({}, removeInfo); - packageDetailedTabLog({ id: tabId }, payload, "tabs.onRemoved"); -}); -browser.tabs.onUpdated.addListener((_tabId, changeInfo, tab) => { - const restOfTab = __rest(changeInfo, ["mutedInfo", "sharingState"]); - const payload = Object.assign({}, restOfTab); - packageDetailedTabLog(tab, payload, "tabs.onUpdated"); -}); -browser.tabs.onZoomChange.addListener((ZoomChangeInfo) => { - const restOfTab = __rest(ZoomChangeInfo, ["zoomSettings"]); - const payload = Object.assign({}, restOfTab); - packageTabLog(ZoomChangeInfo.tabId, payload, "tabs.onZoomChange"); -}); diff --git a/products/userale/build/UserALEWebExtension/browserAction.html b/products/userale/build/UserALEWebExtension/browserAction.html deleted file mode 100644 index 7859efe..0000000 --- a/products/userale/build/UserALEWebExtension/browserAction.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - User ALE Web Extension - Options - - - - -

Logging Options

-
- - -
- - - -
- - - -
- - - -
- - - -
- - - -
- -
- -
-
-

Report an Issue

-
-
-
- -
-
- -
-
- -
-
- - diff --git a/products/userale/build/UserALEWebExtension/content.d.ts b/products/userale/build/UserALEWebExtension/content.d.ts deleted file mode 100644 index 70be523..0000000 --- a/products/userale/build/UserALEWebExtension/content.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export {}; diff --git a/products/userale/build/UserALEWebExtension/content.js b/products/userale/build/UserALEWebExtension/content.js deleted file mode 100644 index 618f302..0000000 --- a/products/userale/build/UserALEWebExtension/content.js +++ /dev/null @@ -1,1302 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var messageTypes; -(function (messageTypes) { - messageTypes["CONFIG_CHANGE"] = "USERALE_CONFIG_CHANGE"; - messageTypes["ADD_LOG"] = "USERALE_ADD_LOG"; - messageTypes["HTTP_SESSION"] = "USERALE_HTTP_SESSION"; - messageTypes["ISSUE_REPORT"] = "USERALE_ISSUE_REPORT"; -})(messageTypes || (messageTypes = {})); - -var version = "2.4.0"; - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the 'License'); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -let sessionId = null; -let httpSessionId = null; -/** - * Extracts the initial configuration settings from the - * currently executing script tag. - * @return {Object} The extracted configuration object - */ -function getInitialSettings() { - if (sessionId === null) { - sessionId = getsessionId("userAlesessionId", "session_" + String(Date.now())); - } - if (httpSessionId === null) { - httpSessionId = getsessionId("userAleHttpSessionId", generatehttpSessionId()); - } - const script = document.currentScript || - (function () { - const scripts = document.getElementsByTagName("script"); - return scripts[scripts.length - 1]; - })(); - const get = script - ? script.getAttribute.bind(script) - : function () { - return null; - }; - const headers = get("data-headers"); - const settings = { - authHeader: get("data-auth") || null, - autostart: get("data-autostart") === "false" ? false : true, - browserSessionId: null, - custIndex: get("data-index") || null, - headers: headers ? JSON.parse(headers) : null, - httpSessionId: httpSessionId, - logCountThreshold: +(get("data-threshold") || 5), - logDetails: get("data-log-details") === "true" ? true : false, - resolution: +(get("data-resolution") || 500), - sessionId: get("data-session") || sessionId, - time: timeStampScale(document.createEvent("CustomEvent")), - toolName: get("data-tool") || null, - toolVersion: get("data-version") || null, - transmitInterval: +(get("data-interval") || 5000), - url: get("data-url") || "http://localhost:8000", - useraleVersion: get("data-userale-version") || null, - userFromParams: get("data-user-from-params") || null, - userId: get("data-user") || null, - }; - return settings; -} -/** - * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in - * storage when script is started. This prevents events like 'submit', which refresh page data - * from refreshing the current user session - * - */ -function getsessionId(sessionKey, value) { - if (window.sessionStorage.getItem(sessionKey) === null) { - window.sessionStorage.setItem(sessionKey, JSON.stringify(value)); - return value; - } - return JSON.parse(window.sessionStorage.getItem(sessionKey) || ""); -} -/** - * Creates a function to normalize the timestamp of the provided event. - * @param {Event} e An event containing a timeStamp property. - * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function. - */ -function timeStampScale(e) { - let tsScaler; - if (e.timeStamp && e.timeStamp > 0) { - const delta = Date.now() - e.timeStamp; - /** - * Returns a timestamp depending on various browser quirks. - * @param {?Number} ts A timestamp to use for normalization. - * @return {Number} A normalized timestamp. - */ - if (delta < 0) { - tsScaler = function () { - return e.timeStamp / 1000; - }; - } - else if (delta > e.timeStamp) { - const navStart = performance.timeOrigin; - tsScaler = function (ts) { - return ts + navStart; - }; - } - else { - tsScaler = function (ts) { - return ts; - }; - } - } - else { - tsScaler = function () { - return Date.now(); - }; - } - return tsScaler; -} -/** - * Creates a cryptographiclly random string to represent this http session. - * @return {String} A random 32 digit hex string - */ -function generatehttpSessionId() { - // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison - const len = 32; - const arr = new Uint8Array(len / 2); - window.crypto.getRandomValues(arr); - return Array.from(arr, (dec) => { - return dec.toString(16).padStart(2, "0"); - }).join(""); -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Singleton Configuration class -class Configuration { - // Private constructor to prevent external instantiation - constructor() { - // Public properties corresponding to fields in the Config interface - this.autostart = false; - this.authHeader = null; - this.browserSessionId = null; - this.custIndex = null; - this.headers = null; - this.httpSessionId = null; - this.logCountThreshold = 0; - this.logDetails = false; - this.on = false; - this.resolution = 0; - this.sessionId = null; - this.time = () => Date.now(); - this.toolName = null; - this.toolVersion = null; - this.transmitInterval = 0; - this.url = ""; - this.userFromParams = null; - this.useraleVersion = null; - this.userId = null; - this.version = null; - this.websocketsEnabled = false; - // Call the initialization method only if it's the first time instantiating - if (Configuration.instance === null) { - this.initialize(); - } - } - // Static method to get the singleton instance - static getInstance() { - if (Configuration.instance === null) { - Configuration.instance = new Configuration(); - } - return Configuration.instance; - } - initialize() { - const settings = getInitialSettings(); - this.update(settings); - } - /** - * Resets the configuration to its initial state. - */ - reset() { - this.initialize(); - } - /** - * Shallow merges a newConfig with the configuration class, updating it. - * Retrieves/updates the userid if userFromParams is provided. - * @param {Partial} newConfig Configuration object to merge into the current config. - */ - update(newConfig) { - Object.keys(newConfig).forEach((option) => { - if (option === "userFromParams") { - const userParamString = newConfig[option]; - const userId = userParamString - ? Configuration.getUserIdFromParams(userParamString) - : null; - if (userId) { - this["userId"] = userId; - } - } - const hasNewUserFromParams = newConfig["userFromParams"]; - const willNullifyUserId = option === "userId" && newConfig[option] === null; - if (willNullifyUserId && hasNewUserFromParams) { - return; - } - const newOption = newConfig[option]; - if (newOption !== undefined) { - this[option] = newOption; - } - }); - } - /** - * Attempts to extract the userid from the query parameters of the URL. - * @param {string} param The name of the query parameter containing the userid. - * @return {string | null} The extracted/decoded userid, or null if none is found. - */ - static getUserIdFromParams(param) { - const userField = param; - const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); - const results = window.location.href.match(regex); - if (results && results[2]) { - return decodeURIComponent(results[2].replace(/\+/g, " ")); - } - return null; - } -} -// Private static property to hold the singleton instance -Configuration.instance = null; - -var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var BrowserInfo = /** @class */ (function () { - function BrowserInfo(name, version, os) { - this.name = name; - this.version = version; - this.os = os; - this.type = 'browser'; - } - return BrowserInfo; -}()); -var NodeInfo = /** @class */ (function () { - function NodeInfo(version) { - this.version = version; - this.type = 'node'; - this.name = 'node'; - this.os = process.platform; - } - return NodeInfo; -}()); -var SearchBotDeviceInfo = /** @class */ (function () { - function SearchBotDeviceInfo(name, version, os, bot) { - this.name = name; - this.version = version; - this.os = os; - this.bot = bot; - this.type = 'bot-device'; - } - return SearchBotDeviceInfo; -}()); -var BotInfo = /** @class */ (function () { - function BotInfo() { - this.type = 'bot'; - this.bot = true; // NOTE: deprecated test name instead - this.name = 'bot'; - this.version = null; - this.os = null; - } - return BotInfo; -}()); -var ReactNativeInfo = /** @class */ (function () { - function ReactNativeInfo() { - this.type = 'react-native'; - this.name = 'react-native'; - this.version = null; - this.os = null; - } - return ReactNativeInfo; -}()); -// tslint:disable-next-line:max-line-length -var SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/; -var SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/; -var REQUIRED_VERSION_PARTS = 3; -var userAgentRules = [ - ['aol', /AOLShield\/([0-9\._]+)/], - ['edge', /Edge\/([0-9\._]+)/], - ['edge-ios', /EdgiOS\/([0-9\._]+)/], - ['yandexbrowser', /YaBrowser\/([0-9\._]+)/], - ['kakaotalk', /KAKAOTALK\s([0-9\.]+)/], - ['samsung', /SamsungBrowser\/([0-9\.]+)/], - ['silk', /\bSilk\/([0-9._-]+)\b/], - ['miui', /MiuiBrowser\/([0-9\.]+)$/], - ['beaker', /BeakerBrowser\/([0-9\.]+)/], - ['edge-chromium', /EdgA?\/([0-9\.]+)/], - [ - 'chromium-webview', - /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/, - ], - ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], - ['phantomjs', /PhantomJS\/([0-9\.]+)(:?\s|$)/], - ['crios', /CriOS\/([0-9\.]+)(:?\s|$)/], - ['firefox', /Firefox\/([0-9\.]+)(?:\s|$)/], - ['fxios', /FxiOS\/([0-9\.]+)/], - ['opera-mini', /Opera Mini.*Version\/([0-9\.]+)/], - ['opera', /Opera\/([0-9\.]+)(?:\s|$)/], - ['opera', /OPR\/([0-9\.]+)(:?\s|$)/], - ['pie', /^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/], - ['pie', /^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/], - ['netfront', /^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/], - ['ie', /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/], - ['ie', /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/], - ['ie', /MSIE\s(7\.0)/], - ['bb10', /BB10;\sTouch.*Version\/([0-9\.]+)/], - ['android', /Android\s([0-9\.]+)/], - ['ios', /Version\/([0-9\._]+).*Mobile.*Safari.*/], - ['safari', /Version\/([0-9\._]+).*Safari/], - ['facebook', /FB[AS]V\/([0-9\.]+)/], - ['instagram', /Instagram\s([0-9\.]+)/], - ['ios-webview', /AppleWebKit\/([0-9\.]+).*Mobile/], - ['ios-webview', /AppleWebKit\/([0-9\.]+).*Gecko\)$/], - ['curl', /^curl\/([0-9\.]+)$/], - ['searchbot', SEARCHBOX_UA_REGEX], -]; -var operatingSystemRules = [ - ['iOS', /iP(hone|od|ad)/], - ['Android OS', /Android/], - ['BlackBerry OS', /BlackBerry|BB10/], - ['Windows Mobile', /IEMobile/], - ['Amazon OS', /Kindle/], - ['Windows 3.11', /Win16/], - ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/], - ['Windows 98', /(Windows 98)|(Win98)/], - ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/], - ['Windows XP', /(Windows NT 5.1)|(Windows XP)/], - ['Windows Server 2003', /(Windows NT 5.2)/], - ['Windows Vista', /(Windows NT 6.0)/], - ['Windows 7', /(Windows NT 6.1)/], - ['Windows 8', /(Windows NT 6.2)/], - ['Windows 8.1', /(Windows NT 6.3)/], - ['Windows 10', /(Windows NT 10.0)/], - ['Windows ME', /Windows ME/], - ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/], - ['Open BSD', /OpenBSD/], - ['Sun OS', /SunOS/], - ['Chrome OS', /CrOS/], - ['Linux', /(Linux)|(X11)/], - ['Mac OS', /(Mac_PowerPC)|(Macintosh)/], - ['QNX', /QNX/], - ['BeOS', /BeOS/], - ['OS/2', /OS\/2/], -]; -function detect(userAgent) { - if (typeof document === 'undefined' && - typeof navigator !== 'undefined' && - navigator.product === 'ReactNative') { - return new ReactNativeInfo(); - } - if (typeof navigator !== 'undefined') { - return parseUserAgent(navigator.userAgent); - } - return getNodeVersion(); -} -function matchUserAgent(ua) { - // opted for using reduce here rather than Array#first with a regex.test call - // this is primarily because using the reduce we only perform the regex - // execution once rather than once for the test and for the exec again below - // probably something that needs to be benchmarked though - return (ua !== '' && - userAgentRules.reduce(function (matched, _a) { - var browser = _a[0], regex = _a[1]; - if (matched) { - return matched; - } - var uaMatch = regex.exec(ua); - return !!uaMatch && [browser, uaMatch]; - }, false)); -} -function parseUserAgent(ua) { - var matchedRule = matchUserAgent(ua); - if (!matchedRule) { - return null; - } - var name = matchedRule[0], match = matchedRule[1]; - if (name === 'searchbot') { - return new BotInfo(); - } - // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split) - var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3); - if (versionParts) { - if (versionParts.length < REQUIRED_VERSION_PARTS) { - versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true); - } - } - else { - versionParts = []; - } - var version = versionParts.join('.'); - var os = detectOS(ua); - var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua); - if (searchBotMatch && searchBotMatch[1]) { - return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]); - } - return new BrowserInfo(name, version, os); -} -function detectOS(ua) { - for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) { - var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1]; - var match = regex.exec(ua); - if (match) { - return os; - } - } - return null; -} -function getNodeVersion() { - var isNode = typeof process !== 'undefined' && process.version; - return isNode ? new NodeInfo(process.version.slice(1)) : null; -} -function createVersionParts(count) { - var output = []; - for (var ii = 0; ii < count; ii++) { - output.push('0'); - } - return output; -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const browserInfo = detect(); -let logs$1; -let config$1; -// Interval Logging Globals -let intervalId; -let intervalType; -let intervalPath; -let intervalTimer; -let intervalCounter; -let intervalLog; -const filterHandler = null; -const mapHandler = null; -let cbHandlers = {}; -/** - * Adds named callbacks to be executed when logging. - * @param {Object } newCallbacks An object containing named callback functions. - */ -function addCallbacks(...newCallbacks) { - newCallbacks.forEach((source) => { - let descriptors = {}; - descriptors = Object.keys(source).reduce((descriptors, key) => { - descriptors[key] = Object.getOwnPropertyDescriptor(source, key); - return descriptors; - }, descriptors); - Object.getOwnPropertySymbols(source).forEach((sym) => { - const descriptor = Object.getOwnPropertyDescriptor(source, sym); - if (descriptor === null || descriptor === void 0 ? void 0 : descriptor.enumerable) { - descriptors[sym] = descriptor; - } - }); - Object.defineProperties(cbHandlers, descriptors); - }); - return cbHandlers; -} -/** - * Assigns the config and log container to be used by the logging functions. - * @param {Array} newLogs Log container. - * @param {Object} newConfig Configuration to use while logging. - */ -function initPackager(newLogs, newConfig) { - logs$1 = newLogs; - config$1 = newConfig; - cbHandlers = {}; - intervalId = null; - intervalType = null; - intervalPath = null; - intervalTimer = null; - intervalCounter = 0; - intervalLog = null; -} -/** - * Transforms the provided HTML event into a log and appends it to the log queue. - * @param {Event} e The event to be logged. - * @param {Function} detailFcn The function to extract additional log parameters from the event. - * @return {boolean} Whether the event was logged. - */ -function packageLog(e, detailFcn) { - if (!config$1.on) { - return false; - } - let details = null; - if (detailFcn) { - details = detailFcn(e); - } - const timeFields = extractTimeFields(e.timeStamp && e.timeStamp > 0 ? config$1.time(e.timeStamp) : Date.now()); - let log = { - target: e.target ? getSelector(e.target) : null, - path: buildPath(e), - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: timeFields.milli, - microTime: timeFields.micro, - location: getLocation(e), - scrnRes: getScreenRes(), - type: e.type, - logType: "raw", - userAction: true, - details: details, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - attributes: buildAttrs(e), - style: buildCSS(e), - }; - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, e); - if (!log) { - return false; - } - } - } - logs$1.push(log); - return true; -} -/** - * Packages the provided customLog to include standard meta data and appends it to the log queue. - * @param {Logging.CustomLog} customLog The behavior to be logged. - * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. - * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) - * @return {boolean} Whether the event was logged. - */ -function packageCustomLog(customLog, detailFcn, userAction) { - if (!config$1.on) { - return false; - } - let details = null; - if (detailFcn.length === 0) { - // In the case of a union, the type checker will default to the more stringent - // type, i.e. the DetailFunction that expects an argument for safety purposes. - // To avoid this, we must explicitly check the type by asserting it receives - // no arguments (detailFcn.length === 0) and then cast it to the - // StaticDetailFunction type. - const staticDetailFcn = detailFcn; - details = staticDetailFcn(); - } - const metaData = { - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: Date.now(), - scrnRes: getScreenRes(), - logType: "custom", - userAction: userAction, - details: details, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - }; - let log = Object.assign(metaData, customLog); - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, null); - if (!log) { - return false; - } - } - } - logs$1.push(log); - return true; -} -/** - * Extract the millisecond and microsecond portions of a timestamp. - * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields. - * @return {Object} An object containing the millisecond - * and microsecond portions of the timestamp. - */ -function extractTimeFields(timeStamp) { - return { - milli: Math.floor(timeStamp), - micro: Number((timeStamp % 1).toFixed(3)), - }; -} -/** - * Track intervals and gather details about it. - * @param {Object} e - * @return boolean - */ -function packageIntervalLog(e) { - try { - const target = e.target ? getSelector(e.target) : null; - const path = buildPath(e); - const type = e.type; - const timestamp = Math.floor(e.timeStamp && e.timeStamp > 0 ? config$1.time(e.timeStamp) : Date.now()); - // Init - this should only happen once on initialization - if (intervalId == null) { - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - if ((intervalId !== target || intervalType !== type) && intervalTimer) { - // When to create log? On transition end - // @todo Possible for intervalLog to not be pushed in the event the interval never ends... - intervalLog = { - target: intervalId, - path: intervalPath, - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - count: intervalCounter, - duration: timestamp - intervalTimer, // microseconds - startTime: intervalTimer, - endTime: timestamp, - type: intervalType, - logType: "interval", - targetChange: intervalId !== target, - typeChange: intervalType !== type, - userAction: false, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - }; - if (typeof filterHandler === "function" && !filterHandler(intervalLog)) ; - if (typeof mapHandler === "function") ; - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - intervalLog = func(intervalLog, null); - if (!intervalLog) { - return false; - } - } - } - if (intervalLog) - logs$1.push(intervalLog); - // Reset - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - // Interval is still occuring, just update counter - if (intervalId == target && intervalType == type && intervalCounter) { - intervalCounter = intervalCounter + 1; - } - return true; - } - catch (_a) { - return false; - } -} -/** - * Extracts coordinate information from the event - * depending on a few browser quirks. - * @param {Event} e The event to extract coordinate information from. - * @return {Object} An object containing nullable x and y coordinates for the event. - */ -function getLocation(e) { - if (e instanceof MouseEvent) { - if (e.pageX != null) { - return { x: e.pageX, y: e.pageY }; - } - else if (e.clientX != null) { - return { - x: document.documentElement.scrollLeft + e.clientX, - y: document.documentElement.scrollTop + e.clientY, - }; - } - } - else { - return { x: null, y: null }; - } -} -/** - * Extracts innerWidth and innerHeight to provide estimates of screen resolution - * @return {Object} An object containing the innerWidth and InnerHeight - */ -function getScreenRes() { - return { width: window.innerWidth, height: window.innerHeight }; -} -/** - * Builds a string CSS selector from the provided element - * @param {EventTarget} ele The element from which the selector is built. - * @return {string} The CSS selector for the element, or Unknown if it can't be determined. - */ -function getSelector(ele) { - if (ele instanceof HTMLElement || ele instanceof Element) { - if (ele.localName) { - return (ele.localName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "")); - } - else if (ele.nodeName) { - return (ele.nodeName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "")); - } - } - else if (ele instanceof Document) { - return "#document"; - } - else if (ele === globalThis) { - return "Window"; - } - return "Unknown"; -} -/** - * Builds an array of elements from the provided event target, to the root element. - * @param {Event} e Event from which the path should be built. - * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. - */ -function buildPath(e) { - const path = e.composedPath(); - return selectorizePath(path); -} -/** - * Builds a CSS selector path from the provided list of elements. - * @param {EventTarget[]} path Array of HTML Elements from which the path should be built. - * @return {string[]} Array of string CSS selectors. - */ -function selectorizePath(path) { - let i = 0; - let pathEle; - const pathSelectors = []; - while ((pathEle = path[i])) { - pathSelectors.push(getSelector(pathEle)); - ++i; - pathEle = path[i]; - } - return pathSelectors; -} -function detectBrowser() { - return { - browser: browserInfo ? browserInfo.name : "", - version: browserInfo ? browserInfo.version : "", - }; -} -/** - * Builds an object containing attributes of an element. - * Attempts to parse all attribute values as JSON text. - * @param {Event} e Event from which the target element's attributes should be extracted. - * @return {Record} Object with element attributes as key-value pairs. - */ -function buildAttrs(e) { - const attributes = {}; - const attributeBlackList = ["style"]; - if (e.target && e.target instanceof Element) { - for (const attr of e.target.attributes) { - if (attributeBlackList.includes(attr.name)) - continue; - let val = attr.value; - try { - val = JSON.parse(val); - } - catch (error) { - // Ignore parsing errors, fallback to raw string value - } - attributes[attr.name] = val; - } - } - return attributes; -} -/** - * Builds an object containing all CSS properties of an element. - * @param {Event} e Event from which the target element's properties should be extracted. - * @return {Record} Object with all CSS properties as key-value pairs. - */ -function buildCSS(e) { - const properties = {}; - if (e.target && e.target instanceof HTMLElement) { - const styleObj = e.target.style; - for (let i = 0; i < styleObj.length; i++) { - const prop = styleObj[i]; - properties[prop] = styleObj.getPropertyValue(prop); - } - } - return properties; -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -//@todo: Investigate drag events and their behavior -let events; -let bufferBools; -let bufferedEvents; -let refreshEvents; -const intervalEvents = [ - "click", - "focus", - "blur", - "input", - "change", - "mouseover", - "submit", -]; -const windowEvents = ["load", "blur", "focus"]; -/** - * Maps a MouseEvent to an object containing useful information. - * @param {MouseEvent} e Event to extract data from - */ -function extractMouseDetails(e) { - return { - clicks: e.detail, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey, - // 'text' : e.target.innerHTML - }; -} -/** Maps a KeyboardEvent to an object containing useful infromation - * @param {KeyboardEvent} e Event to extract data from - */ -function extractKeyboardDetails(e) { - return { - key: e.key, - code: e.code, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey, - }; -} -/** - * Maps a ChangeEvent to an object containing useful information. - * @param {Events.ChangeEvent} e Event to extract data from - */ -function extractChangeDetails(e) { - return { - value: e.target.value, - }; -} -/** - * Maps a WheelEvent to an object containing useful information. - * @param {WheelEvent} e Event to extract data from - */ -function extractWheelDetails(e) { - return { - x: e.deltaX, - y: e.deltaY, - z: e.deltaZ, - }; -} -/** - * Maps a ScrollEvent to an object containing useful information. - */ -function extractScrollDetails() { - return { - x: window.scrollX, - y: window.scrollY, - }; -} -/** - * Maps a ResizeEvent to an object containing useful information. - */ -function extractResizeDetails() { - return { - width: window.outerWidth, - height: window.outerHeight, - }; -} -/** - * Defines the way information is extracted from various events. - * Also defines which events we will listen to. - * @param {Settings.Config} config Configuration object to read from. - */ -function defineDetails(config) { - // Events list - // Keys are event types - // Values are functions that return details object if applicable - events = { - click: extractMouseDetails, - dblclick: extractMouseDetails, - mousedown: extractMouseDetails, - mouseup: extractMouseDetails, - focus: null, - blur: null, - input: config.logDetails ? extractKeyboardDetails : null, - change: config.logDetails ? extractChangeDetails : null, - dragstart: null, - dragend: null, - drag: null, - drop: null, - keydown: config.logDetails ? extractKeyboardDetails : null, - mouseover: null, - }; - bufferBools = {}; - bufferedEvents = { - wheel: extractWheelDetails, - scroll: extractScrollDetails, - resize: extractResizeDetails, - }; - refreshEvents = { - submit: null, - }; -} -/** - * Hooks the event handlers for each event type of interest. - * @param {Configuration} config Configuration singleton to use. - * @return {boolean} Whether the operation succeeded - */ -function attachHandlers(config) { - try { - defineDetails(config); - Object.keys(events).forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageLog(e, events[ev]); - }, true); - }); - intervalEvents.forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageIntervalLog(e); - }, true); - }); - Object.keys(bufferedEvents).forEach(function (ev) { - bufferBools[ev] = true; - window.addEventListener(ev, function (e) { - if (bufferBools[ev]) { - bufferBools[ev] = false; - packageLog(e, bufferedEvents[ev]); - setTimeout(function () { - bufferBools[ev] = true; - }, config.resolution); - } - }, true); - }); - Object.keys(refreshEvents).forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageLog(e, events[ev]); - }, true); - }); - windowEvents.forEach(function (ev) { - window.addEventListener(ev, function (e) { - packageLog(e, function () { - return { window: true }; - }); - }, true); - }); - return true; - } - catch (_a) { - return false; - } -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -let sendIntervalId; -/** - * Initializes the log queue processors. - * @param {Array} logs Array of logs to append to. - * @param {Configuration} config Configuration object to use when logging. - */ -function initSender(logs, config) { - if (sendIntervalId) { - clearInterval(sendIntervalId); - } - sendIntervalId = sendOnInterval(logs, config); - sendOnClose(logs, config); -} -/** - * Checks the provided log array on an interval, flushing the logs - * if the queue has reached the threshold specified by the provided config. - * @param {Array} logs Array of logs to read from. - * @param {Configuration} config Configuration singleton to be read from. - * @return {Number} The newly created interval id. - */ -function sendOnInterval(logs, config) { - return setInterval(function () { - if (!config.on) { - return; - } - if (logs.length >= config.logCountThreshold) { - sendLogs(logs.slice(0), config); // Send a copy - logs.splice(0); // Clear array reference (no reassignment) - } - }, config.transmitInterval); -} -/** - * Attempts to flush the remaining logs when the window is closed. - * @param {Array} logs Array of logs to be flushed. - * @param {Configuration} config Configuration singleton to be read from. - */ -function sendOnClose(logs, config) { - window.addEventListener("pagehide", function () { - if (!config.on) { - return; - } - if (logs.length > 0) { - if (config.websocketsEnabled) { - const data = JSON.stringify(logs); - wsock.send(data); - } - else { - const headers = new Headers(); - headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); - if (config.authHeader) { - headers.set("Authorization", config.authHeader.toString()); - } - fetch(config.url, { - keepalive: true, - method: "POST", - headers: headers, - body: JSON.stringify(logs), - }).catch((error) => { - console.error(error); - }); - } - logs.splice(0); // clear log queue - } - }); -} -/** - * Sends the provided array of logs to the specified url, - * retrying the request up to the specified number of retries. - * @param {Array} logs Array of logs to send. - * @param {Configuration} config configuration singleton. - * @param {Number} retries Maximum number of attempts to send the logs. - */ -// @todo expose config object to sendLogs replate url with config.url -function sendLogs(logs, config, retries) { - const data = JSON.stringify(logs); - if (config.websocketsEnabled) { - wsock.send(data); - } - else { - const req = new XMLHttpRequest(); - req.open("POST", config.url); - if (config.authHeader) { - req.setRequestHeader("Authorization", typeof config.authHeader === "function" - ? config.authHeader() - : config.authHeader); - } - req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); - if (config.headers) { - Object.entries(config.headers).forEach(([header, value]) => { - req.setRequestHeader(header, value); - }); - } - req.onreadystatechange = function () { - if (req.readyState === 4 && req.status !== 200) ; - }; - req.send(data); - } -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const config = Configuration.getInstance(); -const logs = []; -const startLoadTimestamp = Date.now(); -let endLoadTimestamp; -window.onload = function () { - endLoadTimestamp = Date.now(); -}; -let started = false; -let wsock; -config.update({ - useraleVersion: version, -}); -initPackager(logs, config); -getWebsocketsEnabled(config); -if (config.autostart) { - setup(config); -} -/** - * Hooks the global event listener, and starts up the - * logging interval. - * @param {Configuration} config Configuration settings for the logger - */ -function setup(config) { - if (!started) { - setTimeout(function () { - const state = document.readyState; - if (config.autostart && - (state === "interactive" || state === "complete")) { - attachHandlers(config); - initSender(logs, config); - started = config.on = true; - packageCustomLog({ - type: "load", - details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp }, - }, () => ({}), false); - } - else { - setup(config); - } - }, 100); - } -} -/** - * Checks to see if the specified backend URL supporsts Websockets - * and updates the config accordingly - */ -function getWebsocketsEnabled(config) { - wsock = new WebSocket(config.url.replace("http://", "ws://")); - wsock.onerror = () => { - console.log("no websockets detected"); - }; - wsock.onopen = () => { - console.log("connection established with websockets"); - config.websocketsEnabled = true; - }; - wsock.onclose = () => { - sendOnClose(logs, config); - }; -} -/** - * Updates the current configuration - * object with the provided values. - * @param {Partial} newConfig The configuration options to use. - * @return {Settings.Config} Returns the updated configuration. - */ -function options(newConfig) { - if (newConfig) { - config.update(newConfig); - } - return config; -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* eslint-disable */ -// browser is defined in firefox, but chrome uses the 'chrome' global. -var browser = window.browser || chrome; -const configKey = "useraleConfigPayload"; -function rerouteLog(log) { - browser.runtime.sendMessage({ type: messageTypes.ADD_LOG, payload: log }); - return false; -} -/* eslint-enable */ - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -browser.storage.local.get([configKey], -// @ts-expect-error Typescript is not aware that firefox's broswer is overloaded -// to support chromium style MV2 callbacks -(res) => { - options(res[configKey].useraleConfig); - addCallbacks({ rerouteLog }); - // Send httpSession to background scirpt to inject into tab events. - const userAleHttpSessionId = window.sessionStorage.getItem("userAleHttpSessionId"); - if (userAleHttpSessionId) { - browser.runtime.sendMessage({ - type: messageTypes.HTTP_SESSION, - payload: JSON.parse(userAleHttpSessionId), - }); - } -}); -// TODO: Add types for message -browser.runtime.onMessage.addListener(function (message, sender) { - if (message.type === messageTypes.CONFIG_CHANGE) { - options(message.payload); - } - else if (message.type === messageTypes.ISSUE_REPORT) { - if (window.top === window) { - packageCustomLog(message.payload, () => { - return {}; - }, true); - } - } -}); diff --git a/products/userale/build/UserALEWebExtension/globals.d.ts b/products/userale/build/UserALEWebExtension/globals.d.ts deleted file mode 100644 index 9529282..0000000 --- a/products/userale/build/UserALEWebExtension/globals.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/// -import type { Logging } from "@/types"; -export declare var browser: typeof globalThis.browser; -export declare const configKey = "useraleConfigPayload"; -export declare function rerouteLog(log: Logging.Log): boolean; diff --git a/products/userale/build/UserALEWebExtension/manifest.json b/products/userale/build/UserALEWebExtension/manifest.json deleted file mode 100644 index b7fef77..0000000 --- a/products/userale/build/UserALEWebExtension/manifest.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "manifest_version": 2, - "name": "User ALE Extension", - "version": "2.4.0", - "description": "Injects UserALE into every page for testing & user research purposes", - "icons": { - "48": "icons/UserALE Logo.png" - }, - "permissions": ["activeTab", "storage", "tabs", ""], - "background": { - "scripts": ["background.js"] - }, - "content_scripts": [ - { - "matches": [""], - "js": ["content.js"], - "all_frames": true - } - ], - "options_ui": { - "page": "options.html" - }, - "browser_action": { - "default_popup": "browserAction.html" - } -} diff --git a/products/userale/build/UserALEWebExtension/messageTypes.d.ts b/products/userale/build/UserALEWebExtension/messageTypes.d.ts deleted file mode 100644 index 9abc5a8..0000000 --- a/products/userale/build/UserALEWebExtension/messageTypes.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export declare enum messageTypes { - CONFIG_CHANGE = "USERALE_CONFIG_CHANGE", - ADD_LOG = "USERALE_ADD_LOG", - HTTP_SESSION = "USERALE_HTTP_SESSION", - ISSUE_REPORT = "USERALE_ISSUE_REPORT" -} diff --git a/products/userale/build/UserALEWebExtension/options.d.ts b/products/userale/build/UserALEWebExtension/options.d.ts deleted file mode 100644 index 70be523..0000000 --- a/products/userale/build/UserALEWebExtension/options.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export {}; diff --git a/products/userale/build/UserALEWebExtension/options.html b/products/userale/build/UserALEWebExtension/options.html deleted file mode 100644 index e985761..0000000 --- a/products/userale/build/UserALEWebExtension/options.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - User ALE Web Extension - Options - - - - -

Logging Options

-
- - -
- - - -
- - - -
- - - -
- - - -
- - - -
- -
- -
-
- - diff --git a/products/userale/build/UserALEWebExtension/options.js b/products/userale/build/UserALEWebExtension/options.js deleted file mode 100644 index 5700410..0000000 --- a/products/userale/build/UserALEWebExtension/options.js +++ /dev/null @@ -1,1350 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var messageTypes; -(function (messageTypes) { - messageTypes["CONFIG_CHANGE"] = "USERALE_CONFIG_CHANGE"; - messageTypes["ADD_LOG"] = "USERALE_ADD_LOG"; - messageTypes["HTTP_SESSION"] = "USERALE_HTTP_SESSION"; - messageTypes["ISSUE_REPORT"] = "USERALE_ISSUE_REPORT"; -})(messageTypes || (messageTypes = {})); - -var version = "2.4.0"; - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the 'License'); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -let sessionId = null; -let httpSessionId = null; -/** - * Extracts the initial configuration settings from the - * currently executing script tag. - * @return {Object} The extracted configuration object - */ -function getInitialSettings() { - if (sessionId === null) { - sessionId = getsessionId("userAlesessionId", "session_" + String(Date.now())); - } - if (httpSessionId === null) { - httpSessionId = getsessionId("userAleHttpSessionId", generatehttpSessionId()); - } - const script = document.currentScript || - (function () { - const scripts = document.getElementsByTagName("script"); - return scripts[scripts.length - 1]; - })(); - const get = script - ? script.getAttribute.bind(script) - : function () { - return null; - }; - const headers = get("data-headers"); - const settings = { - authHeader: get("data-auth") || null, - autostart: get("data-autostart") === "false" ? false : true, - browserSessionId: null, - custIndex: get("data-index") || null, - headers: headers ? JSON.parse(headers) : null, - httpSessionId: httpSessionId, - logCountThreshold: +(get("data-threshold") || 5), - logDetails: get("data-log-details") === "true" ? true : false, - resolution: +(get("data-resolution") || 500), - sessionId: get("data-session") || sessionId, - time: timeStampScale(document.createEvent("CustomEvent")), - toolName: get("data-tool") || null, - toolVersion: get("data-version") || null, - transmitInterval: +(get("data-interval") || 5000), - url: get("data-url") || "http://localhost:8000", - useraleVersion: get("data-userale-version") || null, - userFromParams: get("data-user-from-params") || null, - userId: get("data-user") || null, - }; - return settings; -} -/** - * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in - * storage when script is started. This prevents events like 'submit', which refresh page data - * from refreshing the current user session - * - */ -function getsessionId(sessionKey, value) { - if (window.sessionStorage.getItem(sessionKey) === null) { - window.sessionStorage.setItem(sessionKey, JSON.stringify(value)); - return value; - } - return JSON.parse(window.sessionStorage.getItem(sessionKey) || ""); -} -/** - * Creates a function to normalize the timestamp of the provided event. - * @param {Event} e An event containing a timeStamp property. - * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function. - */ -function timeStampScale(e) { - let tsScaler; - if (e.timeStamp && e.timeStamp > 0) { - const delta = Date.now() - e.timeStamp; - /** - * Returns a timestamp depending on various browser quirks. - * @param {?Number} ts A timestamp to use for normalization. - * @return {Number} A normalized timestamp. - */ - if (delta < 0) { - tsScaler = function () { - return e.timeStamp / 1000; - }; - } - else if (delta > e.timeStamp) { - const navStart = performance.timeOrigin; - tsScaler = function (ts) { - return ts + navStart; - }; - } - else { - tsScaler = function (ts) { - return ts; - }; - } - } - else { - tsScaler = function () { - return Date.now(); - }; - } - return tsScaler; -} -/** - * Creates a cryptographiclly random string to represent this http session. - * @return {String} A random 32 digit hex string - */ -function generatehttpSessionId() { - // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison - const len = 32; - const arr = new Uint8Array(len / 2); - window.crypto.getRandomValues(arr); - return Array.from(arr, (dec) => { - return dec.toString(16).padStart(2, "0"); - }).join(""); -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Singleton Configuration class -class Configuration { - // Private constructor to prevent external instantiation - constructor() { - // Public properties corresponding to fields in the Config interface - this.autostart = false; - this.authHeader = null; - this.browserSessionId = null; - this.custIndex = null; - this.headers = null; - this.httpSessionId = null; - this.logCountThreshold = 0; - this.logDetails = false; - this.on = false; - this.resolution = 0; - this.sessionId = null; - this.time = () => Date.now(); - this.toolName = null; - this.toolVersion = null; - this.transmitInterval = 0; - this.url = ""; - this.userFromParams = null; - this.useraleVersion = null; - this.userId = null; - this.version = null; - this.websocketsEnabled = false; - // Call the initialization method only if it's the first time instantiating - if (Configuration.instance === null) { - this.initialize(); - } - } - // Static method to get the singleton instance - static getInstance() { - if (Configuration.instance === null) { - Configuration.instance = new Configuration(); - } - return Configuration.instance; - } - initialize() { - const settings = getInitialSettings(); - this.update(settings); - } - /** - * Resets the configuration to its initial state. - */ - reset() { - this.initialize(); - } - /** - * Shallow merges a newConfig with the configuration class, updating it. - * Retrieves/updates the userid if userFromParams is provided. - * @param {Partial} newConfig Configuration object to merge into the current config. - */ - update(newConfig) { - Object.keys(newConfig).forEach((option) => { - if (option === "userFromParams") { - const userParamString = newConfig[option]; - const userId = userParamString - ? Configuration.getUserIdFromParams(userParamString) - : null; - if (userId) { - this["userId"] = userId; - } - } - const hasNewUserFromParams = newConfig["userFromParams"]; - const willNullifyUserId = option === "userId" && newConfig[option] === null; - if (willNullifyUserId && hasNewUserFromParams) { - return; - } - const newOption = newConfig[option]; - if (newOption !== undefined) { - this[option] = newOption; - } - }); - } - /** - * Attempts to extract the userid from the query parameters of the URL. - * @param {string} param The name of the query parameter containing the userid. - * @return {string | null} The extracted/decoded userid, or null if none is found. - */ - static getUserIdFromParams(param) { - const userField = param; - const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); - const results = window.location.href.match(regex); - if (results && results[2]) { - return decodeURIComponent(results[2].replace(/\+/g, " ")); - } - return null; - } -} -// Private static property to hold the singleton instance -Configuration.instance = null; - -var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var BrowserInfo = /** @class */ (function () { - function BrowserInfo(name, version, os) { - this.name = name; - this.version = version; - this.os = os; - this.type = 'browser'; - } - return BrowserInfo; -}()); -var NodeInfo = /** @class */ (function () { - function NodeInfo(version) { - this.version = version; - this.type = 'node'; - this.name = 'node'; - this.os = process.platform; - } - return NodeInfo; -}()); -var SearchBotDeviceInfo = /** @class */ (function () { - function SearchBotDeviceInfo(name, version, os, bot) { - this.name = name; - this.version = version; - this.os = os; - this.bot = bot; - this.type = 'bot-device'; - } - return SearchBotDeviceInfo; -}()); -var BotInfo = /** @class */ (function () { - function BotInfo() { - this.type = 'bot'; - this.bot = true; // NOTE: deprecated test name instead - this.name = 'bot'; - this.version = null; - this.os = null; - } - return BotInfo; -}()); -var ReactNativeInfo = /** @class */ (function () { - function ReactNativeInfo() { - this.type = 'react-native'; - this.name = 'react-native'; - this.version = null; - this.os = null; - } - return ReactNativeInfo; -}()); -// tslint:disable-next-line:max-line-length -var SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/; -var SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/; -var REQUIRED_VERSION_PARTS = 3; -var userAgentRules = [ - ['aol', /AOLShield\/([0-9\._]+)/], - ['edge', /Edge\/([0-9\._]+)/], - ['edge-ios', /EdgiOS\/([0-9\._]+)/], - ['yandexbrowser', /YaBrowser\/([0-9\._]+)/], - ['kakaotalk', /KAKAOTALK\s([0-9\.]+)/], - ['samsung', /SamsungBrowser\/([0-9\.]+)/], - ['silk', /\bSilk\/([0-9._-]+)\b/], - ['miui', /MiuiBrowser\/([0-9\.]+)$/], - ['beaker', /BeakerBrowser\/([0-9\.]+)/], - ['edge-chromium', /EdgA?\/([0-9\.]+)/], - [ - 'chromium-webview', - /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/, - ], - ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], - ['phantomjs', /PhantomJS\/([0-9\.]+)(:?\s|$)/], - ['crios', /CriOS\/([0-9\.]+)(:?\s|$)/], - ['firefox', /Firefox\/([0-9\.]+)(?:\s|$)/], - ['fxios', /FxiOS\/([0-9\.]+)/], - ['opera-mini', /Opera Mini.*Version\/([0-9\.]+)/], - ['opera', /Opera\/([0-9\.]+)(?:\s|$)/], - ['opera', /OPR\/([0-9\.]+)(:?\s|$)/], - ['pie', /^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/], - ['pie', /^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/], - ['netfront', /^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/], - ['ie', /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/], - ['ie', /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/], - ['ie', /MSIE\s(7\.0)/], - ['bb10', /BB10;\sTouch.*Version\/([0-9\.]+)/], - ['android', /Android\s([0-9\.]+)/], - ['ios', /Version\/([0-9\._]+).*Mobile.*Safari.*/], - ['safari', /Version\/([0-9\._]+).*Safari/], - ['facebook', /FB[AS]V\/([0-9\.]+)/], - ['instagram', /Instagram\s([0-9\.]+)/], - ['ios-webview', /AppleWebKit\/([0-9\.]+).*Mobile/], - ['ios-webview', /AppleWebKit\/([0-9\.]+).*Gecko\)$/], - ['curl', /^curl\/([0-9\.]+)$/], - ['searchbot', SEARCHBOX_UA_REGEX], -]; -var operatingSystemRules = [ - ['iOS', /iP(hone|od|ad)/], - ['Android OS', /Android/], - ['BlackBerry OS', /BlackBerry|BB10/], - ['Windows Mobile', /IEMobile/], - ['Amazon OS', /Kindle/], - ['Windows 3.11', /Win16/], - ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/], - ['Windows 98', /(Windows 98)|(Win98)/], - ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/], - ['Windows XP', /(Windows NT 5.1)|(Windows XP)/], - ['Windows Server 2003', /(Windows NT 5.2)/], - ['Windows Vista', /(Windows NT 6.0)/], - ['Windows 7', /(Windows NT 6.1)/], - ['Windows 8', /(Windows NT 6.2)/], - ['Windows 8.1', /(Windows NT 6.3)/], - ['Windows 10', /(Windows NT 10.0)/], - ['Windows ME', /Windows ME/], - ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/], - ['Open BSD', /OpenBSD/], - ['Sun OS', /SunOS/], - ['Chrome OS', /CrOS/], - ['Linux', /(Linux)|(X11)/], - ['Mac OS', /(Mac_PowerPC)|(Macintosh)/], - ['QNX', /QNX/], - ['BeOS', /BeOS/], - ['OS/2', /OS\/2/], -]; -function detect(userAgent) { - if (typeof document === 'undefined' && - typeof navigator !== 'undefined' && - navigator.product === 'ReactNative') { - return new ReactNativeInfo(); - } - if (typeof navigator !== 'undefined') { - return parseUserAgent(navigator.userAgent); - } - return getNodeVersion(); -} -function matchUserAgent(ua) { - // opted for using reduce here rather than Array#first with a regex.test call - // this is primarily because using the reduce we only perform the regex - // execution once rather than once for the test and for the exec again below - // probably something that needs to be benchmarked though - return (ua !== '' && - userAgentRules.reduce(function (matched, _a) { - var browser = _a[0], regex = _a[1]; - if (matched) { - return matched; - } - var uaMatch = regex.exec(ua); - return !!uaMatch && [browser, uaMatch]; - }, false)); -} -function parseUserAgent(ua) { - var matchedRule = matchUserAgent(ua); - if (!matchedRule) { - return null; - } - var name = matchedRule[0], match = matchedRule[1]; - if (name === 'searchbot') { - return new BotInfo(); - } - // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split) - var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3); - if (versionParts) { - if (versionParts.length < REQUIRED_VERSION_PARTS) { - versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true); - } - } - else { - versionParts = []; - } - var version = versionParts.join('.'); - var os = detectOS(ua); - var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua); - if (searchBotMatch && searchBotMatch[1]) { - return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]); - } - return new BrowserInfo(name, version, os); -} -function detectOS(ua) { - for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) { - var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1]; - var match = regex.exec(ua); - if (match) { - return os; - } - } - return null; -} -function getNodeVersion() { - var isNode = typeof process !== 'undefined' && process.version; - return isNode ? new NodeInfo(process.version.slice(1)) : null; -} -function createVersionParts(count) { - var output = []; - for (var ii = 0; ii < count; ii++) { - output.push('0'); - } - return output; -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const browserInfo = detect(); -let logs$1; -let config$1; -// Interval Logging Globals -let intervalId; -let intervalType; -let intervalPath; -let intervalTimer; -let intervalCounter; -let intervalLog; -const filterHandler = null; -const mapHandler = null; -let cbHandlers = {}; -/** - * Adds named callbacks to be executed when logging. - * @param {Object } newCallbacks An object containing named callback functions. - */ -function addCallbacks(...newCallbacks) { - newCallbacks.forEach((source) => { - let descriptors = {}; - descriptors = Object.keys(source).reduce((descriptors, key) => { - descriptors[key] = Object.getOwnPropertyDescriptor(source, key); - return descriptors; - }, descriptors); - Object.getOwnPropertySymbols(source).forEach((sym) => { - const descriptor = Object.getOwnPropertyDescriptor(source, sym); - if (descriptor === null || descriptor === void 0 ? void 0 : descriptor.enumerable) { - descriptors[sym] = descriptor; - } - }); - Object.defineProperties(cbHandlers, descriptors); - }); - return cbHandlers; -} -/** - * Assigns the config and log container to be used by the logging functions. - * @param {Array} newLogs Log container. - * @param {Object} newConfig Configuration to use while logging. - */ -function initPackager(newLogs, newConfig) { - logs$1 = newLogs; - config$1 = newConfig; - cbHandlers = {}; - intervalId = null; - intervalType = null; - intervalPath = null; - intervalTimer = null; - intervalCounter = 0; - intervalLog = null; -} -/** - * Transforms the provided HTML event into a log and appends it to the log queue. - * @param {Event} e The event to be logged. - * @param {Function} detailFcn The function to extract additional log parameters from the event. - * @return {boolean} Whether the event was logged. - */ -function packageLog(e, detailFcn) { - if (!config$1.on) { - return false; - } - let details = null; - if (detailFcn) { - details = detailFcn(e); - } - const timeFields = extractTimeFields(e.timeStamp && e.timeStamp > 0 ? config$1.time(e.timeStamp) : Date.now()); - let log = { - target: e.target ? getSelector(e.target) : null, - path: buildPath(e), - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: timeFields.milli, - microTime: timeFields.micro, - location: getLocation(e), - scrnRes: getScreenRes(), - type: e.type, - logType: "raw", - userAction: true, - details: details, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - attributes: buildAttrs(e), - style: buildCSS(e), - }; - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, e); - if (!log) { - return false; - } - } - } - logs$1.push(log); - return true; -} -/** - * Packages the provided customLog to include standard meta data and appends it to the log queue. - * @param {Logging.CustomLog} customLog The behavior to be logged. - * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. - * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) - * @return {boolean} Whether the event was logged. - */ -function packageCustomLog(customLog, detailFcn, userAction) { - if (!config$1.on) { - return false; - } - let details = null; - if (detailFcn.length === 0) { - // In the case of a union, the type checker will default to the more stringent - // type, i.e. the DetailFunction that expects an argument for safety purposes. - // To avoid this, we must explicitly check the type by asserting it receives - // no arguments (detailFcn.length === 0) and then cast it to the - // StaticDetailFunction type. - const staticDetailFcn = detailFcn; - details = staticDetailFcn(); - } - const metaData = { - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: Date.now(), - scrnRes: getScreenRes(), - logType: "custom", - userAction: userAction, - details: details, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - }; - let log = Object.assign(metaData, customLog); - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, null); - if (!log) { - return false; - } - } - } - logs$1.push(log); - return true; -} -/** - * Extract the millisecond and microsecond portions of a timestamp. - * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields. - * @return {Object} An object containing the millisecond - * and microsecond portions of the timestamp. - */ -function extractTimeFields(timeStamp) { - return { - milli: Math.floor(timeStamp), - micro: Number((timeStamp % 1).toFixed(3)), - }; -} -/** - * Track intervals and gather details about it. - * @param {Object} e - * @return boolean - */ -function packageIntervalLog(e) { - try { - const target = e.target ? getSelector(e.target) : null; - const path = buildPath(e); - const type = e.type; - const timestamp = Math.floor(e.timeStamp && e.timeStamp > 0 ? config$1.time(e.timeStamp) : Date.now()); - // Init - this should only happen once on initialization - if (intervalId == null) { - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - if ((intervalId !== target || intervalType !== type) && intervalTimer) { - // When to create log? On transition end - // @todo Possible for intervalLog to not be pushed in the event the interval never ends... - intervalLog = { - target: intervalId, - path: intervalPath, - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - count: intervalCounter, - duration: timestamp - intervalTimer, // microseconds - startTime: intervalTimer, - endTime: timestamp, - type: intervalType, - logType: "interval", - targetChange: intervalId !== target, - typeChange: intervalType !== type, - userAction: false, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - }; - if (typeof filterHandler === "function" && !filterHandler(intervalLog)) ; - if (typeof mapHandler === "function") ; - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - intervalLog = func(intervalLog, null); - if (!intervalLog) { - return false; - } - } - } - if (intervalLog) - logs$1.push(intervalLog); - // Reset - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - // Interval is still occuring, just update counter - if (intervalId == target && intervalType == type && intervalCounter) { - intervalCounter = intervalCounter + 1; - } - return true; - } - catch (_a) { - return false; - } -} -/** - * Extracts coordinate information from the event - * depending on a few browser quirks. - * @param {Event} e The event to extract coordinate information from. - * @return {Object} An object containing nullable x and y coordinates for the event. - */ -function getLocation(e) { - if (e instanceof MouseEvent) { - if (e.pageX != null) { - return { x: e.pageX, y: e.pageY }; - } - else if (e.clientX != null) { - return { - x: document.documentElement.scrollLeft + e.clientX, - y: document.documentElement.scrollTop + e.clientY, - }; - } - } - else { - return { x: null, y: null }; - } -} -/** - * Extracts innerWidth and innerHeight to provide estimates of screen resolution - * @return {Object} An object containing the innerWidth and InnerHeight - */ -function getScreenRes() { - return { width: window.innerWidth, height: window.innerHeight }; -} -/** - * Builds a string CSS selector from the provided element - * @param {EventTarget} ele The element from which the selector is built. - * @return {string} The CSS selector for the element, or Unknown if it can't be determined. - */ -function getSelector(ele) { - if (ele instanceof HTMLElement || ele instanceof Element) { - if (ele.localName) { - return (ele.localName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "")); - } - else if (ele.nodeName) { - return (ele.nodeName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "")); - } - } - else if (ele instanceof Document) { - return "#document"; - } - else if (ele === globalThis) { - return "Window"; - } - return "Unknown"; -} -/** - * Builds an array of elements from the provided event target, to the root element. - * @param {Event} e Event from which the path should be built. - * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. - */ -function buildPath(e) { - const path = e.composedPath(); - return selectorizePath(path); -} -/** - * Builds a CSS selector path from the provided list of elements. - * @param {EventTarget[]} path Array of HTML Elements from which the path should be built. - * @return {string[]} Array of string CSS selectors. - */ -function selectorizePath(path) { - let i = 0; - let pathEle; - const pathSelectors = []; - while ((pathEle = path[i])) { - pathSelectors.push(getSelector(pathEle)); - ++i; - pathEle = path[i]; - } - return pathSelectors; -} -function detectBrowser() { - return { - browser: browserInfo ? browserInfo.name : "", - version: browserInfo ? browserInfo.version : "", - }; -} -/** - * Builds an object containing attributes of an element. - * Attempts to parse all attribute values as JSON text. - * @param {Event} e Event from which the target element's attributes should be extracted. - * @return {Record} Object with element attributes as key-value pairs. - */ -function buildAttrs(e) { - const attributes = {}; - const attributeBlackList = ["style"]; - if (e.target && e.target instanceof Element) { - for (const attr of e.target.attributes) { - if (attributeBlackList.includes(attr.name)) - continue; - let val = attr.value; - try { - val = JSON.parse(val); - } - catch (error) { - // Ignore parsing errors, fallback to raw string value - } - attributes[attr.name] = val; - } - } - return attributes; -} -/** - * Builds an object containing all CSS properties of an element. - * @param {Event} e Event from which the target element's properties should be extracted. - * @return {Record} Object with all CSS properties as key-value pairs. - */ -function buildCSS(e) { - const properties = {}; - if (e.target && e.target instanceof HTMLElement) { - const styleObj = e.target.style; - for (let i = 0; i < styleObj.length; i++) { - const prop = styleObj[i]; - properties[prop] = styleObj.getPropertyValue(prop); - } - } - return properties; -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -//@todo: Investigate drag events and their behavior -let events; -let bufferBools; -let bufferedEvents; -let refreshEvents; -const intervalEvents = [ - "click", - "focus", - "blur", - "input", - "change", - "mouseover", - "submit", -]; -const windowEvents = ["load", "blur", "focus"]; -/** - * Maps a MouseEvent to an object containing useful information. - * @param {MouseEvent} e Event to extract data from - */ -function extractMouseDetails(e) { - return { - clicks: e.detail, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey, - // 'text' : e.target.innerHTML - }; -} -/** Maps a KeyboardEvent to an object containing useful infromation - * @param {KeyboardEvent} e Event to extract data from - */ -function extractKeyboardDetails(e) { - return { - key: e.key, - code: e.code, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey, - }; -} -/** - * Maps a ChangeEvent to an object containing useful information. - * @param {Events.ChangeEvent} e Event to extract data from - */ -function extractChangeDetails(e) { - return { - value: e.target.value, - }; -} -/** - * Maps a WheelEvent to an object containing useful information. - * @param {WheelEvent} e Event to extract data from - */ -function extractWheelDetails(e) { - return { - x: e.deltaX, - y: e.deltaY, - z: e.deltaZ, - }; -} -/** - * Maps a ScrollEvent to an object containing useful information. - */ -function extractScrollDetails() { - return { - x: window.scrollX, - y: window.scrollY, - }; -} -/** - * Maps a ResizeEvent to an object containing useful information. - */ -function extractResizeDetails() { - return { - width: window.outerWidth, - height: window.outerHeight, - }; -} -/** - * Defines the way information is extracted from various events. - * Also defines which events we will listen to. - * @param {Settings.Config} config Configuration object to read from. - */ -function defineDetails(config) { - // Events list - // Keys are event types - // Values are functions that return details object if applicable - events = { - click: extractMouseDetails, - dblclick: extractMouseDetails, - mousedown: extractMouseDetails, - mouseup: extractMouseDetails, - focus: null, - blur: null, - input: config.logDetails ? extractKeyboardDetails : null, - change: config.logDetails ? extractChangeDetails : null, - dragstart: null, - dragend: null, - drag: null, - drop: null, - keydown: config.logDetails ? extractKeyboardDetails : null, - mouseover: null, - }; - bufferBools = {}; - bufferedEvents = { - wheel: extractWheelDetails, - scroll: extractScrollDetails, - resize: extractResizeDetails, - }; - refreshEvents = { - submit: null, - }; -} -/** - * Hooks the event handlers for each event type of interest. - * @param {Configuration} config Configuration singleton to use. - * @return {boolean} Whether the operation succeeded - */ -function attachHandlers(config) { - try { - defineDetails(config); - Object.keys(events).forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageLog(e, events[ev]); - }, true); - }); - intervalEvents.forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageIntervalLog(e); - }, true); - }); - Object.keys(bufferedEvents).forEach(function (ev) { - bufferBools[ev] = true; - window.addEventListener(ev, function (e) { - if (bufferBools[ev]) { - bufferBools[ev] = false; - packageLog(e, bufferedEvents[ev]); - setTimeout(function () { - bufferBools[ev] = true; - }, config.resolution); - } - }, true); - }); - Object.keys(refreshEvents).forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageLog(e, events[ev]); - }, true); - }); - windowEvents.forEach(function (ev) { - window.addEventListener(ev, function (e) { - packageLog(e, function () { - return { window: true }; - }); - }, true); - }); - return true; - } - catch (_a) { - return false; - } -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -let sendIntervalId; -/** - * Initializes the log queue processors. - * @param {Array} logs Array of logs to append to. - * @param {Configuration} config Configuration object to use when logging. - */ -function initSender(logs, config) { - if (sendIntervalId) { - clearInterval(sendIntervalId); - } - sendIntervalId = sendOnInterval(logs, config); - sendOnClose(logs, config); -} -/** - * Checks the provided log array on an interval, flushing the logs - * if the queue has reached the threshold specified by the provided config. - * @param {Array} logs Array of logs to read from. - * @param {Configuration} config Configuration singleton to be read from. - * @return {Number} The newly created interval id. - */ -function sendOnInterval(logs, config) { - return setInterval(function () { - if (!config.on) { - return; - } - if (logs.length >= config.logCountThreshold) { - sendLogs(logs.slice(0), config); // Send a copy - logs.splice(0); // Clear array reference (no reassignment) - } - }, config.transmitInterval); -} -/** - * Attempts to flush the remaining logs when the window is closed. - * @param {Array} logs Array of logs to be flushed. - * @param {Configuration} config Configuration singleton to be read from. - */ -function sendOnClose(logs, config) { - window.addEventListener("pagehide", function () { - if (!config.on) { - return; - } - if (logs.length > 0) { - if (config.websocketsEnabled) { - const data = JSON.stringify(logs); - wsock.send(data); - } - else { - const headers = new Headers(); - headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); - if (config.authHeader) { - headers.set("Authorization", config.authHeader.toString()); - } - fetch(config.url, { - keepalive: true, - method: "POST", - headers: headers, - body: JSON.stringify(logs), - }).catch((error) => { - console.error(error); - }); - } - logs.splice(0); // clear log queue - } - }); -} -/** - * Sends the provided array of logs to the specified url, - * retrying the request up to the specified number of retries. - * @param {Array} logs Array of logs to send. - * @param {Configuration} config configuration singleton. - * @param {Number} retries Maximum number of attempts to send the logs. - */ -// @todo expose config object to sendLogs replate url with config.url -function sendLogs(logs, config, retries) { - const data = JSON.stringify(logs); - if (config.websocketsEnabled) { - wsock.send(data); - } - else { - const req = new XMLHttpRequest(); - req.open("POST", config.url); - if (config.authHeader) { - req.setRequestHeader("Authorization", typeof config.authHeader === "function" - ? config.authHeader() - : config.authHeader); - } - req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); - if (config.headers) { - Object.entries(config.headers).forEach(([header, value]) => { - req.setRequestHeader(header, value); - }); - } - req.onreadystatechange = function () { - if (req.readyState === 4 && req.status !== 200) ; - }; - req.send(data); - } -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const config = Configuration.getInstance(); -const logs = []; -const startLoadTimestamp = Date.now(); -let endLoadTimestamp; -window.onload = function () { - endLoadTimestamp = Date.now(); -}; -let started = false; -let wsock; -config.update({ - useraleVersion: version, -}); -initPackager(logs, config); -getWebsocketsEnabled(config); -if (config.autostart) { - setup(config); -} -/** - * Hooks the global event listener, and starts up the - * logging interval. - * @param {Configuration} config Configuration settings for the logger - */ -function setup(config) { - if (!started) { - setTimeout(function () { - const state = document.readyState; - if (config.autostart && - (state === "interactive" || state === "complete")) { - attachHandlers(config); - initSender(logs, config); - started = config.on = true; - packageCustomLog({ - type: "load", - details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp }, - }, () => ({}), false); - } - else { - setup(config); - } - }, 100); - } -} -/** - * Checks to see if the specified backend URL supporsts Websockets - * and updates the config accordingly - */ -function getWebsocketsEnabled(config) { - wsock = new WebSocket(config.url.replace("http://", "ws://")); - wsock.onerror = () => { - console.log("no websockets detected"); - }; - wsock.onopen = () => { - console.log("connection established with websockets"); - config.websocketsEnabled = true; - }; - wsock.onclose = () => { - sendOnClose(logs, config); - }; -} -/** - * Updates the current configuration - * object with the provided values. - * @param {Partial} newConfig The configuration options to use. - * @return {Settings.Config} Returns the updated configuration. - */ -function options(newConfig) { - if (newConfig) { - config.update(newConfig); - } - return config; -} - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* eslint-disable */ -// browser is defined in firefox, but chrome uses the 'chrome' global. -var browser = window.browser || chrome; -const configKey = "useraleConfigPayload"; -function rerouteLog(log) { - browser.runtime.sendMessage({ type: messageTypes.ADD_LOG, payload: log }); - return false; -} -/* eslint-enable */ - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -addCallbacks({ rerouteLog }); -// TODO: Warn users when setting credentials with unsecured connection. -// const mitmWarning = -// "Setting credentials with http will expose you to a MITM attack. Are you sure you want to continue?"; -function setConfig() { - const config = Configuration.getInstance(); - config.update({ - url: document.getElementById("url").value, - userId: document.getElementById("user").value, - toolName: document.getElementById("tool").value, - toolVersion: document.getElementById("toolVersion") - .value, - }); - // Set a basic auth header if given credentials. - const password = document.getElementById("password") - .value; - if (config.userId && password) { - config.update({ - authHeader: "Basic " + btoa(`${config.userId}:${password}`), - }); - } - const payload = { - useraleConfig: config, - pluginConfig: { - urlWhitelist: document.getElementById("filter") - .value, - }, - }; - options(config); - browser.runtime.sendMessage({ type: messageTypes.CONFIG_CHANGE, payload }); -} -function getConfig() { - // @ts-expect-error Typescript is not aware that firefox's broswer is overloaded - // to support chromium style MV2 callbacks - browser.storage.local.get([configKey], (res) => { - const payload = res[configKey]; - const config = payload.useraleConfig; - options(config); - document.getElementById("url").value = config.url; - document.getElementById("user").value = - config.userId; - document.getElementById("tool").value = - config.toolName; - document.getElementById("toolVersion").value = - config.toolVersion; - document.getElementById("filter").value = - payload.pluginConfig.urlWhitelist; - }); - document.getElementById("optionsForm").addEventListener("submit", setConfig); - const issueForm = document.getElementById("issueForm"); - if (issueForm instanceof HTMLElement) { - issueForm.addEventListener("submit", reportIssue); - } -} -function reportIssue() { - browser.runtime.sendMessage({ - type: messageTypes.ISSUE_REPORT, - payload: { - details: { - issueType: document.querySelector('input[name="issueType"]:checked').value, - issueDescription: document.getElementById("issueDescription").value, - }, - type: "issue", - }, - }); -} -document.addEventListener("DOMContentLoaded", getConfig); -browser.runtime.onMessage.addListener(function (message, sender) { - if (message.type === messageTypes.ISSUE_REPORT) { - if (window.top === window) { - packageCustomLog(message.payload, () => { - return {}; - }, true); - } - } -}); diff --git a/products/userale/build/attachHandlers.d.ts b/products/userale/build/attachHandlers.d.ts deleted file mode 100644 index 1e57d68..0000000 --- a/products/userale/build/attachHandlers.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Events, Logging, Settings } from "@/types"; -import { Configuration } from "@/configure"; -/** - * Maps a MouseEvent to an object containing useful information. - * @param {MouseEvent} e Event to extract data from - */ -export declare function extractMouseDetails(e: MouseEvent): { - clicks: number; - ctrl: boolean; - alt: boolean; - shift: boolean; - meta: boolean; -}; -/** Maps a KeyboardEvent to an object containing useful infromation - * @param {KeyboardEvent} e Event to extract data from - */ -export declare function extractKeyboardDetails(e: KeyboardEvent): { - key: string; - code: string; - ctrl: boolean; - alt: boolean; - shift: boolean; - meta: boolean; -}; -/** - * Maps an InputEvent to an object containing useful information. - * @param {InputEvent} e Event to extract data from - */ -export declare function extractInputDetails(e: InputEvent): { - value: string; -}; -/** - * Maps a ChangeEvent to an object containing useful information. - * @param {Events.ChangeEvent} e Event to extract data from - */ -export declare function extractChangeDetails(e: Events.ChangeEvent): { - value: any; -}; -/** - * Maps a WheelEvent to an object containing useful information. - * @param {WheelEvent} e Event to extract data from - */ -export declare function extractWheelDetails(e: WheelEvent): { - x: number; - y: number; - z: number; -}; -/** - * Maps a ScrollEvent to an object containing useful information. - */ -export declare function extractScrollDetails(): { - x: number; - y: number; -}; -/** - * Maps a ResizeEvent to an object containing useful information. - */ -export declare function extractResizeDetails(): { - width: number; - height: number; -}; -/** - * Defines the way information is extracted from various events. - * Also defines which events we will listen to. - * @param {Settings.Config} config Configuration object to read from. - */ -export declare function defineDetails(config: Settings.DefaultConfig): void; -/** - * Defines the way information is extracted from various events. - * Also defines which events we will listen to. - * @param {Settings.Config} options UserALE Configuration object to read from. - * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods. - */ -export declare function defineCustomDetails(options: Settings.DefaultConfig, type: Events.AllowedEvents): Logging.DynamicDetailFunction | null | undefined; -/** - * Hooks the event handlers for each event type of interest. - * @param {Configuration} config Configuration singleton to use. - * @return {boolean} Whether the operation succeeded - */ -export declare function attachHandlers(config: Configuration): boolean; diff --git a/products/userale/build/configure.d.ts b/products/userale/build/configure.d.ts deleted file mode 100644 index 87fef7c..0000000 --- a/products/userale/build/configure.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import type { Settings } from "@/types"; -export declare class Configuration { - [key: string]: Settings.ConfigValueTypes; - private static instance; - autostart: boolean; - authHeader: Settings.AuthHeader; - browserSessionId: Settings.SessionId; - custIndex: Settings.CustomIndex; - headers: Settings.Headers; - httpSessionId: Settings.SessionId; - logCountThreshold: number; - logDetails: boolean; - on: boolean; - resolution: number; - sessionId: Settings.SessionId; - time: Settings.TimeFunction; - toolName: Settings.ToolName; - toolVersion: Settings.Version; - transmitInterval: number; - url: string; - userFromParams: Settings.UserFromParams; - useraleVersion: Settings.Version; - userId: Settings.UserId; - version: Settings.Version; - websocketsEnabled: boolean; - private constructor(); - static getInstance(): Configuration; - private initialize; - /** - * Resets the configuration to its initial state. - */ - reset(): void; - /** - * Shallow merges a newConfig with the configuration class, updating it. - * Retrieves/updates the userid if userFromParams is provided. - * @param {Partial} newConfig Configuration object to merge into the current config. - */ - update(newConfig: Partial): void; - /** - * Attempts to extract the userid from the query parameters of the URL. - * @param {string} param The name of the query parameter containing the userid. - * @return {string | null} The extracted/decoded userid, or null if none is found. - */ - static getUserIdFromParams(param: string): string | null; -} diff --git a/products/userale/build/getInitialSettings.d.ts b/products/userale/build/getInitialSettings.d.ts deleted file mode 100644 index ead4737..0000000 --- a/products/userale/build/getInitialSettings.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import type { Settings } from "./types"; -/** - * Extracts the initial configuration settings from the - * currently executing script tag. - * @return {Object} The extracted configuration object - */ -export declare function getInitialSettings(): Settings.Config; -/** - * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in - * storage when script is started. This prevents events like 'submit', which refresh page data - * from refreshing the current user session - * - */ -export declare function getsessionId(sessionKey: string, value: any): any; -/** - * Creates a function to normalize the timestamp of the provided event. - * @param {Event} e An event containing a timeStamp property. - * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function. - */ -export declare function timeStampScale(e: Event): Settings.TimeFunction; diff --git a/products/userale/build/main.d.ts b/products/userale/build/main.d.ts deleted file mode 100644 index 501e0bb..0000000 --- a/products/userale/build/main.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import type { Settings, Logging } from "@/types"; -export declare let started: boolean; -export declare let wsock: WebSocket; -export { defineCustomDetails as details } from "@/attachHandlers"; -export { registerAuthCallback as registerAuthCallback } from "@/utils"; -export { addCallbacks as addCallbacks, removeCallbacks as removeCallbacks, packageLog as packageLog, packageCustomLog as packageCustomLog, getSelector as getSelector, buildPath as buildPath, } from "@/packageLogs"; -export declare const version: string; -/** - * Used to start the logging process if the - * autostart configuration option is set to false. - */ -export declare function start(): void; -/** - * Halts the logging process. Logs will no longer be sent. - */ -export declare function stop(): void; -/** - * Updates the current configuration - * object with the provided values. - * @param {Partial} newConfig The configuration options to use. - * @return {Settings.Config} Returns the updated configuration. - */ -export declare function options(newConfig: Partial | undefined): Settings.Config; -/** - * Appends a log to the log queue. - * @param {Logging.CustomLog} customLog The log to append. - * @return {boolean} Whether the operation succeeded. - */ -export declare function log(customLog: Logging.CustomLog | undefined): boolean; diff --git a/products/userale/build/packageLogs.d.ts b/products/userale/build/packageLogs.d.ts deleted file mode 100644 index b94fe8f..0000000 --- a/products/userale/build/packageLogs.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Callbacks, Logging } from "@/types"; -import { Configuration } from "@/configure"; -export declare let logs: Array; -export declare const filterHandler: CallableFunction | null; -export declare const mapHandler: CallableFunction | null; -export declare let cbHandlers: Callbacks.CallbackMap; -/** - * Adds named callbacks to be executed when logging. - * @param {Object } newCallbacks An object containing named callback functions. - */ -export declare function addCallbacks(...newCallbacks: Record[]): Callbacks.CallbackMap; -/** - * Removes callbacks by name. - * @param {String[]} targetKeys A list of names of functions to remove. - */ -export declare function removeCallbacks(targetKeys: string[]): void; -/** - * Assigns the config and log container to be used by the logging functions. - * @param {Array} newLogs Log container. - * @param {Object} newConfig Configuration to use while logging. - */ -export declare function initPackager(newLogs: Array, newConfig: Configuration): void; -/** - * Transforms the provided HTML event into a log and appends it to the log queue. - * @param {Event} e The event to be logged. - * @param {Function} detailFcn The function to extract additional log parameters from the event. - * @return {boolean} Whether the event was logged. - */ -export declare function packageLog(e: Event, detailFcn?: Logging.DynamicDetailFunction | null): boolean; -/** - * Packages the provided customLog to include standard meta data and appends it to the log queue. - * @param {Logging.CustomLog} customLog The behavior to be logged. - * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. - * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) - * @return {boolean} Whether the event was logged. - */ -export declare function packageCustomLog(customLog: Logging.CustomLog, detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction, userAction: boolean): boolean; -/** - * Extract the millisecond and microsecond portions of a timestamp. - * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields. - * @return {Object} An object containing the millisecond - * and microsecond portions of the timestamp. - */ -export declare function extractTimeFields(timeStamp: number): { - milli: number; - micro: number; -}; -/** - * Track intervals and gather details about it. - * @param {Object} e - * @return boolean - */ -export declare function packageIntervalLog(e: Event): boolean; -/** - * Extracts coordinate information from the event - * depending on a few browser quirks. - * @param {Event} e The event to extract coordinate information from. - * @return {Object} An object containing nullable x and y coordinates for the event. - */ -export declare function getLocation(e: Event): { - x: number; - y: number; -} | { - x: null; - y: null; -} | undefined; -/** - * Extracts innerWidth and innerHeight to provide estimates of screen resolution - * @return {Object} An object containing the innerWidth and InnerHeight - */ -export declare function getScreenRes(): { - width: number; - height: number; -}; -/** - * Builds a string CSS selector from the provided element - * @param {EventTarget} ele The element from which the selector is built. - * @return {string} The CSS selector for the element, or Unknown if it can't be determined. - */ -export declare function getSelector(ele: EventTarget): string; -/** - * Builds an array of elements from the provided event target, to the root element. - * @param {Event} e Event from which the path should be built. - * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. - */ -export declare function buildPath(e: Event): string[]; -/** - * Builds a CSS selector path from the provided list of elements. - * @param {EventTarget[]} path Array of HTML Elements from which the path should be built. - * @return {string[]} Array of string CSS selectors. - */ -export declare function selectorizePath(path: EventTarget[]): string[]; -export declare function detectBrowser(): { - browser: string; - version: string | null; -}; -/** - * Builds an object containing attributes of an element. - * Attempts to parse all attribute values as JSON text. - * @param {Event} e Event from which the target element's attributes should be extracted. - * @return {Record} Object with element attributes as key-value pairs. - */ -export declare function buildAttrs(e: Event): Record; -/** - * Builds an object containing all CSS properties of an element. - * @param {Event} e Event from which the target element's properties should be extracted. - * @return {Record} Object with all CSS properties as key-value pairs. - */ -export declare function buildCSS(e: Event): Record; diff --git a/products/userale/build/sendLogs.d.ts b/products/userale/build/sendLogs.d.ts deleted file mode 100644 index 5965dd6..0000000 --- a/products/userale/build/sendLogs.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/// -import { Configuration } from "@/configure"; -import { Logging } from "@/types"; -/** - * Initializes the log queue processors. - * @param {Array} logs Array of logs to append to. - * @param {Configuration} config Configuration object to use when logging. - */ -export declare function initSender(logs: Array, config: Configuration): void; -/** - * Checks the provided log array on an interval, flushing the logs - * if the queue has reached the threshold specified by the provided config. - * @param {Array} logs Array of logs to read from. - * @param {Configuration} config Configuration singleton to be read from. - * @return {Number} The newly created interval id. - */ -export declare function sendOnInterval(logs: Array, config: Configuration): NodeJS.Timeout; -/** - * Attempts to flush the remaining logs when the window is closed. - * @param {Array} logs Array of logs to be flushed. - * @param {Configuration} config Configuration singleton to be read from. - */ -export declare function sendOnClose(logs: Array, config: Configuration): void; -/** - * Sends the provided array of logs to the specified url, - * retrying the request up to the specified number of retries. - * @param {Array} logs Array of logs to send. - * @param {Configuration} config configuration singleton. - * @param {Number} retries Maximum number of attempts to send the logs. - */ -export declare function sendLogs(logs: Array, config: Configuration, retries: number): void; diff --git a/products/userale/build/userale-2.4.0.js b/products/userale/build/userale-2.4.0.js deleted file mode 100644 index 41321c5..0000000 --- a/products/userale/build/userale-2.4.0.js +++ /dev/null @@ -1,1395 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * @preserved - */ - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.userale = {})); -})(this, (function (exports) { 'use strict'; - - var version$1 = "2.4.0"; - - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the 'License'); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - let sessionId = null; - let httpSessionId = null; - /** - * Extracts the initial configuration settings from the - * currently executing script tag. - * @return {Object} The extracted configuration object - */ - function getInitialSettings() { - if (sessionId === null) { - sessionId = getsessionId("userAlesessionId", "session_" + String(Date.now())); - } - if (httpSessionId === null) { - httpSessionId = getsessionId("userAleHttpSessionId", generatehttpSessionId()); - } - const script = document.currentScript || - (function () { - const scripts = document.getElementsByTagName("script"); - return scripts[scripts.length - 1]; - })(); - const get = script - ? script.getAttribute.bind(script) - : function () { - return null; - }; - const headers = get("data-headers"); - const settings = { - authHeader: get("data-auth") || null, - autostart: get("data-autostart") === "false" ? false : true, - browserSessionId: null, - custIndex: get("data-index") || null, - headers: headers ? JSON.parse(headers) : null, - httpSessionId: httpSessionId, - logCountThreshold: +(get("data-threshold") || 5), - logDetails: get("data-log-details") === "true" ? true : false, - resolution: +(get("data-resolution") || 500), - sessionId: get("data-session") || sessionId, - time: timeStampScale(document.createEvent("CustomEvent")), - toolName: get("data-tool") || null, - toolVersion: get("data-version") || null, - transmitInterval: +(get("data-interval") || 5000), - url: get("data-url") || "http://localhost:8000", - useraleVersion: get("data-userale-version") || null, - userFromParams: get("data-user-from-params") || null, - userId: get("data-user") || null, - }; - return settings; - } - /** - * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in - * storage when script is started. This prevents events like 'submit', which refresh page data - * from refreshing the current user session - * - */ - function getsessionId(sessionKey, value) { - if (window.sessionStorage.getItem(sessionKey) === null) { - window.sessionStorage.setItem(sessionKey, JSON.stringify(value)); - return value; - } - return JSON.parse(window.sessionStorage.getItem(sessionKey) || ""); - } - /** - * Creates a function to normalize the timestamp of the provided event. - * @param {Event} e An event containing a timeStamp property. - * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function. - */ - function timeStampScale(e) { - let tsScaler; - if (e.timeStamp && e.timeStamp > 0) { - const delta = Date.now() - e.timeStamp; - /** - * Returns a timestamp depending on various browser quirks. - * @param {?Number} ts A timestamp to use for normalization. - * @return {Number} A normalized timestamp. - */ - if (delta < 0) { - tsScaler = function () { - return e.timeStamp / 1000; - }; - } - else if (delta > e.timeStamp) { - const navStart = performance.timeOrigin; - tsScaler = function (ts) { - return ts + navStart; - }; - } - else { - tsScaler = function (ts) { - return ts; - }; - } - } - else { - tsScaler = function () { - return Date.now(); - }; - } - return tsScaler; - } - /** - * Creates a cryptographiclly random string to represent this http session. - * @return {String} A random 32 digit hex string - */ - function generatehttpSessionId() { - // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison - const len = 32; - const arr = new Uint8Array(len / 2); - window.crypto.getRandomValues(arr); - return Array.from(arr, (dec) => { - return dec.toString(16).padStart(2, "0"); - }).join(""); - } - - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - // Singleton Configuration class - class Configuration { - // Private constructor to prevent external instantiation - constructor() { - // Public properties corresponding to fields in the Config interface - this.autostart = false; - this.authHeader = null; - this.browserSessionId = null; - this.custIndex = null; - this.headers = null; - this.httpSessionId = null; - this.logCountThreshold = 0; - this.logDetails = false; - this.on = false; - this.resolution = 0; - this.sessionId = null; - this.time = () => Date.now(); - this.toolName = null; - this.toolVersion = null; - this.transmitInterval = 0; - this.url = ""; - this.userFromParams = null; - this.useraleVersion = null; - this.userId = null; - this.version = null; - this.websocketsEnabled = false; - // Call the initialization method only if it's the first time instantiating - if (Configuration.instance === null) { - this.initialize(); - } - } - // Static method to get the singleton instance - static getInstance() { - if (Configuration.instance === null) { - Configuration.instance = new Configuration(); - } - return Configuration.instance; - } - initialize() { - const settings = getInitialSettings(); - this.update(settings); - } - /** - * Resets the configuration to its initial state. - */ - reset() { - this.initialize(); - } - /** - * Shallow merges a newConfig with the configuration class, updating it. - * Retrieves/updates the userid if userFromParams is provided. - * @param {Partial} newConfig Configuration object to merge into the current config. - */ - update(newConfig) { - Object.keys(newConfig).forEach((option) => { - if (option === "userFromParams") { - const userParamString = newConfig[option]; - const userId = userParamString - ? Configuration.getUserIdFromParams(userParamString) - : null; - if (userId) { - this["userId"] = userId; - } - } - const hasNewUserFromParams = newConfig["userFromParams"]; - const willNullifyUserId = option === "userId" && newConfig[option] === null; - if (willNullifyUserId && hasNewUserFromParams) { - return; - } - const newOption = newConfig[option]; - if (newOption !== undefined) { - this[option] = newOption; - } - }); - } - /** - * Attempts to extract the userid from the query parameters of the URL. - * @param {string} param The name of the query parameter containing the userid. - * @return {string | null} The extracted/decoded userid, or null if none is found. - */ - static getUserIdFromParams(param) { - const userField = param; - const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); - const results = window.location.href.match(regex); - if (results && results[2]) { - return decodeURIComponent(results[2].replace(/\+/g, " ")); - } - return null; - } - } - // Private static property to hold the singleton instance - Configuration.instance = null; - - var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - var BrowserInfo = /** @class */ (function () { - function BrowserInfo(name, version, os) { - this.name = name; - this.version = version; - this.os = os; - this.type = 'browser'; - } - return BrowserInfo; - }()); - var NodeInfo = /** @class */ (function () { - function NodeInfo(version) { - this.version = version; - this.type = 'node'; - this.name = 'node'; - this.os = process.platform; - } - return NodeInfo; - }()); - var SearchBotDeviceInfo = /** @class */ (function () { - function SearchBotDeviceInfo(name, version, os, bot) { - this.name = name; - this.version = version; - this.os = os; - this.bot = bot; - this.type = 'bot-device'; - } - return SearchBotDeviceInfo; - }()); - var BotInfo = /** @class */ (function () { - function BotInfo() { - this.type = 'bot'; - this.bot = true; // NOTE: deprecated test name instead - this.name = 'bot'; - this.version = null; - this.os = null; - } - return BotInfo; - }()); - var ReactNativeInfo = /** @class */ (function () { - function ReactNativeInfo() { - this.type = 'react-native'; - this.name = 'react-native'; - this.version = null; - this.os = null; - } - return ReactNativeInfo; - }()); - // tslint:disable-next-line:max-line-length - var SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/; - var SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/; - var REQUIRED_VERSION_PARTS = 3; - var userAgentRules = [ - ['aol', /AOLShield\/([0-9\._]+)/], - ['edge', /Edge\/([0-9\._]+)/], - ['edge-ios', /EdgiOS\/([0-9\._]+)/], - ['yandexbrowser', /YaBrowser\/([0-9\._]+)/], - ['kakaotalk', /KAKAOTALK\s([0-9\.]+)/], - ['samsung', /SamsungBrowser\/([0-9\.]+)/], - ['silk', /\bSilk\/([0-9._-]+)\b/], - ['miui', /MiuiBrowser\/([0-9\.]+)$/], - ['beaker', /BeakerBrowser\/([0-9\.]+)/], - ['edge-chromium', /EdgA?\/([0-9\.]+)/], - [ - 'chromium-webview', - /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/, - ], - ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], - ['phantomjs', /PhantomJS\/([0-9\.]+)(:?\s|$)/], - ['crios', /CriOS\/([0-9\.]+)(:?\s|$)/], - ['firefox', /Firefox\/([0-9\.]+)(?:\s|$)/], - ['fxios', /FxiOS\/([0-9\.]+)/], - ['opera-mini', /Opera Mini.*Version\/([0-9\.]+)/], - ['opera', /Opera\/([0-9\.]+)(?:\s|$)/], - ['opera', /OPR\/([0-9\.]+)(:?\s|$)/], - ['pie', /^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/], - ['pie', /^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/], - ['netfront', /^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/], - ['ie', /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/], - ['ie', /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/], - ['ie', /MSIE\s(7\.0)/], - ['bb10', /BB10;\sTouch.*Version\/([0-9\.]+)/], - ['android', /Android\s([0-9\.]+)/], - ['ios', /Version\/([0-9\._]+).*Mobile.*Safari.*/], - ['safari', /Version\/([0-9\._]+).*Safari/], - ['facebook', /FB[AS]V\/([0-9\.]+)/], - ['instagram', /Instagram\s([0-9\.]+)/], - ['ios-webview', /AppleWebKit\/([0-9\.]+).*Mobile/], - ['ios-webview', /AppleWebKit\/([0-9\.]+).*Gecko\)$/], - ['curl', /^curl\/([0-9\.]+)$/], - ['searchbot', SEARCHBOX_UA_REGEX], - ]; - var operatingSystemRules = [ - ['iOS', /iP(hone|od|ad)/], - ['Android OS', /Android/], - ['BlackBerry OS', /BlackBerry|BB10/], - ['Windows Mobile', /IEMobile/], - ['Amazon OS', /Kindle/], - ['Windows 3.11', /Win16/], - ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/], - ['Windows 98', /(Windows 98)|(Win98)/], - ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/], - ['Windows XP', /(Windows NT 5.1)|(Windows XP)/], - ['Windows Server 2003', /(Windows NT 5.2)/], - ['Windows Vista', /(Windows NT 6.0)/], - ['Windows 7', /(Windows NT 6.1)/], - ['Windows 8', /(Windows NT 6.2)/], - ['Windows 8.1', /(Windows NT 6.3)/], - ['Windows 10', /(Windows NT 10.0)/], - ['Windows ME', /Windows ME/], - ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/], - ['Open BSD', /OpenBSD/], - ['Sun OS', /SunOS/], - ['Chrome OS', /CrOS/], - ['Linux', /(Linux)|(X11)/], - ['Mac OS', /(Mac_PowerPC)|(Macintosh)/], - ['QNX', /QNX/], - ['BeOS', /BeOS/], - ['OS/2', /OS\/2/], - ]; - function detect(userAgent) { - if (typeof document === 'undefined' && - typeof navigator !== 'undefined' && - navigator.product === 'ReactNative') { - return new ReactNativeInfo(); - } - if (typeof navigator !== 'undefined') { - return parseUserAgent(navigator.userAgent); - } - return getNodeVersion(); - } - function matchUserAgent(ua) { - // opted for using reduce here rather than Array#first with a regex.test call - // this is primarily because using the reduce we only perform the regex - // execution once rather than once for the test and for the exec again below - // probably something that needs to be benchmarked though - return (ua !== '' && - userAgentRules.reduce(function (matched, _a) { - var browser = _a[0], regex = _a[1]; - if (matched) { - return matched; - } - var uaMatch = regex.exec(ua); - return !!uaMatch && [browser, uaMatch]; - }, false)); - } - function parseUserAgent(ua) { - var matchedRule = matchUserAgent(ua); - if (!matchedRule) { - return null; - } - var name = matchedRule[0], match = matchedRule[1]; - if (name === 'searchbot') { - return new BotInfo(); - } - // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split) - var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3); - if (versionParts) { - if (versionParts.length < REQUIRED_VERSION_PARTS) { - versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true); - } - } - else { - versionParts = []; - } - var version = versionParts.join('.'); - var os = detectOS(ua); - var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua); - if (searchBotMatch && searchBotMatch[1]) { - return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]); - } - return new BrowserInfo(name, version, os); - } - function detectOS(ua) { - for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) { - var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1]; - var match = regex.exec(ua); - if (match) { - return os; - } - } - return null; - } - function getNodeVersion() { - var isNode = typeof process !== 'undefined' && process.version; - return isNode ? new NodeInfo(process.version.slice(1)) : null; - } - function createVersionParts(count) { - var output = []; - for (var ii = 0; ii < count; ii++) { - output.push('0'); - } - return output; - } - - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const browserInfo = detect(); - let logs$1; - let config$1; - // Interval Logging Globals - let intervalId; - let intervalType; - let intervalPath; - let intervalTimer; - let intervalCounter; - let intervalLog; - const filterHandler = null; - const mapHandler = null; - let cbHandlers = {}; - /** - * Adds named callbacks to be executed when logging. - * @param {Object } newCallbacks An object containing named callback functions. - */ - function addCallbacks(...newCallbacks) { - newCallbacks.forEach((source) => { - let descriptors = {}; - descriptors = Object.keys(source).reduce((descriptors, key) => { - descriptors[key] = Object.getOwnPropertyDescriptor(source, key); - return descriptors; - }, descriptors); - Object.getOwnPropertySymbols(source).forEach((sym) => { - const descriptor = Object.getOwnPropertyDescriptor(source, sym); - if (descriptor === null || descriptor === void 0 ? void 0 : descriptor.enumerable) { - descriptors[sym] = descriptor; - } - }); - Object.defineProperties(cbHandlers, descriptors); - }); - return cbHandlers; - } - /** - * Removes callbacks by name. - * @param {String[]} targetKeys A list of names of functions to remove. - */ - function removeCallbacks(targetKeys) { - targetKeys.forEach((key) => { - if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) { - delete cbHandlers[key]; - } - }); - } - /** - * Assigns the config and log container to be used by the logging functions. - * @param {Array} newLogs Log container. - * @param {Object} newConfig Configuration to use while logging. - */ - function initPackager(newLogs, newConfig) { - logs$1 = newLogs; - config$1 = newConfig; - cbHandlers = {}; - intervalId = null; - intervalType = null; - intervalPath = null; - intervalTimer = null; - intervalCounter = 0; - intervalLog = null; - } - /** - * Transforms the provided HTML event into a log and appends it to the log queue. - * @param {Event} e The event to be logged. - * @param {Function} detailFcn The function to extract additional log parameters from the event. - * @return {boolean} Whether the event was logged. - */ - function packageLog(e, detailFcn) { - if (!config$1.on) { - return false; - } - let details = null; - if (detailFcn) { - details = detailFcn(e); - } - const timeFields = extractTimeFields(e.timeStamp && e.timeStamp > 0 ? config$1.time(e.timeStamp) : Date.now()); - let log = { - target: e.target ? getSelector(e.target) : null, - path: buildPath(e), - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: timeFields.milli, - microTime: timeFields.micro, - location: getLocation(e), - scrnRes: getScreenRes(), - type: e.type, - logType: "raw", - userAction: true, - details: details, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - attributes: buildAttrs(e), - style: buildCSS(e), - }; - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, e); - if (!log) { - return false; - } - } - } - logs$1.push(log); - return true; - } - /** - * Packages the provided customLog to include standard meta data and appends it to the log queue. - * @param {Logging.CustomLog} customLog The behavior to be logged. - * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. - * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) - * @return {boolean} Whether the event was logged. - */ - function packageCustomLog(customLog, detailFcn, userAction) { - if (!config$1.on) { - return false; - } - let details = null; - if (detailFcn.length === 0) { - // In the case of a union, the type checker will default to the more stringent - // type, i.e. the DetailFunction that expects an argument for safety purposes. - // To avoid this, we must explicitly check the type by asserting it receives - // no arguments (detailFcn.length === 0) and then cast it to the - // StaticDetailFunction type. - const staticDetailFcn = detailFcn; - details = staticDetailFcn(); - } - const metaData = { - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: Date.now(), - scrnRes: getScreenRes(), - logType: "custom", - userAction: userAction, - details: details, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - }; - let log = Object.assign(metaData, customLog); - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, null); - if (!log) { - return false; - } - } - } - logs$1.push(log); - return true; - } - /** - * Extract the millisecond and microsecond portions of a timestamp. - * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields. - * @return {Object} An object containing the millisecond - * and microsecond portions of the timestamp. - */ - function extractTimeFields(timeStamp) { - return { - milli: Math.floor(timeStamp), - micro: Number((timeStamp % 1).toFixed(3)), - }; - } - /** - * Track intervals and gather details about it. - * @param {Object} e - * @return boolean - */ - function packageIntervalLog(e) { - try { - const target = e.target ? getSelector(e.target) : null; - const path = buildPath(e); - const type = e.type; - const timestamp = Math.floor(e.timeStamp && e.timeStamp > 0 ? config$1.time(e.timeStamp) : Date.now()); - // Init - this should only happen once on initialization - if (intervalId == null) { - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - if ((intervalId !== target || intervalType !== type) && intervalTimer) { - // When to create log? On transition end - // @todo Possible for intervalLog to not be pushed in the event the interval never ends... - intervalLog = { - target: intervalId, - path: intervalPath, - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - count: intervalCounter, - duration: timestamp - intervalTimer, // microseconds - startTime: intervalTimer, - endTime: timestamp, - type: intervalType, - logType: "interval", - targetChange: intervalId !== target, - typeChange: intervalType !== type, - userAction: false, - userId: config$1.userId, - toolVersion: config$1.toolVersion, - toolName: config$1.toolName, - useraleVersion: config$1.useraleVersion, - sessionId: config$1.sessionId, - httpSessionId: config$1.httpSessionId, - browserSessionId: config$1.browserSessionId, - }; - if (typeof filterHandler === "function" && !filterHandler(intervalLog)) ; - if (typeof mapHandler === "function") ; - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - intervalLog = func(intervalLog, null); - if (!intervalLog) { - return false; - } - } - } - if (intervalLog) - logs$1.push(intervalLog); - // Reset - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - // Interval is still occuring, just update counter - if (intervalId == target && intervalType == type && intervalCounter) { - intervalCounter = intervalCounter + 1; - } - return true; - } - catch (_a) { - return false; - } - } - /** - * Extracts coordinate information from the event - * depending on a few browser quirks. - * @param {Event} e The event to extract coordinate information from. - * @return {Object} An object containing nullable x and y coordinates for the event. - */ - function getLocation(e) { - if (e instanceof MouseEvent) { - if (e.pageX != null) { - return { x: e.pageX, y: e.pageY }; - } - else if (e.clientX != null) { - return { - x: document.documentElement.scrollLeft + e.clientX, - y: document.documentElement.scrollTop + e.clientY, - }; - } - } - else { - return { x: null, y: null }; - } - } - /** - * Extracts innerWidth and innerHeight to provide estimates of screen resolution - * @return {Object} An object containing the innerWidth and InnerHeight - */ - function getScreenRes() { - return { width: window.innerWidth, height: window.innerHeight }; - } - /** - * Builds a string CSS selector from the provided element - * @param {EventTarget} ele The element from which the selector is built. - * @return {string} The CSS selector for the element, or Unknown if it can't be determined. - */ - function getSelector(ele) { - if (ele instanceof HTMLElement || ele instanceof Element) { - if (ele.localName) { - return (ele.localName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "")); - } - else if (ele.nodeName) { - return (ele.nodeName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "")); - } - } - else if (ele instanceof Document) { - return "#document"; - } - else if (ele === globalThis) { - return "Window"; - } - return "Unknown"; - } - /** - * Builds an array of elements from the provided event target, to the root element. - * @param {Event} e Event from which the path should be built. - * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. - */ - function buildPath(e) { - const path = e.composedPath(); - return selectorizePath(path); - } - /** - * Builds a CSS selector path from the provided list of elements. - * @param {EventTarget[]} path Array of HTML Elements from which the path should be built. - * @return {string[]} Array of string CSS selectors. - */ - function selectorizePath(path) { - let i = 0; - let pathEle; - const pathSelectors = []; - while ((pathEle = path[i])) { - pathSelectors.push(getSelector(pathEle)); - ++i; - pathEle = path[i]; - } - return pathSelectors; - } - function detectBrowser() { - return { - browser: browserInfo ? browserInfo.name : "", - version: browserInfo ? browserInfo.version : "", - }; - } - /** - * Builds an object containing attributes of an element. - * Attempts to parse all attribute values as JSON text. - * @param {Event} e Event from which the target element's attributes should be extracted. - * @return {Record} Object with element attributes as key-value pairs. - */ - function buildAttrs(e) { - const attributes = {}; - const attributeBlackList = ["style"]; - if (e.target && e.target instanceof Element) { - for (const attr of e.target.attributes) { - if (attributeBlackList.includes(attr.name)) - continue; - let val = attr.value; - try { - val = JSON.parse(val); - } - catch (error) { - // Ignore parsing errors, fallback to raw string value - } - attributes[attr.name] = val; - } - } - return attributes; - } - /** - * Builds an object containing all CSS properties of an element. - * @param {Event} e Event from which the target element's properties should be extracted. - * @return {Record} Object with all CSS properties as key-value pairs. - */ - function buildCSS(e) { - const properties = {}; - if (e.target && e.target instanceof HTMLElement) { - const styleObj = e.target.style; - for (let i = 0; i < styleObj.length; i++) { - const prop = styleObj[i]; - properties[prop] = styleObj.getPropertyValue(prop); - } - } - return properties; - } - - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - //@todo: Investigate drag events and their behavior - let events; - let bufferBools; - let bufferedEvents; - let refreshEvents; - const intervalEvents = [ - "click", - "focus", - "blur", - "input", - "change", - "mouseover", - "submit", - ]; - const windowEvents = ["load", "blur", "focus"]; - /** - * Maps a MouseEvent to an object containing useful information. - * @param {MouseEvent} e Event to extract data from - */ - function extractMouseDetails(e) { - return { - clicks: e.detail, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey, - // 'text' : e.target.innerHTML - }; - } - /** Maps a KeyboardEvent to an object containing useful infromation - * @param {KeyboardEvent} e Event to extract data from - */ - function extractKeyboardDetails(e) { - return { - key: e.key, - code: e.code, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey, - }; - } - /** - * Maps a ChangeEvent to an object containing useful information. - * @param {Events.ChangeEvent} e Event to extract data from - */ - function extractChangeDetails(e) { - return { - value: e.target.value, - }; - } - /** - * Maps a WheelEvent to an object containing useful information. - * @param {WheelEvent} e Event to extract data from - */ - function extractWheelDetails(e) { - return { - x: e.deltaX, - y: e.deltaY, - z: e.deltaZ, - }; - } - /** - * Maps a ScrollEvent to an object containing useful information. - */ - function extractScrollDetails() { - return { - x: window.scrollX, - y: window.scrollY, - }; - } - /** - * Maps a ResizeEvent to an object containing useful information. - */ - function extractResizeDetails() { - return { - width: window.outerWidth, - height: window.outerHeight, - }; - } - /** - * Defines the way information is extracted from various events. - * Also defines which events we will listen to. - * @param {Settings.Config} config Configuration object to read from. - */ - function defineDetails(config) { - // Events list - // Keys are event types - // Values are functions that return details object if applicable - events = { - click: extractMouseDetails, - dblclick: extractMouseDetails, - mousedown: extractMouseDetails, - mouseup: extractMouseDetails, - focus: null, - blur: null, - input: config.logDetails ? extractKeyboardDetails : null, - change: config.logDetails ? extractChangeDetails : null, - dragstart: null, - dragend: null, - drag: null, - drop: null, - keydown: config.logDetails ? extractKeyboardDetails : null, - mouseover: null, - }; - bufferBools = {}; - bufferedEvents = { - wheel: extractWheelDetails, - scroll: extractScrollDetails, - resize: extractResizeDetails, - }; - refreshEvents = { - submit: null, - }; - } - /** - * Defines the way information is extracted from various events. - * Also defines which events we will listen to. - * @param {Settings.Config} options UserALE Configuration object to read from. - * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods. - */ - function defineCustomDetails(options, type) { - // Events list - // Keys are event types - // Values are functions that return details object if applicable - const eventType = { - click: extractMouseDetails, - dblclick: extractMouseDetails, - mousedown: extractMouseDetails, - mouseup: extractMouseDetails, - focus: null, - blur: null, - load: null, - input: options.logDetails ? extractKeyboardDetails : null, - change: options.logDetails ? extractChangeDetails : null, - dragstart: null, - dragend: null, - drag: null, - drop: null, - keydown: options.logDetails ? extractKeyboardDetails : null, - mouseover: null, - wheel: extractWheelDetails, - scroll: extractScrollDetails, - resize: extractResizeDetails, - submit: null, - }; - return eventType[type]; - } - /** - * Hooks the event handlers for each event type of interest. - * @param {Configuration} config Configuration singleton to use. - * @return {boolean} Whether the operation succeeded - */ - function attachHandlers(config) { - try { - defineDetails(config); - Object.keys(events).forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageLog(e, events[ev]); - }, true); - }); - intervalEvents.forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageIntervalLog(e); - }, true); - }); - Object.keys(bufferedEvents).forEach(function (ev) { - bufferBools[ev] = true; - window.addEventListener(ev, function (e) { - if (bufferBools[ev]) { - bufferBools[ev] = false; - packageLog(e, bufferedEvents[ev]); - setTimeout(function () { - bufferBools[ev] = true; - }, config.resolution); - } - }, true); - }); - Object.keys(refreshEvents).forEach(function (ev) { - document.addEventListener(ev, function (e) { - packageLog(e, events[ev]); - }, true); - }); - windowEvents.forEach(function (ev) { - window.addEventListener(ev, function (e) { - packageLog(e, function () { - return { window: true }; - }); - }, true); - }); - return true; - } - catch (_a) { - return false; - } - } - - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - let authCallback = null; - /** - * Fetches the most up-to-date auth header string from the auth callback - * and updates the config object with the new value. - * @param {Configuration} config Configuration object to be updated. - * @param {Function} authCallback Callback used to fetch the newest header. - * @returns {void} - */ - function updateAuthHeader(config) { - if (authCallback) { - try { - config.authHeader = authCallback(); - } - catch (e) { - // We should emit the error, but otherwise continue as this could be a temporary issue - // due to network connectivity or some logic inside the authCallback which is the user's - // responsibility. - console.error(`Error encountered while setting the auth header: ${e}`); - } - } - } - /** - * Registers the provided callback to be used when updating the auth header. - * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string. - * @returns {boolean} Whether the operation succeeded. - */ - function registerAuthCallback(callback) { - try { - verifyCallback(callback); - authCallback = callback; - return true; - } - catch (e) { - return false; - } - } - /** - * Verify that the provided callback is a function which returns a string - * @param {Function} callback Callback used to fetch the newest header. Should return a string. - * @throws {Error} If the callback is not a function or does not return a string. - * @returns {void} - */ - function verifyCallback(callback) { - if (typeof callback !== "function") { - throw new Error("Userale auth callback must be a function"); - } - const result = callback(); - if (typeof result !== "string") { - throw new Error("Userale auth callback must return a string"); - } - } - - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - let sendIntervalId; - /** - * Initializes the log queue processors. - * @param {Array} logs Array of logs to append to. - * @param {Configuration} config Configuration object to use when logging. - */ - function initSender(logs, config) { - if (sendIntervalId) { - clearInterval(sendIntervalId); - } - sendIntervalId = sendOnInterval(logs, config); - sendOnClose(logs, config); - } - /** - * Checks the provided log array on an interval, flushing the logs - * if the queue has reached the threshold specified by the provided config. - * @param {Array} logs Array of logs to read from. - * @param {Configuration} config Configuration singleton to be read from. - * @return {Number} The newly created interval id. - */ - function sendOnInterval(logs, config) { - return setInterval(function () { - if (!config.on) { - return; - } - if (logs.length >= config.logCountThreshold) { - sendLogs(logs.slice(0), config); // Send a copy - logs.splice(0); // Clear array reference (no reassignment) - } - }, config.transmitInterval); - } - /** - * Attempts to flush the remaining logs when the window is closed. - * @param {Array} logs Array of logs to be flushed. - * @param {Configuration} config Configuration singleton to be read from. - */ - function sendOnClose(logs, config) { - window.addEventListener("pagehide", function () { - if (!config.on) { - return; - } - if (logs.length > 0) { - if (config.websocketsEnabled) { - const data = JSON.stringify(logs); - exports.wsock.send(data); - } - else { - const headers = new Headers(); - headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); - if (config.authHeader) { - headers.set("Authorization", config.authHeader.toString()); - } - fetch(config.url, { - keepalive: true, - method: "POST", - headers: headers, - body: JSON.stringify(logs), - }).catch((error) => { - console.error(error); - }); - } - logs.splice(0); // clear log queue - } - }); - } - /** - * Sends the provided array of logs to the specified url, - * retrying the request up to the specified number of retries. - * @param {Array} logs Array of logs to send. - * @param {Configuration} config configuration singleton. - * @param {Number} retries Maximum number of attempts to send the logs. - */ - // @todo expose config object to sendLogs replate url with config.url - function sendLogs(logs, config, retries) { - const data = JSON.stringify(logs); - if (config.websocketsEnabled) { - exports.wsock.send(data); - } - else { - const req = new XMLHttpRequest(); - req.open("POST", config.url); - // Update headers - updateAuthHeader(config); - if (config.authHeader) { - req.setRequestHeader("Authorization", typeof config.authHeader === "function" - ? config.authHeader() - : config.authHeader); - } - req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); - if (config.headers) { - Object.entries(config.headers).forEach(([header, value]) => { - req.setRequestHeader(header, value); - }); - } - req.onreadystatechange = function () { - if (req.readyState === 4 && req.status !== 200) ; - }; - req.send(data); - } - } - - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const config = Configuration.getInstance(); - const logs = []; - const startLoadTimestamp = Date.now(); - let endLoadTimestamp; - window.onload = function () { - endLoadTimestamp = Date.now(); - }; - exports.started = false; - exports.wsock = void 0; - config.update({ - useraleVersion: version$1, - }); - initPackager(logs, config); - getWebsocketsEnabled(config); - if (config.autostart) { - setup(config); - } - /** - * Hooks the global event listener, and starts up the - * logging interval. - * @param {Configuration} config Configuration settings for the logger - */ - function setup(config) { - if (!exports.started) { - setTimeout(function () { - const state = document.readyState; - if (config.autostart && - (state === "interactive" || state === "complete")) { - attachHandlers(config); - initSender(logs, config); - exports.started = config.on = true; - packageCustomLog({ - type: "load", - details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp }, - }, () => ({}), false); - } - else { - setup(config); - } - }, 100); - } - } - /** - * Checks to see if the specified backend URL supporsts Websockets - * and updates the config accordingly - */ - function getWebsocketsEnabled(config) { - exports.wsock = new WebSocket(config.url.replace("http://", "ws://")); - exports.wsock.onerror = () => { - console.log("no websockets detected"); - }; - exports.wsock.onopen = () => { - console.log("connection established with websockets"); - config.websocketsEnabled = true; - }; - exports.wsock.onclose = () => { - sendOnClose(logs, config); - }; - } - // Export the Userale API - const version = version$1; - /** - * Used to start the logging process if the - * autostart configuration option is set to false. - */ - function start() { - if (!exports.started || config.autostart === false) { - exports.started = config.on = true; - config.update({ autostart: true }); - } - } - /** - * Halts the logging process. Logs will no longer be sent. - */ - function stop() { - exports.started = config.on = false; - config.update({ autostart: false }); - } - /** - * Updates the current configuration - * object with the provided values. - * @param {Partial} newConfig The configuration options to use. - * @return {Settings.Config} Returns the updated configuration. - */ - function options(newConfig) { - if (newConfig) { - config.update(newConfig); - } - return config; - } - /** - * Appends a log to the log queue. - * @param {Logging.CustomLog} customLog The log to append. - * @return {boolean} Whether the operation succeeded. - */ - function log(customLog) { - if (customLog) { - logs.push(customLog); - return true; - } - else { - return false; - } - } - - exports.addCallbacks = addCallbacks; - exports.buildPath = buildPath; - exports.details = defineCustomDetails; - exports.getSelector = getSelector; - exports.log = log; - exports.options = options; - exports.packageCustomLog = packageCustomLog; - exports.packageLog = packageLog; - exports.registerAuthCallback = registerAuthCallback; - exports.removeCallbacks = removeCallbacks; - exports.start = start; - exports.stop = stop; - exports.version = version; - -})); -//# sourceMappingURL=userale-2.4.0.js.map diff --git a/products/userale/build/userale-2.4.0.js.map b/products/userale/build/userale-2.4.0.js.map deleted file mode 100644 index 5331d2a..0000000 --- a/products/userale/build/userale-2.4.0.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"userale-2.4.0.js","sources":["../src/getInitialSettings.ts","../src/configure.ts","../node_modules/detect-browser/es/index.js","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":[null,null,"var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n",null,null,null,null,null],"names":["this","logs","config","wsock","started","userAleVersion"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;AAeG,CAAA,CAAA,CAAA,CAAA,CAAA;EAIH,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAkB,CAAA,CAAA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CAAA,CAAA,CAAO,MAAM,CAAC;EAChB,CAAC;AAED,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAIG,CAAA,CAAA,CAAA,CAAA,CAAA;EACG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwC,CAAA,CAAA,CAAA;GAC1D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,SAAS,CAAE,CAAA,CAAA;AACb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAI,CAAC,CAAA,CAAA,CAAA,CAAI,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAC;EACrB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,IAAI,CAAC;GACb,CAAA,CAAA,CAAA,CAAA;GAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EACL,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAC;GACd,CAAA,CAAA,CAAA,CAAA;AACH,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;","x_google_ignoreList":[2]} \ No newline at end of file diff --git a/products/userale/build/userale-2.4.0.min.js b/products/userale/build/userale-2.4.0.min.js deleted file mode 100644 index 5422e06..0000000 --- a/products/userale/build/userale-2.4.0.min.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * @preserved - */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).userale={})}(this,(function(e){"use strict";var t="2.4.0";let n=null,o=null;function r(){null===n&&(n=s("userAlesessionId","session_"+String(Date.now()))),null===o&&(o=s("userAleHttpSessionId",function(){const e=new Uint8Array(16);return window.crypto.getRandomValues(e),Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("")}()));const e=document.currentScript||function(){const e=document.getElementsByTagName("script");return e[e.length-1]}(),t=e?e.getAttribute.bind(e):function(){return null},r=t("data-headers");return{authHeader:t("data-auth")||null,autostart:"false"!==t("data-autostart"),browserSessionId:null,custIndex:t("data-index")||null,headers:r?JSON.parse(r):null,httpSessionId:o,logCountThreshold:+(t("data-threshold")||5),logDetails:"true"===t("data-log-details"),resolution:+(t("data-resolution")||500),sessionId:t("data-session")||n,time:i(document.createEvent("CustomEvent")),toolName:t("data-tool")||null,toolVersion:t("data-version")||null,transmitInterval:+(t("data-interval")||5e3),url:t("data-url")||"http://localhost:8000",useraleVersion:t("data-userale-version")||null,userFromParams:t("data-user-from-params")||null,userId:t("data-user")||null}}function s(e,t){return null===window.sessionStorage.getItem(e)?(window.sessionStorage.setItem(e,JSON.stringify(t)),t):JSON.parse(window.sessionStorage.getItem(e)||"")}function i(e){let t;if(e.timeStamp&&e.timeStamp>0){const n=Date.now()-e.timeStamp;if(n<0)t=function(){return e.timeStamp/1e3};else if(n>e.timeStamp){const e=performance.timeOrigin;t=function(t){return t+e}}else t=function(e){return e}}else t=function(){return Date.now()};return t}class a{constructor(){this.autostart=!1,this.authHeader=null,this.browserSessionId=null,this.custIndex=null,this.headers=null,this.httpSessionId=null,this.logCountThreshold=0,this.logDetails=!1,this.on=!1,this.resolution=0,this.sessionId=null,this.time=()=>Date.now(),this.toolName=null,this.toolVersion=null,this.transmitInterval=0,this.url="",this.userFromParams=null,this.useraleVersion=null,this.userId=null,this.version=null,this.websocketsEnabled=!1,null===a.instance&&this.initialize()}static getInstance(){return null===a.instance&&(a.instance=new a),a.instance}initialize(){const e=r();this.update(e)}reset(){this.initialize()}update(e){Object.keys(e).forEach((t=>{if("userFromParams"===t){const n=e[t],o=n?a.getUserIdFromParams(n):null;o&&(this.userId=o)}const n=e.userFromParams;if("userId"===t&&null===e[t]&&n)return;const o=e[t];void 0!==o&&(this[t]=o)}))}static getUserIdFromParams(e){const t=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),n=window.location.href.match(t);return n&&n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):null}}a.instance=null;var l=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,s=t.length;r0?S.time(e.timeStamp):Date.now(),{milli:Math.floor(r),micro:Number((r%1).toFixed(3))});var r;let s={target:e.target?B(e.target):null,path:H(e),pageUrl:window.location.href,pageTitle:document.title,pageReferrer:document.referrer,browser:L(),clientTime:o.milli,microTime:o.micro,location:j(e),scrnRes:D(),type:e.type,logType:"raw",userAction:!0,details:n,userId:S.userId,toolVersion:S.toolVersion,toolName:S.toolName,useraleVersion:S.useraleVersion,sessionId:S.sessionId,httpSessionId:S.httpSessionId,browserSessionId:S.browserSessionId,attributes:R(e),style:$(e)};for(const t of Object.values(M))if("function"==typeof t&&(s=t(s,e),!s))return!1;return y.push(s),!0}function V(e,t,n){if(!S.on)return!1;let o=null;if(0===t.length){o=t()}const r={pageUrl:window.location.href,pageTitle:document.title,pageReferrer:document.referrer,browser:L(),clientTime:Date.now(),scrnRes:D(),logType:"custom",userAction:n,details:o,userId:S.userId,toolVersion:S.toolVersion,toolName:S.toolName,useraleVersion:S.useraleVersion,sessionId:S.sessionId,httpSessionId:S.httpSessionId,browserSessionId:S.browserSessionId};let s=Object.assign(r,e);for(const e of Object.values(M))if("function"==typeof e&&(s=e(s,null),!s))return!1;return y.push(s),!0}function j(e){return e instanceof MouseEvent?null!=e.pageX?{x:e.pageX,y:e.pageY}:null!=e.clientX?{x:document.documentElement.scrollLeft+e.clientX,y:document.documentElement.scrollTop+e.clientY}:void 0:{x:null,y:null}}function D(){return{width:window.innerWidth,height:window.innerHeight}}function B(e){if(e instanceof HTMLElement||e instanceof Element){if(e.localName)return e.localName+(e.id?"#"+e.id:"")+(e.className?"."+e.className:"");if(e.nodeName)return e.nodeName+(e.id?"#"+e.id:"")+(e.className?"."+e.className:"")}else{if(e instanceof Document)return"#document";if(e===globalThis)return"Window"}return"Unknown"}function H(e){return function(e){let t,n=0;const o=[];for(;t=e[n];)o.push(B(t)),++n,t=e[n];return o}(e.composedPath())}function L(){return{browser:b?b.name:"",version:b?b.version:""}}function R(e){const t={},n=["style"];if(e.target&&e.target instanceof Element)for(const o of e.target.attributes){if(n.includes(o.name))continue;let e=o.value;try{e=JSON.parse(e)}catch(e){}t[o.name]=e}return t}function $(e){const t={};if(e.target&&e.target instanceof HTMLElement){const n=e.target.style;for(let e=0;e0?S.time(e.timeStamp):Date.now());if(null==v&&(v=t,I=o,k=n,O=r,E=0),(v!==t||I!==o)&&O){T={target:v,path:k,pageUrl:window.location.href,pageTitle:document.title,pageReferrer:document.referrer,browser:L(),count:E,duration:r-O,startTime:O,endTime:r,type:I,logType:"interval",targetChange:v!==t,typeChange:I!==o,userAction:!1,userId:S.userId,toolVersion:S.toolVersion,toolName:S.toolName,useraleVersion:S.useraleVersion,sessionId:S.sessionId,httpSessionId:S.httpSessionId,browserSessionId:S.browserSessionId},"function"==typeof W&&W(T);for(const e of Object.values(M))if("function"==typeof e&&(T=e(T,null),!T))return!1;T&&y.push(T),v=t,I=o,k=n,O=r,E=0}return v==t&&I==o&&E&&(E+=1),!0}catch(e){return!1}}(e)}),!0)})),Object.keys(P).forEach((function(t){x[t]=!0,window.addEventListener(t,(function(n){x[t]&&(x[t]=!1,C(n,P[t]),setTimeout((function(){x[t]=!0}),e.resolution))}),!0)})),Object.keys(A).forEach((function(e){document.addEventListener(e,(function(t){C(t,N[e])}),!0)})),F.forEach((function(e){window.addEventListener(e,(function(e){C(e,(function(){return{window:!0}}))}),!0)})),!0}catch(e){return!1}}let G,Q=null;function Z(t,n){G&&clearInterval(G),G=function(t,n){return setInterval((function(){n.on&&t.length>=n.logCountThreshold&&(!function(t,n,o){const r=JSON.stringify(t);if(n.websocketsEnabled)e.wsock.send(r);else{const e=new XMLHttpRequest;e.open("POST",n.url),function(e){if(Q)try{e.authHeader=Q()}catch(e){console.error(`Error encountered while setting the auth header: ${e}`)}}(n),n.authHeader&&e.setRequestHeader("Authorization","function"==typeof n.authHeader?n.authHeader():n.authHeader),e.setRequestHeader("Content-type","application/json;charset=UTF-8"),n.headers&&Object.entries(n.headers).forEach((([t,n])=>{e.setRequestHeader(t,n)})),e.onreadystatechange=function(){4===e.readyState&&e.status},e.send(r)}}(t.slice(0),n),t.splice(0))}),n.transmitInterval)}(t,n),ee(t,n)}function ee(t,n){window.addEventListener("pagehide",(function(){if(n.on&&t.length>0){if(n.websocketsEnabled){const n=JSON.stringify(t);e.wsock.send(n)}else{const e=new Headers;e.set("Content-Type","applicaiton/json;charset=UTF-8"),n.authHeader&&e.set("Authorization",n.authHeader.toString()),fetch(n.url,{keepalive:!0,method:"POST",headers:e,body:JSON.stringify(t)}).catch((e=>{console.error(e)}))}t.splice(0)}}))}const te=a.getInstance(),ne=[],oe=Date.now();let re;window.onload=function(){re=Date.now()},e.started=!1,e.wsock=void 0,te.update({useraleVersion:t}),y=ne,S=te,M={},v=null,I=null,k=null,O=null,E=0,T=null,function(t){e.wsock=new WebSocket(t.url.replace("http://","ws://")),e.wsock.onerror=()=>{console.log("no websockets detected")},e.wsock.onopen=()=>{console.log("connection established with websockets"),t.websocketsEnabled=!0},e.wsock.onclose=()=>{ee(ne,t)}}(te),te.autostart&&function t(n){e.started||setTimeout((function(){const o=document.readyState;!n.autostart||"interactive"!==o&&"complete"!==o?t(n):(q(n),Z(ne,n),e.started=n.on=!0,V({type:"load",details:{pageLoadTime:re-oe}},(()=>({})),!1))}),100)}(te);const se=t;e.addCallbacks=function(...e){return e.forEach((e=>{let t={};t=Object.keys(e).reduce(((t,n)=>(t[n]=Object.getOwnPropertyDescriptor(e,n),t)),t),Object.getOwnPropertySymbols(e).forEach((n=>{const o=Object.getOwnPropertyDescriptor(e,n);(null==o?void 0:o.enumerable)&&(t[n]=o)})),Object.defineProperties(M,t)})),M},e.buildPath=H,e.details=function(e,t){return{click:_,dblclick:_,mousedown:_,mouseup:_,focus:null,blur:null,load:null,input:e.logDetails?U:null,change:e.logDetails?X:null,dragstart:null,dragend:null,drag:null,drop:null,keydown:e.logDetails?U:null,mouseover:null,wheel:z,scroll:J,resize:Y,submit:null}[t]},e.getSelector=B,e.log=function(e){return!!e&&(ne.push(e),!0)},e.options=function(e){return e&&te.update(e),te},e.packageCustomLog=V,e.packageLog=C,e.registerAuthCallback=function(e){try{return function(e){if("function"!=typeof e)throw new Error("Userale auth callback must be a function");const t=e();if("string"!=typeof t)throw new Error("Userale auth callback must return a string")}(e),Q=e,!0}catch(e){return!1}},e.removeCallbacks=function(e){e.forEach((e=>{Object.prototype.hasOwnProperty.call(M,e)&&delete M[e]}))},e.start=function(){e.started&&!1!==te.autostart||(e.started=te.on=!0,te.update({autostart:!0}))},e.stop=function(){e.started=te.on=!1,te.update({autostart:!1})},e.version=se})); diff --git a/products/userale/build/userale.d.ts b/products/userale/build/userale.d.ts deleted file mode 100644 index 9c9724b..0000000 --- a/products/userale/build/userale.d.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -declare namespace Settings { - type Version = string | null; - type UserId = string | null; - type SessionId = string | null; - type UserFromParams = string | null; - type ToolName = string | null; - type AuthHeader = CallableFunction | string | null; - type CustomIndex = string | null; - type HeaderObject = { [key: string]: string }; - type Headers = HeaderObject | null; - type ConfigValueTypes = - | string - | number - | boolean - | null - | Version - | UserId - | SessionId - | UserFromParams - | ToolName - | AuthHeader - | CustomIndex - | Headers; - - type TimeFunction = (() => number) | ((ts: number) => number); - - export interface DefaultConfig { - [key: string]: ConfigValueTypes; - } - - export interface Config extends DefaultConfig { - autostart: boolean; - authHeader: AuthHeader; - browserSessionId: SessionId; - custIndex: CustomIndex; - headers: Headers; - httpSessionId: SessionId; - logCountThreshold: number; - logDetails: boolean; - on?: boolean; - resolution: number; - sessionId: SessionId; - time: TimeFunction; - toolName: ToolName; - toolVersion?: Version; - transmitInterval: number; - url: string; - userFromParams: UserFromParams; - useraleVersion: Version; - userId: UserId; - version?: Version; - websocketsEnabled?: boolean; - } - - export interface IConfiguration extends Config { - getInstance(): Configuration; - configure(newConfig: Config): void; - } -} - -// TODO: Switch to protobuf for managing log types -declare namespace Logging { - type JSONObject = { - [key: string]: - | string - | number - | boolean - | null - | undefined - | JSONObject - | Array; - }; - export type Log = JSONObject; // TODO: Intersect this with the default log objects (raw & interval) - export type CustomLog = JSONObject; - - export type DynamicDetailFunction = ( - e: E, - ) => JSONObject; - export type StaticDetailFunction = () => JSONObject; -} - -declare namespace Events { - type FormElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement; - type ChangeEvent = Event; - export type RawEvents = - | "dblclick" - | "mouseup" - | "mousedown" - | "dragstart" - | "dragend" - | "drag" - | "drop" - | "keydown"; - export type IntervalEvents = - | "click" - | "focus" - | "blur" - | "input" - | "change" - | "mouseover" - | "submit"; - export type WindowEvents = "load" | "blur" | "focus"; - export type BufferedEvents = "wheel" | "scroll" | "resize"; - export type RefreshEvents = "submit"; - export type AllowedEvents = - | RawEvents - | IntervalEvents - | WindowEvents - | BufferedEvents - | RefreshEvents; - - export type EventDetailsMap = Partial<{ - [key in T]: - | Logging.DynamicDetailFunction< - | MouseEvent - | KeyboardEvent - | InputEvent - | Events.ChangeEvent - | WheelEvent - > - | Logging.StaticDetailFunction - | null; - }>; - - export type EventBoolMap = Partial<{ - [key in T]: boolean; - }>; -} - -declare namespace Callbacks { - export type AuthCallback = () => string; - export type HeadersCallback = () => Settings.HeaderObject; - - export type CallbackMap = { - [key in string]: CallableFunction; - }; -} - -declare namespace Extension { - export type PluginConfig = { urlWhitelist: string }; - export type ConfigPayload = { - useraleConfig: Partial; - pluginConfig: PluginConfig; - }; -} - -export { Callbacks, Events, Extension, Logging, Settings }; diff --git a/products/userale/build/utils/auth/index.d.ts b/products/userale/build/utils/auth/index.d.ts deleted file mode 100644 index fad65ea..0000000 --- a/products/userale/build/utils/auth/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Configuration } from "@/configure"; -import { Callbacks } from "@/types"; -export declare let authCallback: Callbacks.AuthCallback | null; -/** - * Fetches the most up-to-date auth header string from the auth callback - * and updates the config object with the new value. - * @param {Configuration} config Configuration object to be updated. - * @param {Function} authCallback Callback used to fetch the newest header. - * @returns {void} - */ -export declare function updateAuthHeader(config: Configuration): void; -/** - * Registers the provided callback to be used when updating the auth header. - * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string. - * @returns {boolean} Whether the operation succeeded. - */ -export declare function registerAuthCallback(callback: Callbacks.AuthCallback): boolean; -/** - * Verify that the provided callback is a function which returns a string - * @param {Function} callback Callback used to fetch the newest header. Should return a string. - * @throws {Error} If the callback is not a function or does not return a string. - * @returns {void} - */ -export declare function verifyCallback(callback: Callbacks.AuthCallback): void; -/** - * Resets the authCallback to null. Used for primarily for testing, but could be used - * to remove the callback in production. - * @returns {void} - */ -export declare function resetAuthCallback(): void; diff --git a/products/userale/build/utils/headers/index.d.ts b/products/userale/build/utils/headers/index.d.ts deleted file mode 100644 index 6a5fc71..0000000 --- a/products/userale/build/utils/headers/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Configuration } from "@/configure"; -import { Callbacks } from "@/types"; -export declare let headersCallback: Callbacks.HeadersCallback | null; -/** - * Fetches the most up-to-date custom headers object from the headers callback - * and updates the config object with the new value. - * @param {Configuration} config Configuration object to be updated. - * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers. - * @returns {void} - */ -export declare function updateCustomHeaders(config: Configuration): void; -/** - * Registers the provided callback to be used when updating the auth header. - * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object. - * @returns {boolean} Whether the operation succeeded. - */ -export declare function registerHeadersCallback(callback: Callbacks.HeadersCallback): boolean; -/** - * Verify that the provided callback is a function which returns a string - * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object. - * @throws {Error} If the callback is not a function or does not return a string. - * @returns {void} - */ -export declare function verifyCallback(callback: Callbacks.HeadersCallback): void; -/** - * Resets the authCallback to null. Used for primarily for testing, but could be used - * to remove the callback in production. - * @returns {void} - */ -export declare function resetHeadersCallback(): void; diff --git a/products/userale/build/utils/index.d.ts b/products/userale/build/utils/index.d.ts deleted file mode 100644 index 42b406a..0000000 --- a/products/userale/build/utils/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { authCallback, updateAuthHeader, registerAuthCallback, resetAuthCallback, verifyCallback as verifyAuthCallback, } from "./auth"; -export { headersCallback, updateCustomHeaders, registerHeadersCallback, resetHeadersCallback, verifyCallback as verifyHeadersCallback, } from "./headers"; diff --git a/products/userale/package-lock.json b/products/userale/package-lock.json deleted file mode 100644 index 477c85e..0000000 --- a/products/userale/package-lock.json +++ /dev/null @@ -1,12911 +0,0 @@ -{ - "name": "flagon-userale", - "version": "2.4.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "flagon-userale", - "version": "2.4.0", - "hasInstallScript": true, - "license": "Apache-2.0", - "devDependencies": { - "@babel/core": "^7.24.5", - "@babel/plugin-transform-block-scoping": "^7.23.4", - "@babel/plugin-transform-runtime": "^7.23.4", - "@babel/preset-env": "^7.24.5", - "@babel/preset-typescript": "^7.24.1", - "@babel/register": "^7.22.15", - "@eslint/js": "^9.2.0", - "@playwright/test": "^1.51.0", - "@rollup/plugin-babel": "^6.0.4", - "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-json": "^6.0.1", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-terser": "^0.4.4", - "@rollup/plugin-typescript": "^11.1.6", - "@types/chrome": "^0.0.268", - "@types/firefox-webext-browser": "^120.0.3", - "@types/jest": "^29.5.12", - "@types/jsdom": "^21.1.6", - "@types/node": "^20.14.2", - "@types/ws": "^8.5.12", - "@typescript-eslint/eslint-plugin": "^7.8.0", - "@typescript-eslint/parser": "^7.8.0", - "@typescript/lib-dom": "npm:@types/web@^0.0.144", - "babel-jest": "^29.7.0", - "body-parser": "^1.20.2", - "commander": "^12.1.0", - "cypress": "^13.6.0", - "cz-conventional-changelog": "^3.3.0", - "detect-browser": "^5.3.0", - "dom-storage": "^2.1.0", - "esbuild": "^0.21.2", - "eslint": "^8.57.0", - "express": "^4.18.2", - "global-jsdom": "^24.0.0", - "globals": "^15.2.0", - "husky": "^9.0.11", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "jsdom": "^24.0.0", - "jsonschema": "^1.4.1", - "nodemon": "^3.0.2", - "prettier": "^3.2.5", - "rollup": "^4.6.1", - "rollup-plugin-copy": "^3.5.0", - "rollup-plugin-dts": "^6.1.0", - "rollup-plugin-esbuild": "^6.1.1", - "rollup-plugin-license": "^3.2.0", - "ts-node": "^10.9.2", - "typescript": "^5.4.5", - "typescript-eslint": "^7.8.0", - "ws": "^8.18.0" - }, - "engines": { - "node": ">= 18.x", - "npm": ">= 9.x" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.24.6", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.6", - "@babel/generator": "^7.24.6", - "@babel/helper-compilation-targets": "^7.24.6", - "@babel/helper-module-transforms": "^7.24.6", - "@babel/helpers": "^7.24.6", - "@babel/parser": "^7.24.6", - "@babel/template": "^7.24.6", - "@babel/traverse": "^7.24.6", - "@babel/types": "^7.24.6", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.24.6", - "@babel/helper-validator-option": "^7.24.6", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.6", - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-function-name": "^7.24.6", - "@babel/helper-member-expression-to-functions": "^7.24.6", - "@babel/helper-optimise-call-expression": "^7.24.6", - "@babel/helper-replace-supers": "^7.24.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.6", - "@babel/helper-split-export-declaration": "^7.24.6", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.6", - "regexpu-core": "^5.3.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-plugin-utils": "^7.22.5", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.24.6", - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-module-imports": "^7.24.6", - "@babel/helper-simple-access": "^7.24.6", - "@babel/helper-split-export-declaration": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.6", - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-wrap-function": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-member-expression-to-functions": "^7.24.6", - "@babel/helper-optimise-call-expression": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-function-name": "^7.24.6", - "@babel/template": "^7.24.6", - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.24.6", - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.6", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.6", - "@babel/plugin-transform-optional-chaining": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-unicode-sets-regex": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-remap-async-to-generator": "^7.24.6", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-remap-async-to-generator": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.6", - "@babel/helper-compilation-targets": "^7.24.6", - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-function-name": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-replace-supers": "^7.24.6", - "@babel/helper-split-export-declaration": "^7.24.6", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-classes/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/template": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.24.6", - "@babel/helper-function-name": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-simple-access": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-hoist-variables": "^7.24.6", - "@babel/helper-module-transforms": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-replace-supers": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.6", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.6", - "@babel/helper-create-class-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "regenerator-transform": "^0.15.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-runtime": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.1", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typescript": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.6", - "@babel/helper-create-class-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/plugin-syntax-typescript": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.24.6", - "@babel/helper-compilation-targets": "^7.24.6", - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-validator-option": "^7.24.6", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.6", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.6", - "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.24.6", - "@babel/plugin-syntax-import-attributes": "^7.24.6", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.24.6", - "@babel/plugin-transform-async-generator-functions": "^7.24.6", - "@babel/plugin-transform-async-to-generator": "^7.24.6", - "@babel/plugin-transform-block-scoped-functions": "^7.24.6", - "@babel/plugin-transform-block-scoping": "^7.24.6", - "@babel/plugin-transform-class-properties": "^7.24.6", - "@babel/plugin-transform-class-static-block": "^7.24.6", - "@babel/plugin-transform-classes": "^7.24.6", - "@babel/plugin-transform-computed-properties": "^7.24.6", - "@babel/plugin-transform-destructuring": "^7.24.6", - "@babel/plugin-transform-dotall-regex": "^7.24.6", - "@babel/plugin-transform-duplicate-keys": "^7.24.6", - "@babel/plugin-transform-dynamic-import": "^7.24.6", - "@babel/plugin-transform-exponentiation-operator": "^7.24.6", - "@babel/plugin-transform-export-namespace-from": "^7.24.6", - "@babel/plugin-transform-for-of": "^7.24.6", - "@babel/plugin-transform-function-name": "^7.24.6", - "@babel/plugin-transform-json-strings": "^7.24.6", - "@babel/plugin-transform-literals": "^7.24.6", - "@babel/plugin-transform-logical-assignment-operators": "^7.24.6", - "@babel/plugin-transform-member-expression-literals": "^7.24.6", - "@babel/plugin-transform-modules-amd": "^7.24.6", - "@babel/plugin-transform-modules-commonjs": "^7.24.6", - "@babel/plugin-transform-modules-systemjs": "^7.24.6", - "@babel/plugin-transform-modules-umd": "^7.24.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.6", - "@babel/plugin-transform-new-target": "^7.24.6", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.6", - "@babel/plugin-transform-numeric-separator": "^7.24.6", - "@babel/plugin-transform-object-rest-spread": "^7.24.6", - "@babel/plugin-transform-object-super": "^7.24.6", - "@babel/plugin-transform-optional-catch-binding": "^7.24.6", - "@babel/plugin-transform-optional-chaining": "^7.24.6", - "@babel/plugin-transform-parameters": "^7.24.6", - "@babel/plugin-transform-private-methods": "^7.24.6", - "@babel/plugin-transform-private-property-in-object": "^7.24.6", - "@babel/plugin-transform-property-literals": "^7.24.6", - "@babel/plugin-transform-regenerator": "^7.24.6", - "@babel/plugin-transform-reserved-words": "^7.24.6", - "@babel/plugin-transform-shorthand-properties": "^7.24.6", - "@babel/plugin-transform-spread": "^7.24.6", - "@babel/plugin-transform-sticky-regex": "^7.24.6", - "@babel/plugin-transform-template-literals": "^7.24.6", - "@babel/plugin-transform-typeof-symbol": "^7.24.6", - "@babel/plugin-transform-unicode-escapes": "^7.24.6", - "@babel/plugin-transform-unicode-property-regex": "^7.24.6", - "@babel/plugin-transform-unicode-regex": "^7.24.6", - "@babel/plugin-transform-unicode-sets-regex": "^7.24.6", - "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.4", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "core-js-compat": "^3.31.0", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.6-no-external-plugins", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/preset-typescript": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6", - "@babel/helper-validator-option": "^7.24.6", - "@babel/plugin-syntax-jsx": "^7.24.6", - "@babel/plugin-transform-modules-commonjs": "^7.24.6", - "@babel/plugin-transform-typescript": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/register": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "clone-deep": "^4.0.1", - "find-cache-dir": "^2.0.0", - "make-dir": "^2.1.0", - "pirates": "^4.0.6", - "source-map-support": "^0.5.16" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/regjsgen": { - "version": "0.8.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/runtime": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.24.6", - "@babel/parser": "^7.24.6", - "@babel/types": "^7.24.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.24.6", - "@babel/generator": "^7.24.6", - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-function-name": "^7.24.6", - "@babel/helper-hoist-variables": "^7.24.6", - "@babel/helper-split-export-declaration": "^7.24.6", - "@babel/parser": "^7.24.6", - "@babel/types": "^7.24.6", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.24.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@colors/colors": { - "version": "1.5.0", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@commitlint/config-validator": { - "version": "19.0.3", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@commitlint/types": "^19.0.3", - "ajv": "^8.11.0" - }, - "engines": { - "node": ">=v18" - } - }, - "node_modules/@commitlint/config-validator/node_modules/ajv": { - "version": "8.16.0", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@commitlint/config-validator/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "optional": true - }, - "node_modules/@commitlint/execute-rule": { - "version": "19.0.0", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=v18" - } - }, - "node_modules/@commitlint/load": { - "version": "19.2.0", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@commitlint/config-validator": "^19.0.3", - "@commitlint/execute-rule": "^19.0.0", - "@commitlint/resolve-extends": "^19.1.0", - "@commitlint/types": "^19.0.3", - "chalk": "^5.3.0", - "cosmiconfig": "^9.0.0", - "cosmiconfig-typescript-loader": "^5.0.0", - "lodash.isplainobject": "^4.0.6", - "lodash.merge": "^4.6.2", - "lodash.uniq": "^4.5.0" - }, - "engines": { - "node": ">=v18" - } - }, - "node_modules/@commitlint/load/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@commitlint/resolve-extends": { - "version": "19.1.0", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@commitlint/config-validator": "^19.0.3", - "@commitlint/types": "^19.0.3", - "global-directory": "^4.0.1", - "import-meta-resolve": "^4.0.0", - "lodash.mergewith": "^4.6.2", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=v18" - } - }, - "node_modules/@commitlint/types": { - "version": "19.0.3", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@types/conventional-commits-parser": "^5.0.0", - "chalk": "^5.3.0" - }, - "engines": { - "node": ">=v18" - } - }, - "node_modules/@commitlint/types/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@cypress/request": { - "version": "3.0.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "http-signature": "~1.3.6", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "performance-now": "^2.1.0", - "qs": "6.10.4", - "safe-buffer": "^5.1.2", - "tough-cookie": "^4.1.3", - "tunnel-agent": "^0.6.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@cypress/request/node_modules/qs": { - "version": "6.10.4", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/@cypress/xvfb": { - "version": "1.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.1.0", - "lodash.once": "^4.1.1" - } - }, - "node_modules/@cypress/xvfb/node_modules/debug": { - "version": "3.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.4", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "9.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/console/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/console/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/console/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/console/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@jest/console/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/core/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/core/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@jest/core/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/reporters/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@jest/reporters/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@jest/reporters/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@jest/reporters/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { - "version": "6.0.2", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@jest/reporters/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@jest/reporters/node_modules/semver": { - "version": "7.6.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@jest/reporters/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/transform/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/transform/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/transform/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@jest/transform/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/transform/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/types/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/types/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/types/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@jest/types/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/types/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@playwright/test": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.51.0.tgz", - "integrity": "sha512-dJ0dMbZeHhI+wb77+ljx/FeC8VBP6j/rj9OAojO08JI80wTZy6vRk9KvHKiDCUh4iMpEiseMgqRBIeW+eKX6RA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright": "1.51.0" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@rollup/plugin-babel": { - "version": "6.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@rollup/pluginutils": "^5.0.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "@types/babel__core": "^7.1.9", - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "@types/babel__core": { - "optional": true - }, - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "commondir": "^1.0.1", - "estree-walker": "^2.0.2", - "glob": "^8.0.3", - "is-reference": "1.2.1", - "magic-string": "^0.30.3" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-json": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.1.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "15.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-builtin-module": "^3.2.1", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-terser": { - "version": "0.4.4", - "dev": true, - "license": "MIT", - "dependencies": { - "serialize-javascript": "^6.0.1", - "smob": "^1.0.0", - "terser": "^5.17.4" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-typescript": { - "version": "11.1.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.1.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.14.0||^3.0.0||^4.0.0", - "tslib": "*", - "typescript": ">=3.7.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - }, - "tslib": { - "optional": true - } - } - }, - "node_modules/@rollup/pluginutils": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/chrome": { - "version": "0.0.268", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/filesystem": "*", - "@types/har-format": "*" - } - }, - "node_modules/@types/conventional-commits-parser": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/filesystem": { - "version": "0.0.36", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/filewriter": "*" - } - }, - "node_modules/@types/filewriter": { - "version": "0.0.33", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/firefox-webext-browser": { - "version": "120.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/fs-extra": { - "version": "8.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/glob": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/har-format": { - "version": "1.2.15", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "29.5.12", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "node_modules/@types/jsdom": { - "version": "21.1.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, - "node_modules/@types/minimatch": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "20.14.2", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/resolve": { - "version": "1.20.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/sizzle": { - "version": "2.3.8", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/ws": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", - "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/yargs": { - "version": "17.0.32", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/yauzl": { - "version": "2.10.3", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.11.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.11.0", - "@typescript-eslint/type-utils": "7.11.0", - "@typescript-eslint/utils": "7.11.0", - "@typescript-eslint/visitor-keys": "7.11.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "7.11.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "7.11.0", - "@typescript-eslint/types": "7.11.0", - "@typescript-eslint/typescript-estree": "7.11.0", - "@typescript-eslint/visitor-keys": "7.11.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.11.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.11.0", - "@typescript-eslint/visitor-keys": "7.11.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.11.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "7.11.0", - "@typescript-eslint/utils": "7.11.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "7.11.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.11.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "7.11.0", - "@typescript-eslint/visitor-keys": "7.11.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "7.11.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.11.0", - "@typescript-eslint/types": "7.11.0", - "@typescript-eslint/typescript-estree": "7.11.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.11.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.11.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript/lib-dom": { - "name": "@types/web", - "version": "0.0.144", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "dev": true, - "license": "ISC" - }, - "node_modules/abab": { - "version": "2.0.6", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/accepts": { - "version": "1.3.8", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.11.3", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-globals": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.1.0", - "acorn-walk": "^8.0.2" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arch": { - "version": "2.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-find-index": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/asn1": { - "version": "0.2.6", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/async": { - "version": "3.2.5", - "dev": true, - "license": "MIT" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/at-least-node": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.13.0", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/babel-jest/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/babel-jest/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/babel-jest/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-jest/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-jest/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.2", - "semver": "^6.3.1" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.1", - "core-js-compat": "^3.36.1" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/blob-util": { - "version": "2.0.2", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/bluebird": { - "version": "3.7.2", - "dev": true, - "license": "MIT" - }, - "node_modules/body-parser": { - "version": "1.20.2", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.23.0", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cachedir": { - "version": "2.4.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/call-bind": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001624", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/caseless": { - "version": "0.12.0", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/chardet": { - "version": "0.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/check-more-types": { - "version": "2.24.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-table3": { - "version": "0.6.5", - "dev": true, - "license": "MIT", - "dependencies": { - "string-width": "^4.2.0" - }, - "engines": { - "node": "10.* || >= 12.*" - }, - "optionalDependencies": { - "@colors/colors": "1.5.0" - } - }, - "node_modules/cli-truncate": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-width": { - "version": "3.0.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 10" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/co": { - "version": "4.6.0", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/colorette": { - "version": "2.0.20", - "dev": true, - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/commenting": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/commitizen": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cachedir": "2.3.0", - "cz-conventional-changelog": "3.3.0", - "dedent": "0.7.0", - "detect-indent": "6.1.0", - "find-node-modules": "^2.1.2", - "find-root": "1.1.0", - "fs-extra": "9.1.0", - "glob": "7.2.3", - "inquirer": "8.2.5", - "is-utf8": "^0.2.1", - "lodash": "4.17.21", - "minimist": "1.2.7", - "strip-bom": "4.0.0", - "strip-json-comments": "3.1.1" - }, - "bin": { - "commitizen": "bin/commitizen", - "cz": "bin/git-cz", - "git-cz": "bin/git-cz" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/commitizen/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/commitizen/node_modules/cachedir": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/commitizen/node_modules/dedent": { - "version": "0.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/commitizen/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/commitizen/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/commitizen/node_modules/minimist": { - "version": "1.2.7", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/common-tags": { - "version": "1.8.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/conventional-commit-types": { - "version": "3.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/cookie": { - "version": "0.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "dev": true, - "license": "MIT" - }, - "node_modules/core-js-compat": { - "version": "3.37.1", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/cosmiconfig": { - "version": "9.0.0", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "env-paths": "^2.2.1", - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/cosmiconfig-typescript-loader": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "jiti": "^1.19.1" - }, - "engines": { - "node": ">=v16" - }, - "peerDependencies": { - "@types/node": "*", - "cosmiconfig": ">=8.2", - "typescript": ">=4" - } - }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0", - "optional": true - }, - "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/create-jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/create-jest/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/create-jest/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/create-jest/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/create-jest/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/create-jest/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cssom": { - "version": "0.5.0", - "dev": true, - "license": "MIT" - }, - "node_modules/cssstyle": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "rrweb-cssom": "^0.6.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/cssstyle/node_modules/rrweb-cssom": { - "version": "0.6.0", - "dev": true, - "license": "MIT" - }, - "node_modules/cypress": { - "version": "13.10.0", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "@cypress/request": "^3.0.0", - "@cypress/xvfb": "^1.2.4", - "@types/sinonjs__fake-timers": "8.1.1", - "@types/sizzle": "^2.3.2", - "arch": "^2.2.0", - "blob-util": "^2.0.2", - "bluebird": "^3.7.2", - "buffer": "^5.7.1", - "cachedir": "^2.3.0", - "chalk": "^4.1.0", - "check-more-types": "^2.24.0", - "cli-cursor": "^3.1.0", - "cli-table3": "~0.6.1", - "commander": "^6.2.1", - "common-tags": "^1.8.0", - "dayjs": "^1.10.4", - "debug": "^4.3.4", - "enquirer": "^2.3.6", - "eventemitter2": "6.4.7", - "execa": "4.1.0", - "executable": "^4.1.1", - "extract-zip": "2.0.1", - "figures": "^3.2.0", - "fs-extra": "^9.1.0", - "getos": "^3.2.1", - "is-ci": "^3.0.1", - "is-installed-globally": "~0.4.0", - "lazy-ass": "^1.6.0", - "listr2": "^3.8.3", - "lodash": "^4.17.21", - "log-symbols": "^4.0.0", - "minimist": "^1.2.8", - "ospath": "^1.2.2", - "pretty-bytes": "^5.6.0", - "process": "^0.11.10", - "proxy-from-env": "1.0.0", - "request-progress": "^3.0.0", - "semver": "^7.5.3", - "supports-color": "^8.1.1", - "tmp": "~0.2.1", - "untildify": "^4.0.0", - "yauzl": "^2.10.0" - }, - "bin": { - "cypress": "bin/cypress" - }, - "engines": { - "node": "^16.0.0 || ^18.0.0 || >=20.0.0" - } - }, - "node_modules/cypress/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cypress/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cypress/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cypress/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/cypress/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/cypress/node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/cypress/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cypress/node_modules/semver": { - "version": "7.6.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/cypress/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/cz-conventional-changelog": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^2.4.1", - "commitizen": "^4.0.3", - "conventional-commit-types": "^3.0.0", - "lodash.map": "^4.5.1", - "longest": "^2.0.1", - "word-wrap": "^1.0.3" - }, - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@commitlint/load": ">6.1.1" - } - }, - "node_modules/dashdash": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/data-urls": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/dayjs": { - "version": "1.11.11", - "dev": true, - "license": "MIT" - }, - "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decimal.js": { - "version": "10.4.3", - "dev": true, - "license": "MIT" - }, - "node_modules/dedent": { - "version": "1.5.3", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/defaults": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-browser": { - "version": "5.3.0", - "dev": true, - "license": "MIT" - }, - "node_modules/detect-file": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detect-indent": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dom-storage": { - "version": "2.1.0", - "dev": true, - "license": "(MIT or Apache-2.0)", - "engines": { - "node": "*" - } - }, - "node_modules/domexception": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/electron-to-chromium": { - "version": "1.4.783", - "dev": true, - "license": "ISC" - }, - "node_modules/emittery": { - "version": "0.13.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "dev": true, - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enquirer": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.5.3", - "dev": true, - "license": "MIT" - }, - "node_modules/esbuild": { - "version": "0.21.4", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.4", - "@esbuild/android-arm": "0.21.4", - "@esbuild/android-arm64": "0.21.4", - "@esbuild/android-x64": "0.21.4", - "@esbuild/darwin-arm64": "0.21.4", - "@esbuild/darwin-x64": "0.21.4", - "@esbuild/freebsd-arm64": "0.21.4", - "@esbuild/freebsd-x64": "0.21.4", - "@esbuild/linux-arm": "0.21.4", - "@esbuild/linux-arm64": "0.21.4", - "@esbuild/linux-ia32": "0.21.4", - "@esbuild/linux-loong64": "0.21.4", - "@esbuild/linux-mips64el": "0.21.4", - "@esbuild/linux-ppc64": "0.21.4", - "@esbuild/linux-riscv64": "0.21.4", - "@esbuild/linux-s390x": "0.21.4", - "@esbuild/linux-x64": "0.21.4", - "@esbuild/netbsd-x64": "0.21.4", - "@esbuild/openbsd-x64": "0.21.4", - "@esbuild/sunos-x64": "0.21.4", - "@esbuild/win32-arm64": "0.21.4", - "@esbuild/win32-ia32": "0.21.4", - "@esbuild/win32-x64": "0.21.4" - } - }, - "node_modules/esbuild/node_modules/@esbuild/aix-ppc64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.4.tgz", - "integrity": "sha512-Zrm+B33R4LWPLjDEVnEqt2+SLTATlru1q/xYKVn8oVTbiRBGmK2VIMoIYGJDGyftnGaC788IuzGFAlb7IQ0Y8A==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/android-arm": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.4.tgz", - "integrity": "sha512-E7H/yTd8kGQfY4z9t3nRPk/hrhaCajfA3YSQSBrst8B+3uTcgsi8N+ZWYCaeIDsiVs6m65JPCaQN/DxBRclF3A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/android-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.4.tgz", - "integrity": "sha512-fYFnz+ObClJ3dNiITySBUx+oNalYUT18/AryMxfovLkYWbutXsct3Wz2ZWAcGGppp+RVVX5FiXeLYGi97umisA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/android-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.4.tgz", - "integrity": "sha512-mDqmlge3hFbEPbCWxp4fM6hqq7aZfLEHZAKGP9viq9wMUBVQx202aDIfc3l+d2cKhUJM741VrCXEzRFhPDKH3Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/darwin-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.4.tgz", - "integrity": "sha512-uBsuwRMehGmw1JC7Vecu/upOjTsMhgahmDkWhGLWxIgUn2x/Y4tIwUZngsmVb6XyPSTXJYS4YiASKPcm9Zitag==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.4.tgz", - "integrity": "sha512-8JfuSC6YMSAEIZIWNL3GtdUT5NhUA/CMUCpZdDRolUXNAXEE/Vbpe6qlGLpfThtY5NwXq8Hi4nJy4YfPh+TwAg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/freebsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.4.tgz", - "integrity": "sha512-8d9y9eQhxv4ef7JmXny7591P/PYsDFc4+STaxC1GBv0tMyCdyWfXu2jBuqRsyhY8uL2HU8uPyscgE2KxCY9imQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/linux-arm": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.4.tgz", - "integrity": "sha512-2rqFFefpYmpMs+FWjkzSgXg5vViocqpq5a1PSRgT0AvSgxoXmGF17qfGAzKedg6wAwyM7UltrKVo9kxaJLMF/g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/linux-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.4.tgz", - "integrity": "sha512-/GLD2orjNU50v9PcxNpYZi+y8dJ7e7/LhQukN3S4jNDXCKkyyiyAz9zDw3siZ7Eh1tRcnCHAo/WcqKMzmi4eMQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/linux-ia32": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.4.tgz", - "integrity": "sha512-pNftBl7m/tFG3t2m/tSjuYeWIffzwAZT9m08+9DPLizxVOsUl8DdFzn9HvJrTQwe3wvJnwTdl92AonY36w/25g==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/linux-loong64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.4.tgz", - "integrity": "sha512-cSD2gzCK5LuVX+hszzXQzlWya6c7hilO71L9h4KHwqI4qeqZ57bAtkgcC2YioXjsbfAv4lPn3qe3b00Zt+jIfQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/linux-mips64el": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.4.tgz", - "integrity": "sha512-qtzAd3BJh7UdbiXCrg6npWLYU0YpufsV9XlufKhMhYMJGJCdfX/G6+PNd0+v877X1JG5VmjBLUiFB0o8EUSicA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/linux-ppc64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.4.tgz", - "integrity": "sha512-yB8AYzOTaL0D5+2a4xEy7OVvbcypvDR05MsB/VVPVA7nL4hc5w5Dyd/ddnayStDgJE59fAgNEOdLhBxjfx5+dg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/linux-riscv64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.4.tgz", - "integrity": "sha512-Y5AgOuVzPjQdgU59ramLoqSSiXddu7F3F+LI5hYy/d1UHN7K5oLzYBDZe23QmQJ9PIVUXwOdKJ/jZahPdxzm9w==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/linux-s390x": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.4.tgz", - "integrity": "sha512-Iqc/l/FFwtt8FoTK9riYv9zQNms7B8u+vAI/rxKuN10HgQIXaPzKZc479lZ0x6+vKVQbu55GdpYpeNWzjOhgbA==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/linux-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.4.tgz", - "integrity": "sha512-Td9jv782UMAFsuLZINfUpoF5mZIbAj+jv1YVtE58rFtfvoKRiKSkRGQfHTgKamLVT/fO7203bHa3wU122V/Bdg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/netbsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.4.tgz", - "integrity": "sha512-Awn38oSXxsPMQxaV0Ipb7W/gxZtk5Tx3+W+rAPdZkyEhQ6968r9NvtkjhnhbEgWXYbgV+JEONJ6PcdBS+nlcpA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/openbsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.4.tgz", - "integrity": "sha512-IsUmQeCY0aU374R82fxIPu6vkOybWIMc3hVGZ3ChRwL9hA1TwY+tS0lgFWV5+F1+1ssuvvXt3HFqe8roCip8Hg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/sunos-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.4.tgz", - "integrity": "sha512-hsKhgZ4teLUaDA6FG/QIu2q0rI6I36tZVfM4DBZv3BG0mkMIdEnMbhc4xwLvLJSS22uWmaVkFkqWgIS0gPIm+A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/win32-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.4.tgz", - "integrity": "sha512-UUfMgMoXPoA/bvGUNfUBFLCh0gt9dxZYIx9W4rfJr7+hKe5jxxHmfOK8YSH4qsHLLN4Ck8JZ+v7Q5fIm1huErg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/win32-ia32": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.4.tgz", - "integrity": "sha512-yIxbspZb5kGCAHWm8dexALQ9en1IYDfErzjSEq1KzXFniHv019VT3mNtTK7t8qdy4TwT6QYHI9sEZabONHg+aw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild/node_modules/@esbuild/win32-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.4.tgz", - "integrity": "sha512-sywLRD3UK/qRJt0oBwdpYLBibk7KiRfbswmWRDabuncQYSlf8aLEEUor/oP6KRz8KEG+HoiVLBhPRD5JWjS8Sg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/escodegen": { - "version": "2.1.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/eslint": { - "version": "8.57.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "8.57.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventemitter2": { - "version": "6.4.7", - "dev": true, - "license": "MIT" - }, - "node_modules/execa": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/executable": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "pify": "^2.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/express": { - "version": "4.19.2", - "dev": true, - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.2", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.6.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/extend": { - "version": "3.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/external-editor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/external-editor/node_modules/tmp": { - "version": "0.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/extract-zip": { - "version": "2.0.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "license": "MIT" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.17.1", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/figures": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/find-cache-dir": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/find-node-modules": { - "version": "2.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "findup-sync": "^4.0.0", - "merge": "^2.1.1" - } - }, - "node_modules/find-root": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/findup-sync": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^4.0.2", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "dev": true, - "license": "ISC" - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-extra": { - "version": "9.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-tsconfig": { - "version": "4.7.5", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/getos": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "async": "^3.2.0" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "dev": true, - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "8.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "5.1.6", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/global-directory": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "ini": "4.1.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/global-directory/node_modules/ini": { - "version": "4.1.1", - "dev": true, - "license": "ISC", - "optional": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/global-dirs": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/global-jsdom": { - "version": "24.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "jsdom": ">=24 <25" - } - }, - "node_modules/global-modules": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix/node_modules/ini": { - "version": "1.3.8", - "dev": true, - "license": "ISC" - }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/globals": { - "version": "15.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/html-encoding-sniffer": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^3.1.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/http-errors": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/http-signature": { - "version": "1.3.6", - "dev": true, - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^2.0.2", - "sshpk": "^1.14.1" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/human-signals": { - "version": "1.1.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8.12.0" - } - }, - "node_modules/husky": { - "version": "9.0.11", - "dev": true, - "license": "MIT", - "bin": { - "husky": "bin.mjs" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local/node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/import-meta-resolve": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "optional": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "node_modules/ini": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/inquirer": { - "version": "8.2.5", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/inquirer/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/inquirer/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/inquirer/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "dev": true, - "license": "MIT" - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "builtin-modules": "^3.3.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-ci": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ci-info": "^3.2.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-interactive": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-module": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/is-reference": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-utf8": { - "version": "0.2.1", - "dev": true, - "license": "MIT" - }, - "node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/isobject": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isstream": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/make-dir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.6.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-changed-files/node_modules/execa": { - "version": "5.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/jest-changed-files/node_modules/get-stream": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-changed-files/node_modules/human-signals": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/jest-circus": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-circus/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-circus/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-circus/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-cli": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-cli/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-cli/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-cli/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-config/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-config/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/jest-config/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-config/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-config/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-config/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-config/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/jest-config/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-diff/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-diff/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-diff/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-diff/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-each/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-each/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-each/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-environment-jsdom": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/jsdom": "^20.0.0", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0", - "jsdom": "^20.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jest-environment-jsdom/node_modules/@types/jsdom": { - "version": "20.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/agent-base": { - "version": "6.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/cssstyle": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cssom": "~0.3.6" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-environment-jsdom/node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-environment-jsdom/node_modules/data-urls": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-environment-jsdom/node_modules/form-data": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jest-environment-jsdom/node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-environment-jsdom/node_modules/http-proxy-agent": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jest-environment-jsdom/node_modules/https-proxy-agent": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jest-environment-jsdom/node_modules/iconv-lite": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/jsdom": { - "version": "20.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.6", - "acorn": "^8.8.1", - "acorn-globals": "^7.0.0", - "cssom": "^0.5.0", - "cssstyle": "^2.3.0", - "data-urls": "^3.0.2", - "decimal.js": "^10.4.2", - "domexception": "^4.0.0", - "escodegen": "^2.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.2", - "parse5": "^7.1.1", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0", - "ws": "^8.11.0", - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jest-environment-jsdom/node_modules/tr46": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-environment-jsdom/node_modules/w3c-xmlserializer": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/jest-environment-jsdom/node_modules/whatwg-encoding": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-environment-jsdom/node_modules/whatwg-mimetype": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-environment-jsdom/node_modules/whatwg-url": { - "version": "11.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-environment-jsdom/node_modules/xml-name-validator": { - "version": "4.0.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-environment-node": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-matcher-utils/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-matcher-utils/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-message-util/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-message-util/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-message-util/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-message-util/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-message-util/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-resolve/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-resolve/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-resolve/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-resolve/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-resolve/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runner": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-runner/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-runner/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-runner/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-runner/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runner/node_modules/source-map-support": { - "version": "0.5.13", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/jest-runner/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-runtime/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/jest-runtime/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-runtime/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-runtime/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-runtime/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-runtime/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/jest-runtime/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-snapshot": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-snapshot/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.6.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-snapshot/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-util/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-util/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-util/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-util/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-util/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-validate": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-validate/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-validate/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-validate/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-validate/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-validate/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-watcher": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-watcher/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-watcher/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-watcher/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-watcher/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-watcher/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-watcher/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/jiti": { - "version": "1.21.6", - "dev": true, - "license": "MIT", - "optional": true, - "bin": { - "jiti": "bin/jiti.js" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/jsdom": { - "version": "24.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cssstyle": "^4.0.1", - "data-urls": "^5.0.0", - "decimal.js": "^10.4.3", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.4", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.10", - "parse5": "^7.1.2", - "rrweb-cssom": "^0.7.0", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.4", - "w3c-xmlserializer": "^5.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^3.1.1", - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.0.0", - "ws": "^8.17.0", - "xml-name-validator": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "canvas": "^2.11.2" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsdom/node_modules/form-data": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema": { - "version": "0.4.0", - "dev": true, - "license": "(AFL-2.1 OR BSD-3-Clause)" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "dev": true, - "license": "ISC" - }, - "node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsonschema": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/jsprim": { - "version": "2.0.2", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/lazy-ass": { - "version": "1.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "> 0.8" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/listr2": { - "version": "3.14.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cli-truncate": "^2.1.0", - "colorette": "^2.0.16", - "log-update": "^4.0.0", - "p-map": "^4.0.0", - "rfdc": "^1.3.0", - "rxjs": "^7.5.1", - "through": "^2.3.8", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "enquirer": ">= 2.3.0 < 3" - }, - "peerDependenciesMeta": { - "enquirer": { - "optional": true - } - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "dev": true, - "license": "MIT", - "optional": true - }, - "node_modules/lodash.map": { - "version": "4.6.0", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.mergewith": { - "version": "4.6.2", - "dev": true, - "license": "MIT", - "optional": true - }, - "node_modules/lodash.once": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.uniq": { - "version": "4.5.0", - "dev": true, - "license": "MIT", - "optional": true - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/log-update": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.3.0", - "cli-cursor": "^3.1.0", - "slice-ansi": "^4.0.0", - "wrap-ansi": "^6.2.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-update/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/log-update/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/log-update/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/longest": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/magic-string": { - "version": "0.30.10", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - } - }, - "node_modules/make-dir": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/make-dir/node_modules/pify": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "5.7.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "dev": true, - "license": "ISC" - }, - "node_modules/makeerror": { - "version": "1.0.12", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge": { - "version": "2.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromatch": { - "version": "4.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "dev": true, - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "9.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/moment": { - "version": "2.30.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/mute-stream": { - "version": "0.0.8", - "dev": true, - "license": "ISC" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/negotiator": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.14", - "dev": true, - "license": "MIT" - }, - "node_modules/nodemon": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^4", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^7.5.3", - "simple-update-notifier": "^2.0.0", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/nodemon/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/nodemon/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/nodemon/node_modules/semver": { - "version": "7.6.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nwsapi": { - "version": "2.2.10", - "dev": true, - "license": "MIT" - }, - "node_modules/object-inspect": { - "version": "1.13.1", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/ora": { - "version": "5.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ora/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ora/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/ora/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/ora/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ora/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ospath": { - "version": "1.2.2", - "dev": true, - "license": "MIT" - }, - "node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-name-regex": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/dword-design" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse-passwd": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/parse5": { - "version": "7.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "dev": true, - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/performance-now": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir/node_modules/path-exists": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/playwright": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.51.0.tgz", - "integrity": "sha512-442pTfGM0xxfCYxuBa/Pu6B2OqxqqaYq39JS8QDMGThUvIOCd6s0ANDog3uwA0cHavVlnTQzGCN7Id2YekDSXA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.51.0" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.51.0.tgz", - "integrity": "sha512-x47yPE3Zwhlil7wlNU/iktF7t2r/URR3VLbH6EknJd/04Qc/PSJ0EY3CMXipmglLG+zyRxW6HNo2EGbKLHPWMg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/playwright/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.2.5", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-bytes": { - "version": "5.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pretty-format": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/process": { - "version": "0.11.10", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-from-env": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/psl": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "dev": true, - "license": "MIT" - }, - "node_modules/pump": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/pure-rand": { - "version": "6.1.0", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ], - "license": "MIT" - }, - "node_modules/qs": { - "version": "6.11.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/querystringify": { - "version": "2.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/react-is": { - "version": "18.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/regenerate": { - "version": "1.4.2", - "dev": true, - "license": "MIT" - }, - "node_modules/regenerate-unicode-properties": { - "version": "10.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "dev": true, - "license": "MIT" - }, - "node_modules/regenerator-transform": { - "version": "0.15.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regexpu-core": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/regjsgen": "^0.8.0", - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsparser": "^0.9.1", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsparser": { - "version": "0.9.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/request-progress": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "throttleit": "^1.0.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/resolve": { - "version": "1.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-dir": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rfdc": { - "version": "1.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/rollup": { - "version": "4.18.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.5" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/rollup-plugin-copy": { - "version": "3.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/fs-extra": "^8.0.1", - "colorette": "^1.1.0", - "fs-extra": "^8.1.0", - "globby": "10.0.1", - "is-plain-object": "^3.0.0" - }, - "engines": { - "node": ">=8.3" - } - }, - "node_modules/rollup-plugin-copy/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rollup-plugin-copy/node_modules/colorette": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/rollup-plugin-copy/node_modules/fs-extra": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/rollup-plugin-copy/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup-plugin-copy/node_modules/globby": { - "version": "10.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/rollup-plugin-copy/node_modules/is-plain-object": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/rollup-plugin-copy/node_modules/jsonfile": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/rollup-plugin-copy/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/rollup-plugin-copy/node_modules/universalify": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/rollup-plugin-dts": { - "version": "6.1.1", - "dev": true, - "license": "LGPL-3.0-only", - "dependencies": { - "magic-string": "^0.30.10" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/Swatinem" - }, - "optionalDependencies": { - "@babel/code-frame": "^7.24.2" - }, - "peerDependencies": { - "rollup": "^3.29.4 || ^4", - "typescript": "^4.5 || ^5.0" - } - }, - "node_modules/rollup-plugin-esbuild": { - "version": "6.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.5", - "debug": "^4.3.4", - "es-module-lexer": "^1.3.1", - "get-tsconfig": "^4.7.2" - }, - "engines": { - "node": ">=14.18.0" - }, - "peerDependencies": { - "esbuild": ">=0.18.0", - "rollup": "^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" - } - }, - "node_modules/rollup-plugin-license": { - "version": "3.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "commenting": "~1.1.0", - "glob": "~7.2.0", - "lodash": "~4.17.21", - "magic-string": "~0.30.0", - "mkdirp": "~3.0.0", - "moment": "~2.30.1", - "package-name-regex": "~2.0.6", - "spdx-expression-validate": "~2.0.0", - "spdx-satisfies": "~5.0.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" - } - }, - "node_modules/rollup-plugin-license/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rollup-plugin-license/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup-plugin-license/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/rollup/node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/rrweb-cssom": { - "version": "0.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/run-async": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rxjs": { - "version": "7.8.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/saxes": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=v12.22.7" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/send": { - "version": "0.18.0", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/serve-static": { - "version": "1.15.0", - "dev": true, - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "dev": true, - "license": "ISC" - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "node_modules/simple-update-notifier": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.6.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/smob": { - "version": "1.5.0", - "dev": true, - "license": "MIT" - }, - "node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spdx-compare": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-find-index": "^1.0.2", - "spdx-expression-parse": "^3.0.0", - "spdx-ranges": "^2.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "dev": true, - "license": "CC-BY-3.0" - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-expression-validate": { - "version": "2.0.0", - "dev": true, - "license": "(MIT AND CC-BY-3.0)", - "dependencies": { - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.18", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/spdx-ranges": { - "version": "2.1.1", - "dev": true, - "license": "(MIT AND CC-BY-3.0)" - }, - "node_modules/spdx-satisfies": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "spdx-compare": "^1.0.0", - "spdx-expression-parse": "^3.0.0", - "spdx-ranges": "^2.0.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/sshpk": { - "version": "1.18.0", - "dev": true, - "license": "MIT", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/terser": { - "version": "5.31.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "dev": true, - "license": "MIT" - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/throttleit": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/through": { - "version": "2.3.8", - "dev": true, - "license": "MIT" - }, - "node_modules/tmp": { - "version": "0.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.14" - } - }, - "node_modules/tmpl": { - "version": "1.0.5", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/touch": { - "version": "3.1.1", - "dev": true, - "license": "ISC", - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, - "node_modules/tough-cookie": { - "version": "4.1.4", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/tr46": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/ts-api-utils": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/ts-node": { - "version": "10.9.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/ts-node/node_modules/arg": { - "version": "4.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/tslib": { - "version": "2.6.2", - "dev": true, - "license": "0BSD" - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "dev": true, - "license": "Unlicense" - }, - "node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "dev": true, - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typescript": { - "version": "5.4.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "7.11.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "7.11.0", - "@typescript-eslint/parser": "7.11.0", - "@typescript-eslint/utils": "7.11.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/undefsafe": { - "version": "2.0.5", - "dev": true, - "license": "MIT" - }, - "node_modules/undici-types": { - "version": "5.26.5", - "dev": true, - "license": "MIT" - }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/universalify": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/untildify": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.16", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "dev": true, - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/w3c-xmlserializer": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "xml-name-validator": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/whatwg-mimetype": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-url": { - "version": "14.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "^5.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xml-name-validator": { - "version": "5.0.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, - "node_modules/yargs": { - "version": "17.7.2", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs/node_modules/yargs-parser": { - "version": "21.1.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/products/userale/package.json b/products/userale/package.json index 178c64b..735eb90 100644 --- a/products/userale/package.json +++ b/products/userale/package.json @@ -1,119 +1,11 @@ { - "name": "flagon-userale", - "version": "2.4.0", - "description": "UserALE is the UserALE client for DOM and JavaScript-based applications. It automatically attaches event handlers to log every user interaction on a web page, including rich JS single-page apps.", - "main": "build/userale.js", - "types": "build/userale.d.ts", + "name": "userale-monorepo", + "private": true, + "version": "1.0.0", "scripts": { - "format": "prettier --ignore-path .gitignore --write src/ test/", - "lint": "eslint ./src --fix --ext ts --ext js", - "check-types": "tsc --pretty --noEmit", - "license:check": "license-eye -c .licenserc.yaml header check", - "license:fix": "license-eye -c .licenserc.yaml header fix", - "build": "tsc && npm run clean && rollup -c --bundleConfigAsCjs rollup.config.js", - "clean": "rm -rf ./build", - "test": "npm run test:unit && npm run test:e2e", - "test:unit": "jest -c ./test/unit/jest.config.ts", - "test:e2e": "playwright test -c ./test/e2e/playwright.config.ts", - "pretest:e2e": "rm -rf ./test/e2e/chromeData/*", - "posttest:e2e": "rm -rf ./test/e2e/chromeData/*", - "example:run": "node example/server.js", - "example:watch": "nodemon -w ./example example/server.js", - "prepare": "husky", - "postinstall": "npx playwright install", - "commit": "cz" - }, - "repository": { - "type": "git", - "url": "git://https://github.com/apache/flagon-useralejs" - }, - "keywords": [ - "UserALE", - "Logging", - "Log Analytics", - "Business Analytics", - "Usability", - "User Testing", - "Behavioral Analytics" - ], - "author": "Apache Flagon", - "contributors": [ - "Michelle Beard", - "Robert Foley", - "Alex Ford", - "Clay Gimenez", - "Gedd Johnson", - "Evan Jones", - "Lewis McGibbney", - "Joshua C. Poore", - "Ryan Thenhaus", - "Jason Young" - ], - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/apache/flagon-useralejs/issues" - }, - "homepage": "https://flagon.apache.org/", - "engines": { - "node": ">= 18.x", - "npm": ">= 9.x" + "build": "pnpm -r run build" }, "devDependencies": { - "@babel/core": "^7.24.5", - "@babel/plugin-transform-block-scoping": "^7.23.4", - "@babel/plugin-transform-runtime": "^7.23.4", - "@babel/preset-env": "^7.24.5", - "@babel/preset-typescript": "^7.24.1", - "@babel/register": "^7.22.15", - "@eslint/js": "^9.2.0", - "@playwright/test": "^1.51.0", - "@rollup/plugin-babel": "^6.0.4", - "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-json": "^6.0.1", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-terser": "^0.4.4", - "@rollup/plugin-typescript": "^11.1.6", - "@types/chrome": "^0.0.268", - "@types/firefox-webext-browser": "^120.0.3", - "@types/jest": "^29.5.12", - "@types/jsdom": "^21.1.6", - "@types/node": "^20.14.2", - "@types/ws": "^8.5.12", - "@typescript-eslint/eslint-plugin": "^7.8.0", - "@typescript-eslint/parser": "^7.8.0", - "@typescript/lib-dom": "npm:@types/web@^0.0.144", - "babel-jest": "^29.7.0", - "body-parser": "^1.20.2", - "commander": "^12.1.0", - "cypress": "^13.6.0", - "cz-conventional-changelog": "^3.3.0", - "detect-browser": "^5.3.0", - "dom-storage": "^2.1.0", - "esbuild": "^0.21.2", - "eslint": "^8.57.0", - "express": "^4.18.2", - "global-jsdom": "^24.0.0", - "globals": "^15.2.0", - "husky": "^9.0.11", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "jsdom": "^24.0.0", - "jsonschema": "^1.4.1", - "nodemon": "^3.0.2", - "prettier": "^3.2.5", - "rollup": "^4.6.1", - "rollup-plugin-copy": "^3.5.0", - "rollup-plugin-dts": "^6.1.0", - "rollup-plugin-esbuild": "^6.1.1", - "rollup-plugin-license": "^3.2.0", - "ts-node": "^10.9.2", - "typescript": "^5.4.5", - "typescript-eslint": "^7.8.0", - "ws": "^8.18.0" - }, - "config": { - "commitizen": { - "path": "./node_modules/cz-conventional-changelog" - } + "pnpm": "^10.0.0" } -} +} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/.gitignore b/products/userale/packages/flagon-userale-ext/.gitignore new file mode 100644 index 0000000..0fe0d52 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/.gitignore @@ -0,0 +1,39 @@ + +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +#cache +.turbo + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env* + +out/ +build/ +dist/ + +# plasmo - https://www.plasmo.com +.plasmo + +# bpp - http://bpp.browser.market/ +keys.json + +# typescript +.tsbuildinfo diff --git a/products/userale/packages/flagon-userale-ext/.prettierrc.mjs b/products/userale/packages/flagon-userale-ext/.prettierrc.mjs new file mode 100644 index 0000000..77f84c2 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/.prettierrc.mjs @@ -0,0 +1,26 @@ +/** + * @type {import('prettier').Options} + */ +export default { + printWidth: 80, + tabWidth: 2, + useTabs: false, + semi: false, + singleQuote: false, + trailingComma: "none", + bracketSpacing: true, + bracketSameLine: true, + plugins: ["@ianvs/prettier-plugin-sort-imports"], + importOrder: [ + "", // Node.js built-in modules + "", // Imports not matched by other special words or groups. + "", // Empty line + "^@plasmo/(.*)$", + "", + "^@plasmohq/(.*)$", + "", + "^~(.*)$", + "", + "^[./]" + ] +} diff --git a/products/userale/packages/flagon-userale-ext/README.md b/products/userale/packages/flagon-userale-ext/README.md new file mode 100644 index 0000000..ca9c259 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/README.md @@ -0,0 +1,33 @@ +This is a [Plasmo extension](https://docs.plasmo.com/) project bootstrapped with [`plasmo init`](https://www.npmjs.com/package/plasmo). + +## Getting Started + +First, run the development server: + +```bash +pnpm dev +# or +npm run dev +``` + +Open your browser and load the appropriate development build. For example, if you are developing for the chrome browser, using manifest v3, use: `build/chrome-mv3-dev`. + +You can start editing the popup by modifying `popup.tsx`. It should auto-update as you make changes. To add an options page, simply add a `options.tsx` file to the root of the project, with a react component default exported. Likewise to add a content page, add a `content.ts` file to the root of the project, importing some module and do some logic, then reload the extension on your browser. + +For further guidance, [visit our Documentation](https://docs.plasmo.com/) + +## Making production build + +Run the following: + +```bash +pnpm build +# or +npm run build +``` + +This should create a production bundle for your extension, ready to be zipped and published to the stores. + +## Submit to the webstores + +The easiest way to deploy your Plasmo extension is to use the built-in [bpp](https://bpp.browser.market) GitHub action. Prior to using this action however, make sure to build your extension and upload the first version to the store to establish the basic credentials. Then, simply follow [this setup instruction](https://docs.plasmo.com/framework/workflows/submit) and you should be on your way for automated submission! diff --git a/products/userale/build/UserALEWebExtension/icons/UserALE Logo.png b/products/userale/packages/flagon-userale-ext/assets/icon.png similarity index 100% rename from products/userale/build/UserALEWebExtension/icons/UserALE Logo.png rename to products/userale/packages/flagon-userale-ext/assets/icon.png diff --git a/products/userale/packages/flagon-userale-ext/package.json b/products/userale/packages/flagon-userale-ext/package.json new file mode 100644 index 0000000..996a623 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/package.json @@ -0,0 +1,45 @@ +{ + "name": "flagon-userale-ext", + "private": true, + "displayName": "Flagon Userale extension", + "version": "0.0.1", + "description": "A basic Plasmo extension.", + "author": "Jason Young", + "scripts": { + "dev": "plasmo dev", + "build": "plasmo build", + "package": "plasmo package" + }, + "dependencies": { + "@plasmohq/messaging": "^0.7.1", + "@types/webextension-polyfill": "^0.12.3", + "flagon-userale": "file:../flagon-userale/", + "pkce-challenge": "^5.0.0", + "plasmo": "0.90.3", + "react": "18.2.0", + "react-dom": "18.2.0", + "webextension-polyfill": "^0.12.0" + }, + "devDependencies": { + "@ianvs/prettier-plugin-sort-imports": "4.1.1", + "@types/chrome": "0.0.258", + "@types/node": "20.11.5", + "@types/react": "18.2.48", + "@types/react-dom": "18.2.18", + "autoprefixer": "^10.4.21", + "postcss": "^8.5.3", + "prettier": "3.2.4", + "tailwindcss": "3", + "typescript": "5.3.3" + }, + "manifest": { + "host_permissions": [ + "https://*/*" + ], + "permissions": [ + "identity", + "storage", + "tabs" + ] + } +} diff --git a/products/userale/packages/flagon-userale-ext/postcss.config.js b/products/userale/packages/flagon-userale-ext/postcss.config.js new file mode 100644 index 0000000..1c62447 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/postcss.config.js @@ -0,0 +1,9 @@ +/** + * @type {import('postcss').ProcessOptions} + */ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/index.ts b/products/userale/packages/flagon-userale-ext/src/background/index.ts new file mode 100644 index 0000000..4e9bada --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/background/index.ts @@ -0,0 +1,9 @@ +import * as userale from "flagon-userale"; + +console.log("Service worker loaded!"); + +userale.setup(); + +export function add_log(log) { + userale.log(log); +} diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts new file mode 100644 index 0000000..faf86fa --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts @@ -0,0 +1,8 @@ +import type { PlasmoMessaging } from "@plasmohq/messaging"; +// import * as userale from "flagon-userale"; + +const handler: PlasmoMessaging.MessageHandler = async (req, res) => { +// userale.config(req); +} + +export default handler \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts new file mode 100644 index 0000000..e69de29 diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/issue_report.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/issue_report.ts new file mode 100644 index 0000000..e69de29 diff --git a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts new file mode 100644 index 0000000..a7aac4d --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts @@ -0,0 +1,15 @@ +import type { PlasmoMessaging } from "@plasmohq/messaging"; +// import { add_log } from "~/background"; + +const handler: PlasmoMessaging.PortHandler = async (req, res) => { + // console.log(req); + // // log.browserSessionId = browserSessionId; + // // req = filterUrl(req); + // if (req) { + // console.log(req); + // add_log(req); + // } + +} + +export default handler; \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/utils.ts b/products/userale/packages/flagon-userale-ext/src/background/utils.ts new file mode 100644 index 0000000..b9f5a5c --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/background/utils.ts @@ -0,0 +1,12 @@ +// import allowList; + +// function filterUrl(log) { +// if (allowRegex.test(log.pageUrl as string)) { +// return log; +// } +// return false; +// } + + +// const options: StoredOptions = await getStoredOptions(); +// const allowRegex: RegExp = new RegExp(options.allowList); \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/content.ts b/products/userale/packages/flagon-userale-ext/src/content.ts new file mode 100644 index 0000000..967507d --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/content.ts @@ -0,0 +1,20 @@ +import type { PlasmoCSConfig } from "plasmo"; +import { getPort } from "@plasmohq/messaging/port"; +import * as userale from "flagon-userale"; + +export const config: PlasmoCSConfig = { + matches: [""], + all_frames: true +}; + +const logPort = getPort("log"); + +userale.addCallbacks({ + rerouteLog(log) { + console.log(log) + logPort.postMessage(log); + return false; + } +}); + +userale.start(); \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/options/auth.tsx b/products/userale/packages/flagon-userale-ext/src/options/auth.tsx new file mode 100644 index 0000000..bb365e4 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/options/auth.tsx @@ -0,0 +1,101 @@ +import { useState } from "react"; +import browser from "webextension-polyfill"; +import pkceChallenge from "pkce-challenge"; +import { + setStoredOptions, +} from "~/utils/storage"; + +function Auth() { + const [issuerUrl, setIssuerUrl] = useState(""); + const [clientId, setClientId] = useState(""); + const [message, setMessage] = useState(""); + + const handleLogin = async () => { + try { + // Generate the PKCE challenge pair (code_verifier and code_challenge) + const { code_verifier, code_challenge } = await pkceChallenge(); + + const redirectUri = browser.identity.getRedirectURL("oauth2"); + + // Construct the OAuth authorization URL + const authUrl = + `${issuerUrl}/protocol/openid-connect/auth?` + + `client_id=${clientId}` + + `&response_type=code` + + `&redirect_uri=${encodeURIComponent(redirectUri)}` + + `&scope=openid profile` + + `&code_challenge=${code_challenge}` + + `&code_challenge_method=S256`; + + // Launch the web auth flow + const resultUrl = await browser.identity.launchWebAuthFlow({ + url: authUrl, + interactive: true, + }); + + // Extract the authorization code from the redirect URL + const url = new URL(resultUrl); + const authCode = url.searchParams.get("code"); + + if (!authCode) throw new Error("No code returned"); + + // Exchange the authorization code for an access token + const tokenRes = await fetch( + `${issuerUrl}/protocol/openid-connect/token`, + { + method: "POST", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + body: new URLSearchParams({ + grant_type: "authorization_code", + client_id: clientId, + redirect_uri: redirectUri, + code: authCode, + code_verifier: code_verifier, + }), + } + ); + + const tokens = await tokenRes.json(); + await setStoredOptions({ accessToken: tokens.access_token }); + + setMessage("Login successful!"); + } catch (err) { + console.error("Login error:", err); + setMessage(err.toString()); + } + }; + + return ( +
+

OAuth Login

+
+
+ + setIssuerUrl(e.target.value)} + placeholder="https://issuer.com/realms/myrealm" + required + /> +
+
+ + setClientId(e.target.value)} + placeholder="your-client-id" + required + /> +
+
+ +
+
+ {message &&

{message}

} +
+ ); +} + +export default Auth; diff --git a/products/userale/packages/flagon-userale-ext/src/options/index.tsx b/products/userale/packages/flagon-userale-ext/src/options/index.tsx new file mode 100644 index 0000000..bea06b8 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/options/index.tsx @@ -0,0 +1,14 @@ +import Auth from "~/options/auth"; +import Logging from "~/options/logging"; + +function Options() { + return ( +
+

Extension Options

+ + +
+ ); +} + +export default Options; \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/options/logging.tsx b/products/userale/packages/flagon-userale-ext/src/options/logging.tsx new file mode 100644 index 0000000..f5ce4f0 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/options/logging.tsx @@ -0,0 +1,44 @@ +import { useState, useEffect } from "react"; +import { + getStoredOptions, + setStoredOptions, +} from "~/utils/storage"; + +function Logging() { + const [loggingUrl, setLoggingUrl] = useState(""); + const [allowList, setAllowList] = useState(""); + + useEffect(() => { + getStoredOptions().then((data) => { + setLoggingUrl(data.loggingUrl); + setAllowList(data.allowList); + }); + }, []); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + const resp = await setStoredOptions({ loggingUrl, allowList }); + alert(resp); + } + + return ( +
+

Logging Options

+
+ + setLoggingUrl(e.target.value)} /> +
+ + + setAllowList(e.target.value)} /> +
+ +
+ +
+
+
+ ); +}; + +export default Logging \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/popup.tsx b/products/userale/packages/flagon-userale-ext/src/popup.tsx new file mode 100644 index 0000000..2c88894 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/popup.tsx @@ -0,0 +1,66 @@ +import { useState } from "react"; +import Options from "~/options"; + +function IndexPopup() { + const [issueType, setIssueType] = useState("Bug"); + const [issueDescription, setIssueDescription] = useState(""); + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + // TODO add messaging + }; + + return ( +
+ +

Report an Issue

+
+ +
+ +
+ + +
+
+ -
-
- -
-
- - diff --git a/products/userale/src/UserALEWebExtension/content.ts b/products/userale/src/UserALEWebExtension/content.ts deleted file mode 100644 index 5e97b0b..0000000 --- a/products/userale/src/UserALEWebExtension/content.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { messageTypes } from "@/UserALEWebExtension/messageTypes"; -import * as userale from "@/main"; -import { rerouteLog, browser, configKey } from "@/UserALEWebExtension/globals"; - -browser.storage.local.get( - [configKey], - // @ts-expect-error Typescript is not aware that firefox's broswer is overloaded - // to support chromium style MV2 callbacks - (res) => { - userale.options(res[configKey].useraleConfig); - userale.addCallbacks({ rerouteLog }); - - // Send httpSession to background scirpt to inject into tab events. - const userAleHttpSessionId = window.sessionStorage.getItem( - "userAleHttpSessionId", - ); - if (userAleHttpSessionId) { - browser.runtime.sendMessage({ - type: messageTypes.HTTP_SESSION, - payload: JSON.parse(userAleHttpSessionId), - }); - } - }, -); - -// TODO: Add types for message -browser.runtime.onMessage.addListener(function (message, sender) { - if (message.type === messageTypes.CONFIG_CHANGE) { - userale.options(message.payload); - } else if (message.type === messageTypes.ISSUE_REPORT) { - if (window.top === window) { - userale.packageCustomLog( - message.payload, - () => { - return {}; - }, - true, - ); - } - } -}); diff --git a/products/userale/src/UserALEWebExtension/globals.ts b/products/userale/src/UserALEWebExtension/globals.ts deleted file mode 100644 index f2a3810..0000000 --- a/products/userale/src/UserALEWebExtension/globals.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* eslint-disable */ -import { messageTypes } from "@/UserALEWebExtension/messageTypes"; -import type { Logging } from "@/types"; - -// browser is defined in firefox, but chrome uses the 'chrome' global. -export var browser = window.browser || chrome; -export const configKey = "useraleConfigPayload"; - -export function rerouteLog(log: Logging.Log) { - browser.runtime.sendMessage({ type: messageTypes.ADD_LOG, payload: log }); - return false; -} - -/* eslint-enable */ diff --git a/products/userale/src/UserALEWebExtension/icons/UserALE Logo.png b/products/userale/src/UserALEWebExtension/icons/UserALE Logo.png deleted file mode 100644 index 30b47936fe7f46aa6ca08af748e3cc6d249f0e75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6797 zcmZ{pRZtsDw8sMk*Wkq)ibDxjw0MfU1$S$a;8Gll7b}wDTAZTAo#4g2(BM*v7K#=w z-^-o34|jHU&+Pfn@0^{To%66KMpIpZ5RV2A000mwDavaM>F}Wwj2OJ8}rwNd1_nwFu~nj?HrwKnLPdA zwoJaxZ~#E$W1z0F`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r<$T{Kwc> zdfJLvyW2h)06&DEpN9{^0}<5a6Bgqa5#tl!fKnbcYUn6S~_CKs3*-`)i diff --git a/products/userale/src/UserALEWebExtension/manifest.json b/products/userale/src/UserALEWebExtension/manifest.json deleted file mode 100644 index b7fef77..0000000 --- a/products/userale/src/UserALEWebExtension/manifest.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "manifest_version": 2, - "name": "User ALE Extension", - "version": "2.4.0", - "description": "Injects UserALE into every page for testing & user research purposes", - "icons": { - "48": "icons/UserALE Logo.png" - }, - "permissions": ["activeTab", "storage", "tabs", ""], - "background": { - "scripts": ["background.js"] - }, - "content_scripts": [ - { - "matches": [""], - "js": ["content.js"], - "all_frames": true - } - ], - "options_ui": { - "page": "options.html" - }, - "browser_action": { - "default_popup": "browserAction.html" - } -} diff --git a/products/userale/src/UserALEWebExtension/messageTypes.ts b/products/userale/src/UserALEWebExtension/messageTypes.ts deleted file mode 100644 index 25e0044..0000000 --- a/products/userale/src/UserALEWebExtension/messageTypes.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const prefix = "USERALE_"; -export enum messageTypes { - CONFIG_CHANGE = prefix + "CONFIG_CHANGE", - ADD_LOG = prefix + "ADD_LOG", - HTTP_SESSION = prefix + "HTTP_SESSION", - ISSUE_REPORT = prefix + "ISSUE_REPORT", -} diff --git a/products/userale/src/UserALEWebExtension/options.html b/products/userale/src/UserALEWebExtension/options.html deleted file mode 100644 index e985761..0000000 --- a/products/userale/src/UserALEWebExtension/options.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - User ALE Web Extension - Options - - - - -

Logging Options

-
- - -
- - - -
- - - -
- - - -
- - - -
- - - -
- -
- -
-
- - diff --git a/products/userale/src/UserALEWebExtension/options.ts b/products/userale/src/UserALEWebExtension/options.ts deleted file mode 100644 index 5d221da..0000000 --- a/products/userale/src/UserALEWebExtension/options.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { messageTypes } from "@/UserALEWebExtension/messageTypes"; -import * as userale from "@/main"; -import { rerouteLog, browser, configKey } from "@/UserALEWebExtension/globals"; -import { Configuration } from "@/configure"; -import { Extension } from "@/types"; - -userale.addCallbacks({ rerouteLog }); - -// TODO: Warn users when setting credentials with unsecured connection. -// const mitmWarning = -// "Setting credentials with http will expose you to a MITM attack. Are you sure you want to continue?"; - -function setConfig() { - const config = Configuration.getInstance(); - config.update({ - url: (document.getElementById("url") as HTMLInputElement).value, - userId: (document.getElementById("user") as HTMLInputElement).value, - toolName: (document.getElementById("tool") as HTMLInputElement).value, - toolVersion: (document.getElementById("toolVersion") as HTMLInputElement) - .value, - }); - - // Set a basic auth header if given credentials. - const password = (document.getElementById("password") as HTMLInputElement) - .value; - if (config.userId && password) { - config.update({ - authHeader: "Basic " + btoa(`${config.userId}:${password}`), - }); - } - - const payload: Extension.ConfigPayload = { - useraleConfig: config, - pluginConfig: { - urlWhitelist: (document.getElementById("filter") as HTMLInputElement) - .value, - }, - }; - - userale.options(config); - browser.runtime.sendMessage({ type: messageTypes.CONFIG_CHANGE, payload }); -} - -function getConfig() { - // @ts-expect-error Typescript is not aware that firefox's broswer is overloaded - // to support chromium style MV2 callbacks - browser.storage.local.get([configKey], (res) => { - const payload = res[configKey]; - const config = payload.useraleConfig; - - userale.options(config); - (document.getElementById("url") as HTMLInputElement).value = config.url; - (document.getElementById("user") as HTMLInputElement).value = - config.userId as string; - (document.getElementById("tool") as HTMLInputElement).value = - config.toolName as string; - (document.getElementById("toolVersion") as HTMLInputElement).value = - config.toolVersion as string; - (document.getElementById("filter") as HTMLInputElement).value = - payload.pluginConfig.urlWhitelist; - }); - - (document.getElementById("optionsForm") as HTMLFormElement).addEventListener( - "submit", - setConfig, - ); - const issueForm = document.getElementById("issueForm"); - if (issueForm instanceof HTMLElement) { - issueForm.addEventListener("submit", reportIssue); - } -} - -function reportIssue() { - browser.runtime.sendMessage({ - type: messageTypes.ISSUE_REPORT, - payload: { - details: { - issueType: ( - document.querySelector( - 'input[name="issueType"]:checked', - ) as HTMLButtonElement - ).value, - issueDescription: ( - document.getElementById("issueDescription") as HTMLTextAreaElement - ).value, - }, - type: "issue", - }, - }); -} - -document.addEventListener("DOMContentLoaded", getConfig); - -browser.runtime.onMessage.addListener(function (message, sender) { - if (message.type === messageTypes.ISSUE_REPORT) { - if (window.top === window) { - userale.packageCustomLog( - message.payload, - () => { - return {}; - }, - true, - ); - } - } -}); diff --git a/products/userale/src/UserALEWebExtension/public/index.html b/products/userale/src/UserALEWebExtension/public/index.html deleted file mode 100644 index 9bf0378..0000000 --- a/products/userale/src/UserALEWebExtension/public/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - Firefox Plugin Test Page - - - Can we use a Firefox plugin to insert UserALE onto this page? - - diff --git a/products/userale/src/main.ts b/products/userale/src/main.ts deleted file mode 100644 index e613f33..0000000 --- a/products/userale/src/main.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { version as userAleVersion } from "../package.json"; -import { Configuration } from "@/configure"; -import { attachHandlers } from "@/attachHandlers"; -import { initPackager, packageCustomLog } from "@/packageLogs"; -import { initSender, sendOnClose } from "@/sendLogs"; - -import type { Settings, Logging } from "@/types"; - -const config = Configuration.getInstance(); -const logs: Array = []; - -const startLoadTimestamp = Date.now(); -let endLoadTimestamp: number; -window.onload = function() { - endLoadTimestamp = Date.now(); -}; - -export let started = false; -export let wsock: WebSocket; -export { defineCustomDetails as details } from "@/attachHandlers"; -export { registerAuthCallback as registerAuthCallback } from "@/utils"; -export { - addCallbacks as addCallbacks, - removeCallbacks as removeCallbacks, - packageLog as packageLog, - packageCustomLog as packageCustomLog, - getSelector as getSelector, - buildPath as buildPath, -} from "@/packageLogs"; - -config.update({ - useraleVersion: userAleVersion, -}); -initPackager(logs, config); -getWebsocketsEnabled(config); -if (config.autostart) { - setup(config); -} - -/** - * Hooks the global event listener, and starts up the - * logging interval. - * @param {Configuration} config Configuration settings for the logger - */ -function setup(config: Configuration) { - if (!started) { - setTimeout(function() { - const state = document.readyState; - - if ( - config.autostart && - (state === "interactive" || state === "complete") - ) { - attachHandlers(config); - initSender(logs, config); - started = config.on = true; - packageCustomLog( - { - type: "load", - details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp }, - }, - () => ({}), - false, - ); - } else { - setup(config); - } - }, 100); - } -} - -/** - * Checks to see if the specified backend URL supporsts Websockets - * and updates the config accordingly - */ -function getWebsocketsEnabled(config: Configuration) { - wsock = new WebSocket(config.url.replace("http://", "ws://")); - wsock.onerror = () => { - console.log("no websockets detected"); - }; - wsock.onopen = () => { - console.log("connection established with websockets"); - config.websocketsEnabled = true; - }; - wsock.onclose = () => { - sendOnClose(logs, config); - }; -} - -// Export the Userale API -export const version = userAleVersion; - -/** - * Used to start the logging process if the - * autostart configuration option is set to false. - */ -export function start(): void { - if (!started || config.autostart === false) { - started = config.on = true; - config.update({ autostart: true }); - } -} - -/** - * Halts the logging process. Logs will no longer be sent. - */ -export function stop(): void { - started = config.on = false; - config.update({ autostart: false }); -} - -/** - * Updates the current configuration - * object with the provided values. - * @param {Partial} newConfig The configuration options to use. - * @return {Settings.Config} Returns the updated configuration. - */ -export function options( - newConfig: Partial | undefined, -): Settings.Config { - if (newConfig) { - config.update(newConfig); - } - - return config; -} - -/** - * Appends a log to the log queue. - * @param {Logging.CustomLog} customLog The log to append. - * @return {boolean} Whether the operation succeeded. - */ -export function log(customLog: Logging.CustomLog | undefined) { - if (customLog) { - logs.push(customLog); - return true; - } else { - return false; - } -} diff --git a/products/userale/src/packageLogs.ts b/products/userale/src/packageLogs.ts deleted file mode 100644 index 2cb0cbe..0000000 --- a/products/userale/src/packageLogs.ts +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { detect } from "detect-browser"; -import { Callbacks, Logging } from "@/types"; -import { Configuration } from "@/configure"; -const browserInfo = detect(); - -export let logs: Array; -let config: Configuration; - -// Interval Logging Globals -let intervalId: string | null; -let intervalType: string | null; -let intervalPath: string[] | null; -let intervalTimer: number | null; -let intervalCounter: number | null; -let intervalLog: Logging.Log | null; - -export const filterHandler: CallableFunction | null = null; -export const mapHandler: CallableFunction | null = null; -export let cbHandlers: Callbacks.CallbackMap = {}; - -/** - * Adds named callbacks to be executed when logging. - * @param {Object } newCallbacks An object containing named callback functions. - */ -export function addCallbacks( - ...newCallbacks: Record[] -) { - newCallbacks.forEach((source) => { - let descriptors: { [key in string | symbol]: any } = {}; - - descriptors = Object.keys(source).reduce((descriptors, key) => { - descriptors[key] = Object.getOwnPropertyDescriptor(source, key); - return descriptors; - }, descriptors); - - Object.getOwnPropertySymbols(source).forEach((sym) => { - const descriptor = Object.getOwnPropertyDescriptor(source, sym); - if (descriptor?.enumerable) { - descriptors[sym] = descriptor; - } - }); - Object.defineProperties(cbHandlers, descriptors); - }); - return cbHandlers; -} - -/** - * Removes callbacks by name. - * @param {String[]} targetKeys A list of names of functions to remove. - */ -export function removeCallbacks(targetKeys: string[]) { - targetKeys.forEach((key) => { - if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) { - delete cbHandlers[key]; - } - }); -} - -/** - * Assigns the config and log container to be used by the logging functions. - * @param {Array} newLogs Log container. - * @param {Object} newConfig Configuration to use while logging. - */ -export function initPackager( - newLogs: Array, - newConfig: Configuration, -) { - logs = newLogs; - config = newConfig; - cbHandlers = {}; - intervalId = null; - intervalType = null; - intervalPath = null; - intervalTimer = null; - intervalCounter = 0; - intervalLog = null; -} - -/** - * Transforms the provided HTML event into a log and appends it to the log queue. - * @param {Event} e The event to be logged. - * @param {Function} detailFcn The function to extract additional log parameters from the event. - * @return {boolean} Whether the event was logged. - */ -export function packageLog( - e: Event, - detailFcn?: Logging.DynamicDetailFunction | null, -) { - if (!config.on) { - return false; - } - - let details = null; - if (detailFcn) { - details = detailFcn(e); - } - - const timeFields = extractTimeFields( - e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(), - ); - - let log: Logging.Log = { - target: e.target ? getSelector(e.target) : null, - path: buildPath(e), - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: timeFields.milli, - microTime: timeFields.micro, - location: getLocation(e), - scrnRes: getScreenRes(), - type: e.type, - logType: "raw", - userAction: true, - details: details, - userId: config.userId, - toolVersion: config.toolVersion, - toolName: config.toolName, - useraleVersion: config.useraleVersion, - sessionId: config.sessionId, - httpSessionId: config.httpSessionId, - browserSessionId: config.browserSessionId, - attributes: buildAttrs(e), - style: buildCSS(e), - }; - - if (typeof filterHandler === "function" && !filterHandler(log)) { - return false; - } - - if (typeof mapHandler === "function") { - log = mapHandler(log, e); - } - - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, e); - if (!log) { - return false; - } - } - } - - logs.push(log); - return true; -} - -/** - * Packages the provided customLog to include standard meta data and appends it to the log queue. - * @param {Logging.CustomLog} customLog The behavior to be logged. - * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. - * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) - * @return {boolean} Whether the event was logged. - */ -export function packageCustomLog( - customLog: Logging.CustomLog, - detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction, - userAction: boolean, -): boolean { - if (!config.on) { - return false; - } - - let details = null; - if (detailFcn.length === 0) { - // In the case of a union, the type checker will default to the more stringent - // type, i.e. the DetailFunction that expects an argument for safety purposes. - // To avoid this, we must explicitly check the type by asserting it receives - // no arguments (detailFcn.length === 0) and then cast it to the - // StaticDetailFunction type. - const staticDetailFcn = detailFcn as Logging.StaticDetailFunction; - details = staticDetailFcn(); - } - - const metaData = { - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: Date.now(), - scrnRes: getScreenRes(), - logType: "custom", - userAction: userAction, - details: details, - userId: config.userId, - toolVersion: config.toolVersion, - toolName: config.toolName, - useraleVersion: config.useraleVersion, - sessionId: config.sessionId, - httpSessionId: config.httpSessionId, - browserSessionId: config.browserSessionId, - }; - - let log = Object.assign(metaData, customLog); - - if (typeof filterHandler === "function" && !filterHandler(log)) { - return false; - } - - if (typeof mapHandler === "function") { - log = mapHandler(log); - } - - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log = func(log, null); - if (!log) { - return false; - } - } - } - - logs.push(log); - - return true; -} - -/** - * Extract the millisecond and microsecond portions of a timestamp. - * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields. - * @return {Object} An object containing the millisecond - * and microsecond portions of the timestamp. - */ -export function extractTimeFields(timeStamp: number) { - return { - milli: Math.floor(timeStamp), - micro: Number((timeStamp % 1).toFixed(3)), - }; -} - -/** - * Track intervals and gather details about it. - * @param {Object} e - * @return boolean - */ -export function packageIntervalLog(e: Event) { - try { - const target = e.target ? getSelector(e.target) : null; - const path = buildPath(e); - const type = e.type; - const timestamp = Math.floor( - e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(), - ); - - // Init - this should only happen once on initialization - if (intervalId == null) { - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - - if ((intervalId !== target || intervalType !== type) && intervalTimer) { - // When to create log? On transition end - // @todo Possible for intervalLog to not be pushed in the event the interval never ends... - - intervalLog = { - target: intervalId, - path: intervalPath, - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - count: intervalCounter, - duration: timestamp - intervalTimer, // microseconds - startTime: intervalTimer, - endTime: timestamp, - type: intervalType, - logType: "interval", - targetChange: intervalId !== target, - typeChange: intervalType !== type, - userAction: false, - userId: config.userId, - toolVersion: config.toolVersion, - toolName: config.toolName, - useraleVersion: config.useraleVersion, - sessionId: config.sessionId, - httpSessionId: config.httpSessionId, - browserSessionId: config.browserSessionId, - }; - - if (typeof filterHandler === "function" && !filterHandler(intervalLog)) { - return false; - } - - if (typeof mapHandler === "function") { - intervalLog = mapHandler(intervalLog, e); - } - - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - intervalLog = func(intervalLog, null); - if (!intervalLog) { - return false; - } - } - } - - if (intervalLog) logs.push(intervalLog); - - // Reset - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - - // Interval is still occuring, just update counter - if (intervalId == target && intervalType == type && intervalCounter) { - intervalCounter = intervalCounter + 1; - } - - return true; - } catch { - return false; - } -} - -/** - * Extracts coordinate information from the event - * depending on a few browser quirks. - * @param {Event} e The event to extract coordinate information from. - * @return {Object} An object containing nullable x and y coordinates for the event. - */ -export function getLocation(e: Event) { - if (e instanceof MouseEvent) { - if (e.pageX != null) { - return { x: e.pageX, y: e.pageY }; - } else if (e.clientX != null) { - return { - x: document.documentElement.scrollLeft + e.clientX, - y: document.documentElement.scrollTop + e.clientY, - }; - } - } else { - return { x: null, y: null }; - } -} - -/** - * Extracts innerWidth and innerHeight to provide estimates of screen resolution - * @return {Object} An object containing the innerWidth and InnerHeight - */ -export function getScreenRes() { - return { width: window.innerWidth, height: window.innerHeight }; -} - -/** - * Builds a string CSS selector from the provided element - * @param {EventTarget} ele The element from which the selector is built. - * @return {string} The CSS selector for the element, or Unknown if it can't be determined. - */ -export function getSelector(ele: EventTarget) { - if (ele instanceof HTMLElement || ele instanceof Element) { - if (ele.localName) { - return ( - ele.localName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "") - ); - } else if (ele.nodeName) { - return ( - ele.nodeName + - (ele.id ? "#" + ele.id : "") + - (ele.className ? "." + ele.className : "") - ); - } - } else if (ele instanceof Document) { - return "#document"; - } else if (ele === globalThis) { - return "Window"; - } - return "Unknown"; -} - -/** - * Builds an array of elements from the provided event target, to the root element. - * @param {Event} e Event from which the path should be built. - * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. - */ -export function buildPath(e: Event) { - const path = e.composedPath(); - return selectorizePath(path); -} - -/** - * Builds a CSS selector path from the provided list of elements. - * @param {EventTarget[]} path Array of HTML Elements from which the path should be built. - * @return {string[]} Array of string CSS selectors. - */ -export function selectorizePath(path: EventTarget[]) { - let i = 0; - let pathEle; - const pathSelectors: string[] = []; - while ((pathEle = path[i])) { - pathSelectors.push(getSelector(pathEle)); - ++i; - pathEle = path[i]; - } - return pathSelectors; -} - -export function detectBrowser() { - return { - browser: browserInfo ? browserInfo.name : "", - version: browserInfo ? browserInfo.version : "", - }; -} - -/** - * Builds an object containing attributes of an element. - * Attempts to parse all attribute values as JSON text. - * @param {Event} e Event from which the target element's attributes should be extracted. - * @return {Record} Object with element attributes as key-value pairs. - */ -export function buildAttrs(e: Event): Record { - const attributes: Record = {}; - const attributeBlackList = ["style"]; - - if (e.target && e.target instanceof Element) { - for (const attr of e.target.attributes) { - if (attributeBlackList.includes(attr.name)) continue; - let val: any = attr.value; - try { - val = JSON.parse(val); - } catch (error) { - // Ignore parsing errors, fallback to raw string value - } - attributes[attr.name] = val; - } - } - - return attributes; -} - -/** - * Builds an object containing all CSS properties of an element. - * @param {Event} e Event from which the target element's properties should be extracted. - * @return {Record} Object with all CSS properties as key-value pairs. - */ -export function buildCSS(e: Event): Record { - const properties: Record = {}; - if (e.target && e.target instanceof HTMLElement) { - const styleObj = e.target.style; - for (let i = 0; i < styleObj.length; i++) { - const prop = styleObj[i]; - properties[prop] = styleObj.getPropertyValue(prop); - } - } - return properties; -} diff --git a/products/userale/src/sendLogs.ts b/products/userale/src/sendLogs.ts deleted file mode 100644 index 2c9e6fc..0000000 --- a/products/userale/src/sendLogs.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Configuration } from "@/configure"; -import { Logging } from "@/types"; -import { updateAuthHeader, updateCustomHeaders } from "@/utils"; -import { wsock } from "./main"; - -let sendIntervalId: string | number | NodeJS.Timeout | undefined; - -/** - * Initializes the log queue processors. - * @param {Array} logs Array of logs to append to. - * @param {Configuration} config Configuration object to use when logging. - */ -export function initSender(logs: Array, config: Configuration) { - if (sendIntervalId) { - clearInterval(sendIntervalId); - } - - sendIntervalId = sendOnInterval(logs, config); - sendOnClose(logs, config); -} - -/** - * Checks the provided log array on an interval, flushing the logs - * if the queue has reached the threshold specified by the provided config. - * @param {Array} logs Array of logs to read from. - * @param {Configuration} config Configuration singleton to be read from. - * @return {Number} The newly created interval id. - */ -export function sendOnInterval( - logs: Array, - config: Configuration, -): NodeJS.Timeout { - return setInterval(function() { - if (!config.on) { - return; - } - - if (logs.length >= config.logCountThreshold) { - sendLogs(logs.slice(0), config, 0); // Send a copy - logs.splice(0); // Clear array reference (no reassignment) - } - }, config.transmitInterval); -} - -/** - * Attempts to flush the remaining logs when the window is closed. - * @param {Array} logs Array of logs to be flushed. - * @param {Configuration} config Configuration singleton to be read from. - */ -export function sendOnClose( - logs: Array, - config: Configuration, -): void { - window.addEventListener("pagehide", function() { - if (!config.on) { - return; - } - - if (logs.length > 0) { - if (config.websocketsEnabled) { - const data = JSON.stringify(logs); - wsock.send(data); - } else { - const headers: HeadersInit = new Headers(); - headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); - - if (config.authHeader) { - headers.set("Authorization", config.authHeader.toString()); - } - - fetch(config.url, { - keepalive: true, - method: "POST", - headers: headers, - body: JSON.stringify(logs), - }).catch((error) => { - console.error(error); - }); - } - logs.splice(0); // clear log queue - } - }); -} - -/** - * Sends the provided array of logs to the specified url, - * retrying the request up to the specified number of retries. - * @param {Array} logs Array of logs to send. - * @param {Configuration} config configuration singleton. - * @param {Number} retries Maximum number of attempts to send the logs. - */ - -// @todo expose config object to sendLogs replate url with config.url -export function sendLogs( - logs: Array, - config: Configuration, - retries: number, -) { - const data = JSON.stringify(logs); - - if (config.websocketsEnabled) { - wsock.send(data); - } else { - const req = new XMLHttpRequest(); - - req.open("POST", config.url); - - // Update headers - updateAuthHeader(config); - if (config.authHeader) { - req.setRequestHeader( - "Authorization", - typeof config.authHeader === "function" - ? config.authHeader() - : config.authHeader, - ); - } - req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); - - // Update custom headers last to allow them to over-write the defaults. This assumes - // the user knows what they are doing and may want to over-write the defaults. - updateCustomHeaders(config); - if (config.headers) { - Object.entries(config.headers).forEach(([header, value]) => { - req.setRequestHeader(header, value); - }); - } - - req.onreadystatechange = function() { - if (req.readyState === 4 && req.status !== 200) { - if (retries > 0) { - sendLogs(logs, config, retries--); - } - } - }; - - req.send(data); - } -} diff --git a/products/userale/src/utils/auth/index.ts b/products/userale/src/utils/auth/index.ts deleted file mode 100644 index 12dc7ba..0000000 --- a/products/userale/src/utils/auth/index.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Configuration } from "@/configure"; -import { Callbacks } from "@/types"; - -export let authCallback: Callbacks.AuthCallback | null = null; - -/** - * Fetches the most up-to-date auth header string from the auth callback - * and updates the config object with the new value. - * @param {Configuration} config Configuration object to be updated. - * @param {Function} authCallback Callback used to fetch the newest header. - * @returns {void} - */ -export function updateAuthHeader(config: Configuration) { - if (authCallback) { - try { - config.authHeader = authCallback(); - } catch (e) { - // We should emit the error, but otherwise continue as this could be a temporary issue - // due to network connectivity or some logic inside the authCallback which is the user's - // responsibility. - console.error(`Error encountered while setting the auth header: ${e}`); - } - } -} - -/** - * Registers the provided callback to be used when updating the auth header. - * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string. - * @returns {boolean} Whether the operation succeeded. - */ -export function registerAuthCallback(callback: Callbacks.AuthCallback) { - try { - verifyCallback(callback); - authCallback = callback; - return true; - } catch (e) { - return false; - } -} - -/** - * Verify that the provided callback is a function which returns a string - * @param {Function} callback Callback used to fetch the newest header. Should return a string. - * @throws {Error} If the callback is not a function or does not return a string. - * @returns {void} - */ -export function verifyCallback(callback: Callbacks.AuthCallback) { - if (typeof callback !== "function") { - throw new Error("Userale auth callback must be a function"); - } - const result = callback(); - if (typeof result !== "string") { - throw new Error("Userale auth callback must return a string"); - } -} - -/** - * Resets the authCallback to null. Used for primarily for testing, but could be used - * to remove the callback in production. - * @returns {void} - */ -export function resetAuthCallback() { - authCallback = null; -} diff --git a/products/userale/src/utils/headers/index.ts b/products/userale/src/utils/headers/index.ts deleted file mode 100644 index 106f1f7..0000000 --- a/products/userale/src/utils/headers/index.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Configuration } from "@/configure"; -import { Callbacks } from "@/types"; - -export let headersCallback: Callbacks.HeadersCallback | null = null; - -/** - * Fetches the most up-to-date custom headers object from the headers callback - * and updates the config object with the new value. - * @param {Configuration} config Configuration object to be updated. - * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers. - * @returns {void} - */ -export function updateCustomHeaders(config: Configuration) { - if (headersCallback) { - try { - config.headers = headersCallback(); - } catch (e) { - // We should emit the error, but otherwise continue as this could be a temporary issue - // due to network connectivity or some logic inside the headersCallback which is the user's - // responsibility. - console.error(`Error encountered while setting the headers: ${e}`); - } - } -} - -/** - * Registers the provided callback to be used when updating the auth header. - * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object. - * @returns {boolean} Whether the operation succeeded. - */ -export function registerHeadersCallback(callback: Callbacks.HeadersCallback) { - try { - verifyCallback(callback); - headersCallback = callback; - return true; - } catch (e) { - return false; - } -} - -/** - * Verify that the provided callback is a function which returns a string - * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object. - * @throws {Error} If the callback is not a function or does not return a string. - * @returns {void} - */ -export function verifyCallback(callback: Callbacks.HeadersCallback) { - if (typeof callback !== "function") { - throw new Error("Userale headers callback must be a function"); - } - const result = callback(); - if (typeof result !== "object") { - throw new Error("Userale headers callback must return an object"); - } - for (const [key, value] of Object.entries(result)) { - if (typeof key !== "string" || typeof value !== "string") { - throw new Error( - "Userale header callback must return an object with string keys and values", - ); - } - } -} - -/** - * Resets the authCallback to null. Used for primarily for testing, but could be used - * to remove the callback in production. - * @returns {void} - */ -export function resetHeadersCallback() { - headersCallback = null; -} diff --git a/products/userale/src/utils/index.ts b/products/userale/src/utils/index.ts deleted file mode 100644 index f472640..0000000 --- a/products/userale/src/utils/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export { - authCallback, - updateAuthHeader, - registerAuthCallback, - resetAuthCallback, - verifyCallback as verifyAuthCallback, -} from "./auth"; -export { - headersCallback, - updateCustomHeaders, - registerHeadersCallback, - resetHeadersCallback, - verifyCallback as verifyHeadersCallback, -} from "./headers"; From 1a59d80f881487640cfaf7297bcb54cfa174deff Mon Sep 17 00:00:00 2001 From: Jason Young Date: Wed, 30 Apr 2025 14:54:48 -0700 Subject: [PATCH 02/20] temp --- .../src/background/index.ts | 9 +- .../src/background/messages/config_change.ts | 6 +- .../src/background/messages/http_session.ts | 3 + .../src/background/ports/log.ts | 14 +- .../src/background/utils.ts | 12 - .../flagon-userale/build/esm/main.d.ts | 235 ++++ .../flagon-userale/build/esm/main.mjs | 1083 +++++++++++++++++ .../flagon-userale/build/esm/main.mjs.map | 1 + .../src/callbacks/authHandler.ts | 15 - .../src/callbacks/callbackHandler.ts | 40 - .../src/callbacks/headersHandler.ts | 20 - .../src/callbacks/logHandler.ts | 20 - .../packages/flagon-userale/src/config.ts | 160 --- .../packages/flagon-userale/src/configure.ts | 16 +- ...Settings.temp.ts => getInitialSettings.ts} | 0 .../packages/flagon-userale/src/iife.ts | 0 .../flagon-userale/src/logPackager.ts | 276 ----- .../packages/flagon-userale/src/logSender.ts | 164 --- .../flagon-userale/src/loggingEngine.ts | 125 -- .../packages/flagon-userale/src/main.ts | 166 +++ .../flagon-userale/src/packageLogs.ts | 471 +++++++ .../packages/flagon-userale/src/sendLogs.ts | 156 +++ .../packages/flagon-userale/src/types.d.ts | 20 +- .../flagon-userale/src/utils/auth/index.ts | 81 ++ .../flagon-userale/src/utils/headers/index.ts | 88 ++ .../flagon-userale/src/utils/index.ts | 30 + .../packages/flagon-userale/tsup.config.js | 28 - 27 files changed, 2349 insertions(+), 890 deletions(-) delete mode 100644 products/userale/packages/flagon-userale-ext/src/background/utils.ts create mode 100644 products/userale/packages/flagon-userale/build/esm/main.d.ts create mode 100644 products/userale/packages/flagon-userale/build/esm/main.mjs create mode 100644 products/userale/packages/flagon-userale/build/esm/main.mjs.map delete mode 100644 products/userale/packages/flagon-userale/src/callbacks/authHandler.ts delete mode 100644 products/userale/packages/flagon-userale/src/callbacks/callbackHandler.ts delete mode 100644 products/userale/packages/flagon-userale/src/callbacks/headersHandler.ts delete mode 100644 products/userale/packages/flagon-userale/src/callbacks/logHandler.ts delete mode 100644 products/userale/packages/flagon-userale/src/config.ts rename products/userale/packages/flagon-userale/src/{getInitialSettings.temp.ts => getInitialSettings.ts} (100%) delete mode 100644 products/userale/packages/flagon-userale/src/iife.ts delete mode 100644 products/userale/packages/flagon-userale/src/logPackager.ts delete mode 100644 products/userale/packages/flagon-userale/src/logSender.ts delete mode 100644 products/userale/packages/flagon-userale/src/loggingEngine.ts create mode 100644 products/userale/packages/flagon-userale/src/main.ts create mode 100644 products/userale/packages/flagon-userale/src/packageLogs.ts create mode 100644 products/userale/packages/flagon-userale/src/sendLogs.ts create mode 100644 products/userale/packages/flagon-userale/src/utils/auth/index.ts create mode 100644 products/userale/packages/flagon-userale/src/utils/headers/index.ts create mode 100644 products/userale/packages/flagon-userale/src/utils/index.ts diff --git a/products/userale/packages/flagon-userale-ext/src/background/index.ts b/products/userale/packages/flagon-userale-ext/src/background/index.ts index 4e9bada..ee5cda3 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/index.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/index.ts @@ -1,9 +1,12 @@ import * as userale from "flagon-userale"; +import { getStoredOptions,} from "~/utils/storage"; console.log("Service worker loaded!"); +//TODO apply logging url from getstoredoptions to userale.setup + userale.setup(); -export function add_log(log) { - userale.log(log); -} +//TODO Create browser session id similar to how http session id is created and export it be used in background/ports/log.ts + +//TODO attach tab event listeners and add log them to userale. This can mostly be copied from the old code, but use .log() instead of .packagecustomlog() \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts index faf86fa..a4e71a9 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts @@ -1,8 +1,10 @@ import type { PlasmoMessaging } from "@plasmohq/messaging"; -// import * as userale from "flagon-userale"; +import * as userale from "flagon-userale"; +import { getStoredOptions } from "~/utils/storage"; const handler: PlasmoMessaging.MessageHandler = async (req, res) => { -// userale.config(req); + // call + userale.options(req); } export default handler \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts index e69de29..1bb712b 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts @@ -0,0 +1,3 @@ +// This is a bit complicated, but once tab logs are added in main. You can create a mapping of tab ids (a browser construct) to http session ids (a userale construct). +// The content script should send a message containing its http session id, and it should be added to the mapping here, then use the mapping in background/index.ts to set the http session field of tab logs. +// This is also the least import part, so save it for last. \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts index a7aac4d..3a08910 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts @@ -1,14 +1,16 @@ import type { PlasmoMessaging } from "@plasmohq/messaging"; -// import { add_log } from "~/background"; +import * as userale from "flagon-userale"; const handler: PlasmoMessaging.PortHandler = async (req, res) => { - // console.log(req); + console.log(req); + // todo apply browser session id to logs // // log.browserSessionId = browserSessionId; + // todo filter logs based off filter url in getstorageoptions // // req = filterUrl(req); - // if (req) { - // console.log(req); - // add_log(req); - // } + if (req) { + console.log(req); + userale.log(req); + } } diff --git a/products/userale/packages/flagon-userale-ext/src/background/utils.ts b/products/userale/packages/flagon-userale-ext/src/background/utils.ts deleted file mode 100644 index b9f5a5c..0000000 --- a/products/userale/packages/flagon-userale-ext/src/background/utils.ts +++ /dev/null @@ -1,12 +0,0 @@ -// import allowList; - -// function filterUrl(log) { -// if (allowRegex.test(log.pageUrl as string)) { -// return log; -// } -// return false; -// } - - -// const options: StoredOptions = await getStoredOptions(); -// const allowRegex: RegExp = new RegExp(options.allowList); \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/esm/main.d.ts b/products/userale/packages/flagon-userale/build/esm/main.d.ts new file mode 100644 index 0000000..5e56576 --- /dev/null +++ b/products/userale/packages/flagon-userale/build/esm/main.d.ts @@ -0,0 +1,235 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +declare namespace Settings { + type Version = string | null; + type UserId = string | null; + type SessionId = string | null; + type UserFromParams = string | null; + type ToolName = string | null; + type AuthHeader = CallableFunction | string | null; + type CustomIndex = string | null; + type HeaderObject = { [key: string]: string }; + type Headers = HeaderObject | null; + type ConfigValueTypes = + | string + | number + | boolean + | null + | Version + | UserId + | SessionId + | UserFromParams + | ToolName + | AuthHeader + | CustomIndex + | Headers; + + type TimeFunction = (() => number) | ((ts: number) => number); + + export interface DefaultConfig { + [key: string]: ConfigValueTypes; + } + + export interface Config extends DefaultConfig { + autostart: boolean; + authHeader: AuthHeader; + browserSessionId: SessionId; + custIndex: CustomIndex; + headers: Headers; + httpSessionId: SessionId; + logCountThreshold: number; + logDetails: boolean; + on?: boolean; + resolution: number; + sessionId: SessionId; + time: TimeFunction; + toolName: ToolName; + toolVersion?: Version; + transmitInterval: number; + url: string; + userFromParams: UserFromParams; + useraleVersion: Version; + userId: UserId; + version?: Version; + websocketsEnabled?: boolean; + } + + export interface IConfiguration extends Config { + getInstance(): Configuration; + configure(newConfig: Config): void; + } +} + +// TODO: Switch to protobuf for managing log types +declare namespace Logging { + type JSONObject = { + [key: string]: + | string + | number + | boolean + | null + | undefined + | JSONObject + | Array; + }; + export type Log = JSONObject; // TODO: Intersect this with the default log objects (raw & interval) + export type CustomLog = JSONObject; + + export type DynamicDetailFunction = ( + e: E, + ) => JSONObject; + export type StaticDetailFunction = () => JSONObject; +} + +declare namespace Events { + type FormElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement; + type ChangeEvent = Event; + export type RawEvents = + | "dblclick" + | "mouseup" + | "mousedown" + | "dragstart" + | "dragend" + | "drag" + | "drop" + | "keydown"; + export type IntervalEvents = + | "click" + | "focus" + | "blur" + | "input" + | "change" + | "mouseover" + | "submit"; + export type WindowEvents = "load" | "blur" | "focus"; + export type BufferedEvents = "wheel" | "scroll" | "resize"; + export type RefreshEvents = "submit"; + export type AllowedEvents = + | RawEvents + | IntervalEvents + | WindowEvents + | BufferedEvents + | RefreshEvents; + + export type EventDetailsMap = Partial<{ + [key in T]: + | Logging.DynamicDetailFunction< + | MouseEvent + | KeyboardEvent + | InputEvent + | Events.ChangeEvent + | WheelEvent + > + | Logging.StaticDetailFunction + | null; + }>; + + export type EventBoolMap = Partial<{ + [key in T]: boolean; + }>; +} + +declare namespace Callbacks { + export type AuthCallback = () => string; + export type HeadersCallback = () => Settings.HeaderObject; + + export type CallbackMap = { + [key in string]: CallableFunction; + }; +} + +/** + * Defines the way information is extracted from various events. + * Also defines which events we will listen to. + * @param {Settings.Config} options UserALE Configuration object to read from. + * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods. + */ +declare function defineCustomDetails(options: Settings.DefaultConfig, type: Events.AllowedEvents): Logging.DynamicDetailFunction | null | undefined; + +/** + * Registers the provided callback to be used when updating the auth header. + * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string. + * @returns {boolean} Whether the operation succeeded. + */ +declare function registerAuthCallback(callback: Callbacks.AuthCallback): boolean; + +/** + * Adds named callbacks to be executed when logging. + * @param {Object } newCallbacks An object containing named callback functions. + */ +declare function addCallbacks(...newCallbacks: Record[]): Callbacks.CallbackMap; +/** + * Removes callbacks by name. + * @param {String[]} targetKeys A list of names of functions to remove. + */ +declare function removeCallbacks(targetKeys: string[]): void; +/** + * Transforms the provided HTML event into a log and appends it to the log queue. + * @param {Event} e The event to be logged. + * @param {Function} detailFcn The function to extract additional log parameters from the event. + * @return {boolean} Whether the event was logged. + */ +declare function packageLog(e: Event, detailFcn?: Logging.DynamicDetailFunction | null): boolean; +/** + * Packages the provided customLog to include standard meta data and appends it to the log queue. + * @param {Logging.CustomLog} customLog The behavior to be logged. + * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. + * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) + * @return {boolean} Whether the event was logged. + */ +declare function packageCustomLog(customLog: Logging.CustomLog, detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction, userAction: boolean): boolean; +/** + * Builds a string CSS selector from the provided element + * @param {EventTarget} ele The element from which the selector is built. + * @return {string} The CSS selector for the element, or Unknown if it can't be determined. + */ +declare function getSelector(ele: EventTarget): string; +/** + * Builds an array of elements from the provided event target, to the root element. + * @param {Event} e Event from which the path should be built. + * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. + */ +declare function buildPath(e: Event): string[]; + +declare let started: boolean; +declare let wsock: WebSocket; + +declare const version: string; +/** + * Used to start the logging process if the + * autostart configuration option is set to false. + */ +declare function start(): void; +/** + * Halts the logging process. Logs will no longer be sent. + */ +declare function stop(): void; +/** + * Updates the current configuration + * object with the provided values. + * @param {Partial} newConfig The configuration options to use. + * @return {Settings.Config} Returns the updated configuration. + */ +declare function options(newConfig: Partial | undefined): Settings.Config; +/** + * Appends a log to the log queue. + * @param {Logging.CustomLog} customLog The log to append. + * @return {boolean} Whether the operation succeeded. + */ +declare function log(customLog: Logging.CustomLog | undefined): boolean; + +export { addCallbacks, buildPath, defineCustomDetails as details, getSelector, log, options, packageCustomLog, packageLog, registerAuthCallback, removeCallbacks, start, started, stop, version, wsock }; diff --git a/products/userale/packages/flagon-userale/build/esm/main.mjs b/products/userale/packages/flagon-userale/build/esm/main.mjs new file mode 100644 index 0000000..40bdfcc --- /dev/null +++ b/products/userale/packages/flagon-userale/build/esm/main.mjs @@ -0,0 +1,1083 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.*/ +// package.json +var version = "2.4.0"; + +// src/getInitialSettings.ts +var sessionId = null; +var httpSessionId = null; +function getInitialSettings() { + if (sessionId === null) { + sessionId = getsessionId( + "userAlesessionId", + "session_" + String(Date.now()) + ); + } + if (httpSessionId === null) { + httpSessionId = getsessionId( + "userAleHttpSessionId", + generatehttpSessionId() + ); + } + const script = document.currentScript || function() { + const scripts = document.getElementsByTagName("script"); + return scripts[scripts.length - 1]; + }(); + const get = script ? script.getAttribute.bind(script) : function() { + return null; + }; + const headers = get("data-headers"); + const settings = { + authHeader: get("data-auth") || null, + autostart: get("data-autostart") === "false" ? false : true, + browserSessionId: null, + custIndex: get("data-index") || null, + headers: headers ? JSON.parse(headers) : null, + httpSessionId, + logCountThreshold: +(get("data-threshold") || 5), + logDetails: get("data-log-details") === "true" ? true : false, + resolution: +(get("data-resolution") || 500), + sessionId: get("data-session") || sessionId, + time: timeStampScale(document.createEvent("CustomEvent")), + toolName: get("data-tool") || null, + toolVersion: get("data-version") || null, + transmitInterval: +(get("data-interval") || 5e3), + url: get("data-url") || "http://localhost:8000", + useraleVersion: get("data-userale-version") || null, + userFromParams: get("data-user-from-params") || null, + userId: get("data-user") || null + }; + return settings; +} +function getsessionId(sessionKey, value) { + if (window.sessionStorage.getItem(sessionKey) === null) { + window.sessionStorage.setItem(sessionKey, JSON.stringify(value)); + return value; + } + return JSON.parse(window.sessionStorage.getItem(sessionKey) || ""); +} +function timeStampScale(e) { + let tsScaler; + if (e.timeStamp && e.timeStamp > 0) { + const delta = Date.now() - e.timeStamp; + if (delta < 0) { + tsScaler = function() { + return e.timeStamp / 1e3; + }; + } else if (delta > e.timeStamp) { + const navStart = performance.timeOrigin; + tsScaler = function(ts) { + return ts + navStart; + }; + } else { + tsScaler = function(ts) { + return ts; + }; + } + } else { + tsScaler = function() { + return Date.now(); + }; + } + return tsScaler; +} +function generatehttpSessionId() { + const len = 32; + const arr = new Uint8Array(len / 2); + window.crypto.getRandomValues(arr); + return Array.from(arr, (dec) => { + return dec.toString(16).padStart(2, "0"); + }).join(""); +} + +// src/configure.ts +var _Configuration = class { + constructor() { + this.autostart = false; + this.authHeader = null; + this.browserSessionId = null; + this.custIndex = null; + this.headers = null; + this.httpSessionId = null; + this.logCountThreshold = 0; + this.logDetails = false; + this.on = false; + this.resolution = 0; + this.sessionId = null; + this.time = () => Date.now(); + this.toolName = null; + this.toolVersion = null; + this.transmitInterval = 0; + this.url = ""; + this.userFromParams = null; + this.useraleVersion = null; + this.userId = null; + this.version = null; + this.websocketsEnabled = false; + if (_Configuration.instance === null) { + this.initialize(); + } + } + static getInstance() { + if (_Configuration.instance === null) { + _Configuration.instance = new _Configuration(); + } + return _Configuration.instance; + } + initialize() { + const settings = getInitialSettings(); + this.update(settings); + } + reset() { + this.initialize(); + } + update(newConfig) { + Object.keys(newConfig).forEach((option) => { + if (option === "userFromParams") { + const userParamString = newConfig[option]; + const userId = userParamString ? _Configuration.getUserIdFromParams(userParamString) : null; + if (userId) { + this["userId"] = userId; + } + } + const hasNewUserFromParams = newConfig["userFromParams"]; + const willNullifyUserId = option === "userId" && newConfig[option] === null; + if (willNullifyUserId && hasNewUserFromParams) { + return; + } + const newOption = newConfig[option]; + if (newOption !== void 0) { + this[option] = newOption; + } + }); + } + static getUserIdFromParams(param) { + const userField = param; + const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); + const results = window.location.href.match(regex); + if (results && results[2]) { + return decodeURIComponent(results[2].replace(/\+/g, " ")); + } + return null; + } +}; +var Configuration = _Configuration; +Configuration.instance = null; + +// ../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js +var __spreadArray = function(to, from, pack) { + if (pack || arguments.length === 2) + for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) + ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var BrowserInfo = function() { + function BrowserInfo2(name, version3, os) { + this.name = name; + this.version = version3; + this.os = os; + this.type = "browser"; + } + return BrowserInfo2; +}(); +var NodeInfo = function() { + function NodeInfo2(version3) { + this.version = version3; + this.type = "node"; + this.name = "node"; + this.os = process.platform; + } + return NodeInfo2; +}(); +var SearchBotDeviceInfo = function() { + function SearchBotDeviceInfo2(name, version3, os, bot) { + this.name = name; + this.version = version3; + this.os = os; + this.bot = bot; + this.type = "bot-device"; + } + return SearchBotDeviceInfo2; +}(); +var BotInfo = function() { + function BotInfo2() { + this.type = "bot"; + this.bot = true; + this.name = "bot"; + this.version = null; + this.os = null; + } + return BotInfo2; +}(); +var ReactNativeInfo = function() { + function ReactNativeInfo2() { + this.type = "react-native"; + this.name = "react-native"; + this.version = null; + this.os = null; + } + return ReactNativeInfo2; +}(); +var SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/; +var SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/; +var REQUIRED_VERSION_PARTS = 3; +var userAgentRules = [ + ["aol", /AOLShield\/([0-9\._]+)/], + ["edge", /Edge\/([0-9\._]+)/], + ["edge-ios", /EdgiOS\/([0-9\._]+)/], + ["yandexbrowser", /YaBrowser\/([0-9\._]+)/], + ["kakaotalk", /KAKAOTALK\s([0-9\.]+)/], + ["samsung", /SamsungBrowser\/([0-9\.]+)/], + ["silk", /\bSilk\/([0-9._-]+)\b/], + ["miui", /MiuiBrowser\/([0-9\.]+)$/], + ["beaker", /BeakerBrowser\/([0-9\.]+)/], + ["edge-chromium", /EdgA?\/([0-9\.]+)/], + [ + "chromium-webview", + /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/ + ], + ["chrome", /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], + ["phantomjs", /PhantomJS\/([0-9\.]+)(:?\s|$)/], + ["crios", /CriOS\/([0-9\.]+)(:?\s|$)/], + ["firefox", /Firefox\/([0-9\.]+)(?:\s|$)/], + ["fxios", /FxiOS\/([0-9\.]+)/], + ["opera-mini", /Opera Mini.*Version\/([0-9\.]+)/], + ["opera", /Opera\/([0-9\.]+)(?:\s|$)/], + ["opera", /OPR\/([0-9\.]+)(:?\s|$)/], + ["pie", /^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/], + ["pie", /^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/], + ["netfront", /^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/], + ["ie", /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/], + ["ie", /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/], + ["ie", /MSIE\s(7\.0)/], + ["bb10", /BB10;\sTouch.*Version\/([0-9\.]+)/], + ["android", /Android\s([0-9\.]+)/], + ["ios", /Version\/([0-9\._]+).*Mobile.*Safari.*/], + ["safari", /Version\/([0-9\._]+).*Safari/], + ["facebook", /FB[AS]V\/([0-9\.]+)/], + ["instagram", /Instagram\s([0-9\.]+)/], + ["ios-webview", /AppleWebKit\/([0-9\.]+).*Mobile/], + ["ios-webview", /AppleWebKit\/([0-9\.]+).*Gecko\)$/], + ["curl", /^curl\/([0-9\.]+)$/], + ["searchbot", SEARCHBOX_UA_REGEX] +]; +var operatingSystemRules = [ + ["iOS", /iP(hone|od|ad)/], + ["Android OS", /Android/], + ["BlackBerry OS", /BlackBerry|BB10/], + ["Windows Mobile", /IEMobile/], + ["Amazon OS", /Kindle/], + ["Windows 3.11", /Win16/], + ["Windows 95", /(Windows 95)|(Win95)|(Windows_95)/], + ["Windows 98", /(Windows 98)|(Win98)/], + ["Windows 2000", /(Windows NT 5.0)|(Windows 2000)/], + ["Windows XP", /(Windows NT 5.1)|(Windows XP)/], + ["Windows Server 2003", /(Windows NT 5.2)/], + ["Windows Vista", /(Windows NT 6.0)/], + ["Windows 7", /(Windows NT 6.1)/], + ["Windows 8", /(Windows NT 6.2)/], + ["Windows 8.1", /(Windows NT 6.3)/], + ["Windows 10", /(Windows NT 10.0)/], + ["Windows ME", /Windows ME/], + ["Windows CE", /Windows CE|WinCE|Microsoft Pocket Internet Explorer/], + ["Open BSD", /OpenBSD/], + ["Sun OS", /SunOS/], + ["Chrome OS", /CrOS/], + ["Linux", /(Linux)|(X11)/], + ["Mac OS", /(Mac_PowerPC)|(Macintosh)/], + ["QNX", /QNX/], + ["BeOS", /BeOS/], + ["OS/2", /OS\/2/] +]; +function detect(userAgent) { + if (!!userAgent) { + return parseUserAgent(userAgent); + } + if (typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative") { + return new ReactNativeInfo(); + } + if (typeof navigator !== "undefined") { + return parseUserAgent(navigator.userAgent); + } + return getNodeVersion(); +} +function matchUserAgent(ua) { + return ua !== "" && userAgentRules.reduce(function(matched, _a) { + var browser = _a[0], regex = _a[1]; + if (matched) { + return matched; + } + var uaMatch = regex.exec(ua); + return !!uaMatch && [browser, uaMatch]; + }, false); +} +function parseUserAgent(ua) { + var matchedRule = matchUserAgent(ua); + if (!matchedRule) { + return null; + } + var name = matchedRule[0], match = matchedRule[1]; + if (name === "searchbot") { + return new BotInfo(); + } + var versionParts = match[1] && match[1].split(".").join("_").split("_").slice(0, 3); + if (versionParts) { + if (versionParts.length < REQUIRED_VERSION_PARTS) { + versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true); + } + } else { + versionParts = []; + } + var version3 = versionParts.join("."); + var os = detectOS(ua); + var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua); + if (searchBotMatch && searchBotMatch[1]) { + return new SearchBotDeviceInfo(name, version3, os, searchBotMatch[1]); + } + return new BrowserInfo(name, version3, os); +} +function detectOS(ua) { + for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) { + var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1]; + var match = regex.exec(ua); + if (match) { + return os; + } + } + return null; +} +function getNodeVersion() { + var isNode = typeof process !== "undefined" && process.version; + return isNode ? new NodeInfo(process.version.slice(1)) : null; +} +function createVersionParts(count) { + var output = []; + for (var ii = 0; ii < count; ii++) { + output.push("0"); + } + return output; +} + +// src/packageLogs.ts +var browserInfo = detect(); +var logs; +var config; +var intervalId; +var intervalType; +var intervalPath; +var intervalTimer; +var intervalCounter; +var intervalLog; +var filterHandler = null; +var mapHandler = null; +var cbHandlers = {}; +function addCallbacks(...newCallbacks) { + newCallbacks.forEach((source) => { + let descriptors = {}; + descriptors = Object.keys(source).reduce((descriptors2, key) => { + descriptors2[key] = Object.getOwnPropertyDescriptor(source, key); + return descriptors2; + }, descriptors); + Object.getOwnPropertySymbols(source).forEach((sym) => { + const descriptor = Object.getOwnPropertyDescriptor(source, sym); + if (descriptor?.enumerable) { + descriptors[sym] = descriptor; + } + }); + Object.defineProperties(cbHandlers, descriptors); + }); + return cbHandlers; +} +function removeCallbacks(targetKeys) { + targetKeys.forEach((key) => { + if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) { + delete cbHandlers[key]; + } + }); +} +function initPackager(newLogs, newConfig) { + logs = newLogs; + config = newConfig; + cbHandlers = {}; + intervalId = null; + intervalType = null; + intervalPath = null; + intervalTimer = null; + intervalCounter = 0; + intervalLog = null; +} +function packageLog(e, detailFcn) { + if (!config.on) { + return false; + } + let details = null; + if (detailFcn) { + details = detailFcn(e); + } + const timeFields = extractTimeFields( + e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now() + ); + let log2 = { + target: e.target ? getSelector(e.target) : null, + path: buildPath(e), + pageUrl: window.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, + browser: detectBrowser(), + clientTime: timeFields.milli, + microTime: timeFields.micro, + location: getLocation(e), + scrnRes: getScreenRes(), + type: e.type, + logType: "raw", + userAction: true, + details, + userId: config.userId, + toolVersion: config.toolVersion, + toolName: config.toolName, + useraleVersion: config.useraleVersion, + sessionId: config.sessionId, + httpSessionId: config.httpSessionId, + browserSessionId: config.browserSessionId, + attributes: buildAttrs(e), + style: buildCSS(e) + }; + if (typeof filterHandler === "function" && !filterHandler(log2)) { + return false; + } + if (typeof mapHandler === "function") { + log2 = mapHandler(log2, e); + } + for (const func of Object.values(cbHandlers)) { + if (typeof func === "function") { + log2 = func(log2, e); + if (!log2) { + return false; + } + } + } + logs.push(log2); + return true; +} +function packageCustomLog(customLog, detailFcn, userAction) { + if (!config.on) { + return false; + } + let details = null; + if (detailFcn.length === 0) { + const staticDetailFcn = detailFcn; + details = staticDetailFcn(); + } + const metaData = { + pageUrl: window.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, + browser: detectBrowser(), + clientTime: Date.now(), + scrnRes: getScreenRes(), + logType: "custom", + userAction, + details, + userId: config.userId, + toolVersion: config.toolVersion, + toolName: config.toolName, + useraleVersion: config.useraleVersion, + sessionId: config.sessionId, + httpSessionId: config.httpSessionId, + browserSessionId: config.browserSessionId + }; + let log2 = Object.assign(metaData, customLog); + if (typeof filterHandler === "function" && !filterHandler(log2)) { + return false; + } + if (typeof mapHandler === "function") { + log2 = mapHandler(log2); + } + for (const func of Object.values(cbHandlers)) { + if (typeof func === "function") { + log2 = func(log2, null); + if (!log2) { + return false; + } + } + } + logs.push(log2); + return true; +} +function extractTimeFields(timeStamp) { + return { + milli: Math.floor(timeStamp), + micro: Number((timeStamp % 1).toFixed(3)) + }; +} +function packageIntervalLog(e) { + try { + const target = e.target ? getSelector(e.target) : null; + const path = buildPath(e); + const type = e.type; + const timestamp = Math.floor( + e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now() + ); + if (intervalId == null) { + intervalId = target; + intervalType = type; + intervalPath = path; + intervalTimer = timestamp; + intervalCounter = 0; + } + if ((intervalId !== target || intervalType !== type) && intervalTimer) { + intervalLog = { + target: intervalId, + path: intervalPath, + pageUrl: window.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, + browser: detectBrowser(), + count: intervalCounter, + duration: timestamp - intervalTimer, + startTime: intervalTimer, + endTime: timestamp, + type: intervalType, + logType: "interval", + targetChange: intervalId !== target, + typeChange: intervalType !== type, + userAction: false, + userId: config.userId, + toolVersion: config.toolVersion, + toolName: config.toolName, + useraleVersion: config.useraleVersion, + sessionId: config.sessionId, + httpSessionId: config.httpSessionId, + browserSessionId: config.browserSessionId + }; + if (typeof filterHandler === "function" && !filterHandler(intervalLog)) { + return false; + } + if (typeof mapHandler === "function") { + intervalLog = mapHandler(intervalLog, e); + } + for (const func of Object.values(cbHandlers)) { + if (typeof func === "function") { + intervalLog = func(intervalLog, null); + if (!intervalLog) { + return false; + } + } + } + if (intervalLog) + logs.push(intervalLog); + intervalId = target; + intervalType = type; + intervalPath = path; + intervalTimer = timestamp; + intervalCounter = 0; + } + if (intervalId == target && intervalType == type && intervalCounter) { + intervalCounter = intervalCounter + 1; + } + return true; + } catch { + return false; + } +} +function getLocation(e) { + if (e instanceof MouseEvent) { + if (e.pageX != null) { + return { x: e.pageX, y: e.pageY }; + } else if (e.clientX != null) { + return { + x: document.documentElement.scrollLeft + e.clientX, + y: document.documentElement.scrollTop + e.clientY + }; + } + } else { + return { x: null, y: null }; + } +} +function getScreenRes() { + return { width: window.innerWidth, height: window.innerHeight }; +} +function getSelector(ele) { + if (ele instanceof HTMLElement || ele instanceof Element) { + if (ele.localName) { + return ele.localName + (ele.id ? "#" + ele.id : "") + (ele.className ? "." + ele.className : ""); + } else if (ele.nodeName) { + return ele.nodeName + (ele.id ? "#" + ele.id : "") + (ele.className ? "." + ele.className : ""); + } + } else if (ele instanceof Document) { + return "#document"; + } else if (ele === globalThis) { + return "Window"; + } + return "Unknown"; +} +function buildPath(e) { + const path = e.composedPath(); + return selectorizePath(path); +} +function selectorizePath(path) { + let i = 0; + let pathEle; + const pathSelectors = []; + while (pathEle = path[i]) { + pathSelectors.push(getSelector(pathEle)); + ++i; + pathEle = path[i]; + } + return pathSelectors; +} +function detectBrowser() { + return { + browser: browserInfo ? browserInfo.name : "", + version: browserInfo ? browserInfo.version : "" + }; +} +function buildAttrs(e) { + const attributes = {}; + const attributeBlackList = ["style"]; + if (e.target && e.target instanceof Element) { + for (const attr of e.target.attributes) { + if (attributeBlackList.includes(attr.name)) + continue; + let val = attr.value; + try { + val = JSON.parse(val); + } catch (error) { + } + attributes[attr.name] = val; + } + } + return attributes; +} +function buildCSS(e) { + const properties = {}; + if (e.target && e.target instanceof HTMLElement) { + const styleObj = e.target.style; + for (let i = 0; i < styleObj.length; i++) { + const prop = styleObj[i]; + properties[prop] = styleObj.getPropertyValue(prop); + } + } + return properties; +} + +// src/attachHandlers.ts +var events; +var bufferBools; +var bufferedEvents; +var refreshEvents; +var intervalEvents = [ + "click", + "focus", + "blur", + "input", + "change", + "mouseover", + "submit" +]; +var windowEvents = ["load", "blur", "focus"]; +function extractMouseDetails(e) { + return { + clicks: e.detail, + ctrl: e.ctrlKey, + alt: e.altKey, + shift: e.shiftKey, + meta: e.metaKey + }; +} +function extractKeyboardDetails(e) { + return { + key: e.key, + code: e.code, + ctrl: e.ctrlKey, + alt: e.altKey, + shift: e.shiftKey, + meta: e.metaKey + }; +} +function extractChangeDetails(e) { + return { + value: e.target.value + }; +} +function extractWheelDetails(e) { + return { + x: e.deltaX, + y: e.deltaY, + z: e.deltaZ + }; +} +function extractScrollDetails() { + return { + x: window.scrollX, + y: window.scrollY + }; +} +function extractResizeDetails() { + return { + width: window.outerWidth, + height: window.outerHeight + }; +} +function defineDetails(config3) { + events = { + click: extractMouseDetails, + dblclick: extractMouseDetails, + mousedown: extractMouseDetails, + mouseup: extractMouseDetails, + focus: null, + blur: null, + input: config3.logDetails ? extractKeyboardDetails : null, + change: config3.logDetails ? extractChangeDetails : null, + dragstart: null, + dragend: null, + drag: null, + drop: null, + keydown: config3.logDetails ? extractKeyboardDetails : null, + mouseover: null + }; + bufferBools = {}; + bufferedEvents = { + wheel: extractWheelDetails, + scroll: extractScrollDetails, + resize: extractResizeDetails + }; + refreshEvents = { + submit: null + }; +} +function defineCustomDetails(options2, type) { + const eventType = { + click: extractMouseDetails, + dblclick: extractMouseDetails, + mousedown: extractMouseDetails, + mouseup: extractMouseDetails, + focus: null, + blur: null, + load: null, + input: options2.logDetails ? extractKeyboardDetails : null, + change: options2.logDetails ? extractChangeDetails : null, + dragstart: null, + dragend: null, + drag: null, + drop: null, + keydown: options2.logDetails ? extractKeyboardDetails : null, + mouseover: null, + wheel: extractWheelDetails, + scroll: extractScrollDetails, + resize: extractResizeDetails, + submit: null + }; + return eventType[type]; +} +function attachHandlers(config3) { + try { + defineDetails(config3); + Object.keys(events).forEach(function(ev) { + document.addEventListener( + ev, + function(e) { + packageLog(e, events[ev]); + }, + true + ); + }); + intervalEvents.forEach(function(ev) { + document.addEventListener( + ev, + function(e) { + packageIntervalLog(e); + }, + true + ); + }); + Object.keys(bufferedEvents).forEach( + function(ev) { + bufferBools[ev] = true; + window.addEventListener( + ev, + function(e) { + if (bufferBools[ev]) { + bufferBools[ev] = false; + packageLog(e, bufferedEvents[ev]); + setTimeout(function() { + bufferBools[ev] = true; + }, config3.resolution); + } + }, + true + ); + } + ); + Object.keys(refreshEvents).forEach( + function(ev) { + document.addEventListener( + ev, + function(e) { + packageLog(e, events[ev]); + }, + true + ); + } + ); + windowEvents.forEach(function(ev) { + window.addEventListener( + ev, + function(e) { + packageLog(e, function() { + return { window: true }; + }); + }, + true + ); + }); + return true; + } catch { + return false; + } +} + +// src/utils/auth/index.ts +var authCallback = null; +function updateAuthHeader(config3) { + if (authCallback) { + try { + config3.authHeader = authCallback(); + } catch (e) { + console.error(`Error encountered while setting the auth header: ${e}`); + } + } +} +function registerAuthCallback(callback) { + try { + verifyCallback(callback); + authCallback = callback; + return true; + } catch (e) { + return false; + } +} +function verifyCallback(callback) { + if (typeof callback !== "function") { + throw new Error("Userale auth callback must be a function"); + } + const result = callback(); + if (typeof result !== "string") { + throw new Error("Userale auth callback must return a string"); + } +} + +// src/utils/headers/index.ts +var headersCallback = null; +function updateCustomHeaders(config3) { + if (headersCallback) { + try { + config3.headers = headersCallback(); + } catch (e) { + console.error(`Error encountered while setting the headers: ${e}`); + } + } +} + +// src/sendLogs.ts +var sendIntervalId; +function initSender(logs3, config3) { + if (sendIntervalId) { + clearInterval(sendIntervalId); + } + sendIntervalId = sendOnInterval(logs3, config3); + sendOnClose(logs3, config3); +} +function sendOnInterval(logs3, config3) { + return setInterval(function() { + if (!config3.on) { + return; + } + if (logs3.length >= config3.logCountThreshold) { + sendLogs(logs3.slice(0), config3, 0); + logs3.splice(0); + } + }, config3.transmitInterval); +} +function sendOnClose(logs3, config3) { + window.addEventListener("pagehide", function() { + if (!config3.on) { + return; + } + if (logs3.length > 0) { + if (config3.websocketsEnabled) { + const data = JSON.stringify(logs3); + wsock.send(data); + } else { + const headers = new Headers(); + headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); + if (config3.authHeader) { + headers.set("Authorization", config3.authHeader.toString()); + } + fetch(config3.url, { + keepalive: true, + method: "POST", + headers, + body: JSON.stringify(logs3) + }).catch((error) => { + console.error(error); + }); + } + logs3.splice(0); + } + }); +} +function sendLogs(logs3, config3, retries) { + const data = JSON.stringify(logs3); + if (config3.websocketsEnabled) { + wsock.send(data); + } else { + const req = new XMLHttpRequest(); + req.open("POST", config3.url); + updateAuthHeader(config3); + if (config3.authHeader) { + req.setRequestHeader( + "Authorization", + typeof config3.authHeader === "function" ? config3.authHeader() : config3.authHeader + ); + } + req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); + updateCustomHeaders(config3); + if (config3.headers) { + Object.entries(config3.headers).forEach(([header, value]) => { + req.setRequestHeader(header, value); + }); + } + req.onreadystatechange = function() { + if (req.readyState === 4 && req.status !== 200) { + if (retries > 0) { + sendLogs(logs3, config3, retries--); + } + } + }; + req.send(data); + } +} + +// src/main.ts +var config2 = Configuration.getInstance(); +var logs2 = []; +var startLoadTimestamp = Date.now(); +var endLoadTimestamp; +try { + window.onload = function() { + endLoadTimestamp = Date.now(); + }; +} catch (error) { + endLoadTimestamp = Date.now(); +} +var started = false; +var wsock; +config2.update({ + useraleVersion: version +}); +initPackager(logs2, config2); +getWebsocketsEnabled(config2); +if (config2.autostart) { + setup(config2); +} +function setup(config3) { + if (!started) { + setTimeout(function() { + let state; + try { + state = document.readyState; + } catch (error) { + initSender(logs2, config3); + } + if (config3.autostart && (state === "interactive" || state === "complete")) { + attachHandlers(config3); + initSender(logs2, config3); + started = config3.on = true; + packageCustomLog( + { + type: "load", + details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp } + }, + () => ({}), + false + ); + } else { + setup(config3); + } + }, 100); + } +} +function getWebsocketsEnabled(config3) { + wsock = new WebSocket(config3.url.replace("http://", "ws://")); + wsock.onerror = () => { + console.log("no websockets detected"); + }; + wsock.onopen = () => { + console.log("connection established with websockets"); + config3.websocketsEnabled = true; + }; + wsock.onclose = () => { + sendOnClose(logs2, config3); + }; +} +var version2 = version; +function start() { + if (!started || config2.autostart === false) { + started = config2.on = true; + config2.update({ autostart: true }); + } +} +function stop() { + started = config2.on = false; + config2.update({ autostart: false }); +} +function options(newConfig) { + if (newConfig) { + config2.update(newConfig); + } + return config2; +} +function log(customLog) { + if (customLog) { + logs2.push(customLog); + return true; + } else { + return false; + } +} +export { + addCallbacks, + buildPath, + defineCustomDetails as details, + getSelector, + log, + options, + packageCustomLog, + packageLog, + registerAuthCallback, + removeCallbacks, + start, + started, + stop, + version2 as version, + wsock +}; +//# sourceMappingURL=main.mjs.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/esm/main.mjs.map b/products/userale/packages/flagon-userale/build/esm/main.mjs.map new file mode 100644 index 0000000..66a020b --- /dev/null +++ b/products/userale/packages/flagon-userale/build/esm/main.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/getInitialSettings.ts","../../src/configure.ts","../../../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js","../../src/packageLogs.ts","../../src/attachHandlers.ts","../../src/utils/auth/index.ts","../../src/utils/headers/index.ts","../../src/sendLogs.ts","../../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (window.sessionStorage.getItem(sessionKey) === null) {\n window.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(window.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { detect } from \"detect-browser\";\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\nconst browserInfo = detect();\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: window.innerWidth, height: window.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\nexport function detectBrowser() {\n return {\n browser: browserInfo ? browserInfo.name : \"\",\n version: browserInfo ? browserInfo.version : \"\",\n };\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n window.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n window.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n window.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n if (config.websocketsEnabled) {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\n\n// @todo expose config object to sendLogs replate url with config.url\nexport function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n) {\n const data = JSON.stringify(logs);\n\n if (config.websocketsEnabled) {\n wsock.send(data);\n } else {\n const req = new XMLHttpRequest();\n\n req.open(\"POST\", config.url);\n\n // Update headers\n updateAuthHeader(config);\n if (config.authHeader) {\n req.setRequestHeader(\n \"Authorization\",\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader,\n );\n }\n req.setRequestHeader(\"Content-type\", \"application/json;charset=UTF-8\");\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n Object.entries(config.headers).forEach(([header, value]) => {\n req.setRequestHeader(header, value);\n });\n }\n\n req.onreadystatechange = function() {\n if (req.readyState === 4 && req.status !== 200) {\n if (retries > 0) {\n sendLogs(logs, config, retries--);\n }\n }\n };\n\n req.send(data);\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender, sendOnClose } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\ntry {\n window.onload = function() {\n endLoadTimestamp = Date.now();\n };\n} catch (error) {\n endLoadTimestamp = Date.now();\n}\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\ngetWebsocketsEnabled(config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n initSender(logs, config);\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n/**\n * Checks to see if the specified backend URL supporsts Websockets\n * and updates the config accordingly\n */\nfunction getWebsocketsEnabled(config: Configuration) {\n wsock = new WebSocket(config.url.replace(\"http://\", \"ws://\"));\n wsock.onerror = () => {\n console.log(\"no websockets detected\");\n };\n wsock.onopen = () => {\n console.log(\"connection established with websockets\");\n config.websocketsEnabled = true;\n };\n wsock.onclose = () => {\n sendOnClose(logs, config);\n };\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAI,YAA2B;AAC/B,IAAI,gBAA+B;AAO5B,SAAS,qBAAsC;AACpD,MAAI,cAAc,MAAM;AACtB,gBAAY;AAAA,MACV;AAAA,MACA,aAAa,OAAO,KAAK,IAAI,CAAC;AAAA,IAChC;AAAA,EACF;AAEA,MAAI,kBAAkB,MAAM;AAC1B,oBAAgB;AAAA,MACd;AAAA,MACA,sBAAsB;AAAA,IACxB;AAAA,EACF;AAEA,QAAM,SACJ,SAAS,iBACR,WAAY;AACX,UAAM,UAAU,SAAS,qBAAqB,QAAQ;AACtD,WAAO,QAAQ,QAAQ,SAAS;AAAA,EAClC,EAAG;AAEL,QAAM,MAAM,SACR,OAAO,aAAa,KAAK,MAAM,IAC/B,WAAY;AACV,WAAO;AAAA,EACT;AACJ,QAAM,UAAU,IAAI,cAAc;AAClC,QAAM,WAA4B;AAAA,IAChC,YAAY,IAAI,WAAW,KAAK;AAAA,IAChC,WAAW,IAAI,gBAAgB,MAAM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ACpB,YAAQ,IAAI,wBAAwB;AAAA,EACtC;AACA,QAAM,SAAS,MAAM;AACnB,YAAQ,IAAI,wCAAwC;AACpD,IAAAA,QAAO,oBAAoB;AAAA,EAC7B;AACA,QAAM,UAAU,MAAM;AACpB,gBAAYC,OAAMD,OAAM;AAAA,EAC1B;AACF;AAGO,IAAME,WAAU;AAMhB,SAAS,QAAc;AAC5B,MAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;","names":["BrowserInfo","version","NodeInfo","version","SearchBotDeviceInfo","version","BotInfo","ReactNativeInfo","version","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/src/callbacks/authHandler.ts b/products/userale/packages/flagon-userale/src/callbacks/authHandler.ts deleted file mode 100644 index 1bd36e8..0000000 --- a/products/userale/packages/flagon-userale/src/callbacks/authHandler.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { CallbackHandler } from "@/callbacks/callbackHandler"; -import { Configuration } from "@/configure"; - -export const authHandler = new CallbackHandler({ - getValue: () => "", - validate: (value) => { - if (typeof value !== "string") { - throw new Error("Auth callback must return a string"); - } - }, - setValue: (config: Configuration, value: string) => { - config.authHeader = value; - }, - description: "auth", -}); diff --git a/products/userale/packages/flagon-userale/src/callbacks/callbackHandler.ts b/products/userale/packages/flagon-userale/src/callbacks/callbackHandler.ts deleted file mode 100644 index c983a80..0000000 --- a/products/userale/packages/flagon-userale/src/callbacks/callbackHandler.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { CallbackHandlerOptions } from "@/types" - -export class CallbackHandler { - private callback: (() => T) | null = null; - private readonly options: CallbackHandlerOptions; - - constructor(options: CallbackHandlerOptions) { - this.options = options; - } - - update(config: any): void { - if (this.callback) { - try { - const value = this.callback(); - this.options.validate(value); - this.options.setValue(config, value); - } catch (e) { - console.error(`Error in ${this.options.description} callback: ${e}`); - } - } - } - - register(callback: () => T): boolean { - try { - if (typeof callback !== "function") { - throw new Error(`${this.options.description} must be a function`); - } - const result = callback(); - this.options.validate(result); - this.callback = callback; - return true; - } catch { - return false; - } - } - - reset(): void { - this.callback = null; - } -} diff --git a/products/userale/packages/flagon-userale/src/callbacks/headersHandler.ts b/products/userale/packages/flagon-userale/src/callbacks/headersHandler.ts deleted file mode 100644 index 9c5cb21..0000000 --- a/products/userale/packages/flagon-userale/src/callbacks/headersHandler.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { CallbackHandler } from "@/callbacks/callbackHandler"; -import { Config } from "@/config"; - -export const headersHandler = new CallbackHandler>({ - getValue: () => ({}), - validate: (value) => { - if (typeof value !== "object" || value === null) { - throw new Error("Headers callback must return an object"); - } - for (const [k, v] of Object.entries(value)) { - if (typeof k !== "string" || typeof v !== "string") { - throw new Error("Headers must have string keys and values"); - } - } - }, - setValue: (config: Config, value: Record) => { - config.headers = value; - }, - description: "headers", -}); diff --git a/products/userale/packages/flagon-userale/src/callbacks/logHandler.ts b/products/userale/packages/flagon-userale/src/callbacks/logHandler.ts deleted file mode 100644 index 93845c1..0000000 --- a/products/userale/packages/flagon-userale/src/callbacks/logHandler.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { CallbackHandler } from "@/callbacks/callbackHandler"; -import { Configuration } from "@/configure"; - -export const logHandler = new CallbackHandler>({ - getValue: () => ({}), - validate: (value) => { - if (typeof value !== "object" || value === null) { - throw new Error("Headers callback must return an object"); - } - for (const [k, v] of Object.entries(value)) { - if (typeof k !== "string" || typeof v !== "string") { - throw new Error("Headers must have string keys and values"); - } - } - }, - setValue: (config: Configuration, value: Record) => { - config.headers = value; - }, - description: "headers", -}); diff --git a/products/userale/packages/flagon-userale/src/config.ts b/products/userale/packages/flagon-userale/src/config.ts deleted file mode 100644 index 3da51af..0000000 --- a/products/userale/packages/flagon-userale/src/config.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the 'License'); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { Settings } from "./types"; - -export class Config { - public autostart: boolean = false; - public authHeader: Settings.AuthHeader = null; - public browserSessionId: Settings.SessionId = null; - public custIndex: Settings.CustomIndex = null; - public headers: Settings.Headers = null; - public httpSessionId: Settings.SessionId = null; - public logCountThreshold: number = 5; - public logDetails: boolean = false; - public on: boolean = false; - public resolution: number = 500; - public sessionId: Settings.SessionId = null; - public time: Settings.TimeFunction = () => Date.now(); - public toolName: Settings.ToolName = null; - public toolVersion: Settings.Version = null; - public transmitInterval: number = 0; - public url: string = "http://localhost:8000"; - public userFromParams: Settings.UserFromParams = null; - public useraleVersion: Settings.Version = null; - public userId: Settings.UserId = null; - public version: Settings.Version = null; - - constructor(config: Partial) { - this.sessionId = this.getSessionId( - "userAlesessionId", - "session_" + String(Date.now()), - ); - - this.httpSessionId = this.getSessionId( - "userAleHttpSessionId", - this.generateHttpSessionId(), - ); - - this.timeStampScale(document.createEvent("CustomEvent")); - - this.update(config); - } - - /** - * Defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in - * storage when script is started. This prevents events like 'submit', which refresh page data - * from refreshing the current user session. - */ - private getSessionId(sessionKey: string, value: any): string { - if (window.sessionStorage.getItem(sessionKey) === null) { - window.sessionStorage.setItem(sessionKey, JSON.stringify(value)); - return value; - } - - return JSON.parse(window.sessionStorage.getItem(sessionKey) || ""); - } - - /** - * Creates a function to normalize the timestamp of the provided event. - * @param {Event} e An event containing a timeStamp property. - * @return {Settings.TimeFunction} The timestamp normalizing function. - */ - private timeStampScale(e: Event): Settings.TimeFunction { - let tsScaler: Settings.TimeFunction; - if (e.timeStamp && e.timeStamp > 0) { - const delta = Date.now() - e.timeStamp; - - /** - * Returns a timestamp depending on various browser quirks. - * @param {?Number} ts A timestamp to use for normalization. - * @return {Number} A normalized timestamp. - */ - if (delta < 0) { - tsScaler = function () { - return e.timeStamp / 1000; - }; - } else if (delta > e.timeStamp) { - const navStart = performance.timeOrigin; - tsScaler = function (ts) { - return ts + navStart; - }; - } else { - tsScaler = function (ts) { - return ts; - }; - } - } else { - tsScaler = function () { - return Date.now(); - }; - } - - return tsScaler; - } - - /** - * Creates a cryptographically random string to represent this HTTP session. - * @return {String} A random 32-digit hex string. - */ - private generateHttpSessionId(): string { - // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collision - const len = 32; - const arr = new Uint8Array(len / 2); - window.crypto.getRandomValues(arr); - return Array.from(arr, (dec) => { - return dec.toString(16).padStart(2, "0"); - }).join(""); - } - - /** - * Shallow merges a newConfig with the configuration class, updating it. - * Retrieves/updates the userid if userFromParams is provided. - * @param {Partial} newConfig Configuration object to merge into the current config. - */ - public update(newConfig: Partial): void { - const self = this as unknown as Settings.Config; - - (Object.keys(newConfig) as (keyof Settings.Config)[]).forEach((key) => { - const value = newConfig[key]; - if (value !== undefined) { - self[key] = value; - } - }); - } - - /** - * Attempts to extract the userid from the query parameters of the URL. - * @param {string} param The name of the query parameter containing the userid. - * @return {string | null} The extracted/decoded userid, or null if none is found. - */ - public getUserId(param?: string) { - if( this.userFromParams) { - const userField = param; - const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); - const results = window.location.href.match(regex); - - if (results && results[2]) { - return decodeURIComponent(results[2].replace(/\+/g, " ")); - } - return null; - } else { - return this.userId - } - } - -} diff --git a/products/userale/packages/flagon-userale/src/configure.ts b/products/userale/packages/flagon-userale/src/configure.ts index a6661dd..f41645d 100644 --- a/products/userale/packages/flagon-userale/src/configure.ts +++ b/products/userale/packages/flagon-userale/src/configure.ts @@ -64,12 +64,8 @@ export class Configuration { } private initialize(): void { - try { - const settings = getInitialSettings(); - this.update(settings); - } catch (error) { - console.log(error); - } + const settings = getInitialSettings(); + this.update(settings); } /** @@ -124,12 +120,4 @@ export class Configuration { } return null; } - - /** - * - * @return {bool} - */ - public isWebSocket(): boolean { - return this.url.startsWith("ws://") || this.url.startsWith("wss://"); - } } diff --git a/products/userale/packages/flagon-userale/src/getInitialSettings.temp.ts b/products/userale/packages/flagon-userale/src/getInitialSettings.ts similarity index 100% rename from products/userale/packages/flagon-userale/src/getInitialSettings.temp.ts rename to products/userale/packages/flagon-userale/src/getInitialSettings.ts diff --git a/products/userale/packages/flagon-userale/src/iife.ts b/products/userale/packages/flagon-userale/src/iife.ts deleted file mode 100644 index e69de29..0000000 diff --git a/products/userale/packages/flagon-userale/src/logPackager.ts b/products/userale/packages/flagon-userale/src/logPackager.ts deleted file mode 100644 index e47c694..0000000 --- a/products/userale/packages/flagon-userale/src/logPackager.ts +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Callbacks, Logging } from "@/types"; -import { Configuration } from "@/configure"; - -export class LogPackager { - private logs: Array = []; - private config!: Configuration; - private cbHandlers: Callbacks.CallbackMap = {}; - private intervalId: string | null = null; - private intervalType: string | null = null; - private intervalPath: string[] | null = null; - private intervalTimer: number | null = null; - private intervalCounter: number = 0; - private intervalLog: Logging.Log | null = null; - - public addCallbacks(...newCallbacks: Record[]): Callbacks.CallbackMap { - newCallbacks.forEach((source) => { - let descriptors: { [key in string | symbol]: any } = {}; - Object.keys(source).forEach((key) => { - descriptors[key] = Object.getOwnPropertyDescriptor(source, key); - }); - Object.getOwnPropertySymbols(source).forEach((sym) => { - const descriptor = Object.getOwnPropertyDescriptor(source, sym); - if (descriptor?.enumerable) descriptors[sym] = descriptor; - }); - Object.defineProperties(this.cbHandlers, descriptors); - }); - return this.cbHandlers; - } - - public removeCallbacks(targetKeys: string[]): void { - targetKeys.forEach((key) => { - if (Object.prototype.hasOwnProperty.call(this.cbHandlers, key)) { - delete this.cbHandlers[key]; - } - }); - } - - constructor(newLogs: Array, newConfig: Configuration) { - this.logs = newLogs; - this.config = newConfig; - this.cbHandlers = {}; - this.intervalId = null; - this.intervalType = null; - this.intervalPath = null; - this.intervalTimer = null; - this.intervalCounter = 0; - this.intervalLog = null; - } - - public packageLog(e: Event, detailFcn?: Logging.DynamicDetailFunction | null): boolean { - if (!this.config.on) return false; - - const details = detailFcn ? detailFcn(e) : null; - const timeFields = this.extractTimeFields(e.timeStamp && e.timeStamp > 0 ? this.config.time(e.timeStamp) : Date.now()); - - let log: Logging.Log = { - target: e.target ? this.getSelector(e.target) : null, - path: this.buildPath(e), - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - userAgent: window.navigator.userAgent, - clientTime: timeFields.milli, - microTime: timeFields.micro, - location: this.getLocation(e), - scrnRes: this.getScreenRes(), - type: e.type, - logType: "raw", - userAction: true, - details, - userId: this.config.userId, - toolVersion: this.config.toolVersion, - toolName: this.config.toolName, - useraleVersion: this.config.useraleVersion, - sessionId: this.config.sessionId, - httpSessionId: this.config.httpSessionId, - browserSessionId: this.config.browserSessionId, - attributes: this.buildAttrs(e), - style: this.buildCSS(e), - }; - - for (const func of Object.values(this.cbHandlers)) { - if (typeof func === "function") { - log = func(log, e); - if (!log) return false; - } - } - - this.logs.push(log); - return true; - } - - public packageCustomLog(customLog: Logging.CustomLog, detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction, userAction: boolean): boolean { - if (!this.config.on) return false; - - const details = detailFcn.length === 0 ? (detailFcn as Logging.StaticDetailFunction)() : null; - let log: Logging.Log = Object.assign({ - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - userAgent: window.navigator.userAgent, - clientTime: Date.now(), - scrnRes: this.getScreenRes(), - logType: "custom", - userAction, - details, - userId: this.config.userId, - toolVersion: this.config.toolVersion, - toolName: this.config.toolName, - useraleVersion: this.config.useraleVersion, - sessionId: this.config.sessionId, - httpSessionId: this.config.httpSessionId, - browserSessionId: this.config.browserSessionId, - }, customLog); - - for (const func of Object.values(this.cbHandlers)) { - if (typeof func === "function") { - log = func(log, null); - if (!log) return false; - } - } - - this.logs.push(log); - return true; - } - - private extractTimeFields(timeStamp: number) { - return { - milli: Math.floor(timeStamp), - micro: Number((timeStamp % 1).toFixed(3)), - }; - } - - public packageIntervalLog(e: Event): boolean { - try { - const target = e.target ? this.getSelector(e.target) : null; - const path = this.buildPath(e); - const type = e.type; - const timestamp = Math.floor(e.timeStamp && e.timeStamp > 0 ? this.config.time(e.timeStamp) : Date.now()); - - if (this.intervalId == null) { - this.intervalId = target; - this.intervalType = type; - this.intervalPath = path; - this.intervalTimer = timestamp; - this.intervalCounter = 0; - } - - if ((this.intervalId !== target || this.intervalType !== type) && this.intervalTimer) { - this.intervalLog = { - target: this.intervalId, - path: this.intervalPath, - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - userAgent: window.navigator.userAgent, - count: this.intervalCounter, - duration: timestamp - this.intervalTimer, - startTime: this.intervalTimer, - endTime: timestamp, - type: this.intervalType, - logType: "interval", - targetChange: this.intervalId !== target, - typeChange: this.intervalType !== type, - userAction: false, - userId: this.config.userId, - toolVersion: this.config.toolVersion, - toolName: this.config.toolName, - useraleVersion: this.config.useraleVersion, - sessionId: this.config.sessionId, - httpSessionId: this.config.httpSessionId, - browserSessionId: this.config.browserSessionId, - }; - - for (const func of Object.values(this.cbHandlers)) { - if (typeof func === "function") { - this.intervalLog = func(this.intervalLog, null); - if (!this.intervalLog) return false; - } - } - - if (this.intervalLog) this.logs.push(this.intervalLog); - - this.intervalId = target; - this.intervalType = type; - this.intervalPath = path; - this.intervalTimer = timestamp; - this.intervalCounter = 0; - } - - if (this.intervalId === target && this.intervalType === type) { - this.intervalCounter++; - } - - return true; - } catch { - return false; - } - } - - private getLocation(e: Event): { x: number | null; y: number | null } { - if (e instanceof MouseEvent) { - return e.pageX != null - ? { x: e.pageX, y: e.pageY } - : { x: document.documentElement.scrollLeft + e.clientX, y: document.documentElement.scrollTop + e.clientY }; - } - return { x: null, y: null }; - } - - private getScreenRes() { - return { width: window.innerWidth, height: window.innerHeight }; - } - - private getSelector(ele: EventTarget): string { - if (ele instanceof HTMLElement || ele instanceof Element) { - return ele.localName - ? ele.localName + (ele.id ? "#" + ele.id : "") + (ele.className ? "." + ele.className : "") - : ele.nodeName + (ele.id ? "#" + ele.id : "") + (ele.className ? "." + ele.className : ""); - } else if (ele instanceof Document) return "#document"; - else if (ele === globalThis) return "Window"; - return "Unknown"; - } - - private buildPath(e: Event): string[] { - return this.selectorizePath(e.composedPath()); - } - - private selectorizePath(path: EventTarget[]): string[] { - return path.map((ele) => this.getSelector(ele)); - } - - private buildAttrs(e: Event): Record { - const attributes: Record = {}; - const blacklist = ["style"]; - if (e.target instanceof Element) { - for (const attr of e.target.attributes) { - if (blacklist.includes(attr.name)) continue; - try { - attributes[attr.name] = JSON.parse(attr.value); - } catch { - attributes[attr.name] = attr.value; - } - } - } - return attributes; - } - - private buildCSS(e: Event): Record { - const properties: Record = {}; - if (e.target instanceof HTMLElement) { - const style = e.target.style; - for (let i = 0; i < style.length; i++) { - const prop = style[i]; - properties[prop] = style.getPropertyValue(prop); - } - } - return properties; - } -} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/src/logSender.ts b/products/userale/packages/flagon-userale/src/logSender.ts deleted file mode 100644 index d6c01ce..0000000 --- a/products/userale/packages/flagon-userale/src/logSender.ts +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Configuration } from "@/configure"; -import { Logging } from "@/types"; -import { updateAuthHeader, updateCustomHeaders } from "@/utils"; - -export class LogSender { - private sendIntervalId: NodeJS.Timeout | undefined; - private wsock: WebSocket | undefined; - - /** - * Initializes the log queue processors. - * @param logs Array of logs to append to. - * @param config Configuration object to use when logging. - */ - constructor(logs: Array, config: Configuration) { - if (this.sendIntervalId) { - clearInterval(this.sendIntervalId); - } - - this.sendIntervalId = this.sendOnInterval(logs, config); - - if(config.isWebSocket()) { - this.wsock = new WebSocket(config.url); - this.wsock.onerror = () => { - console.log("no websockets detected"); - }; - this.wsock.onopen = () => { - console.log("connection established with websockets"); - }; - this.wsock.onclose = () => { - this.sendOnClose(logs, config); - }; - - } else { - this.sendOnClose(logs, config); - } - - } - - /** - * Checks the provided log array on an interval, flushing the logs - * if the queue has reached the threshold specified by the provided config. - * @param logs Array of logs to read from. - * @param config Configuration singleton to be read from. - * @return The newly created interval id. - */ - private sendOnInterval( - logs: Array, - config: Configuration - ): NodeJS.Timeout { - this.sendIntervalId = setInterval(() => { - if (!config.on) return; - - if (logs.length >= config.logCountThreshold) { - this.sendLogs([...logs], config, 0); // Send a copy - logs.splice(0); // Clear array reference (no reassignment) - } - }, config.transmitInterval); - - return this.sendIntervalId; - } - - /** - * Attempts to flush the remaining logs when the window is closed. - * @param logs Array of logs to be flushed. - * @param config Configuration singleton to be read from. - */ - public sendOnClose( - logs: Array, - config: Configuration - ): void { - window.addEventListener("pagehide", () => { - if (!config.on) return; - - if (logs.length > 0) { - if (config.isWebSocket() && this.wsock?.readyState === WebSocket.OPEN) { - const data = JSON.stringify(logs); - this.wsock.send(data); - } else { - const headers: HeadersInit = new Headers(); - headers.set("Content-Type", "application/json;charset=UTF-8"); - - if (config.authHeader) { - headers.set("Authorization", config.authHeader.toString()); - } - - fetch(config.url, { - keepalive: true, - method: "POST", - headers: headers, - body: JSON.stringify(logs), - }).catch((error) => { - console.error(error); - }); - } - logs.splice(0); // Clear log queue - } - }); - } - - /** - * Sends the provided array of logs to the specified url, - * retrying the request up to the specified number of retries. - * @param logs Array of logs to send. - * @param config Configuration singleton. - * @param retries Maximum number of attempts to send the logs. - */ - public sendLogs( - logs: Array, - config: Configuration, - retries: number - ): void { - const data = JSON.stringify(logs); - - if (config.isWebSocket() && this.wsock?.readyState === WebSocket.OPEN) { - this.wsock.send(data); - } else { - const req = new XMLHttpRequest(); - req.open("POST", config.url); - - updateAuthHeader(config); - if (config.authHeader) { - req.setRequestHeader( - "Authorization", - typeof config.authHeader === "function" - ? config.authHeader() - : config.authHeader - ); - } - req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); - - updateCustomHeaders(config); - if (config.headers) { - Object.entries(config.headers).forEach(([header, value]) => { - req.setRequestHeader(header, value); - }); - } - - req.onreadystatechange = () => { - if (req.readyState === 4 && req.status !== 200 && retries > 0) { - this.sendLogs(logs, config, retries - 1); - } - }; - - req.send(data); - } - } -} diff --git a/products/userale/packages/flagon-userale/src/loggingEngine.ts b/products/userale/packages/flagon-userale/src/loggingEngine.ts deleted file mode 100644 index d6ff573..0000000 --- a/products/userale/packages/flagon-userale/src/loggingEngine.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements... - */ - -const startLoadTimestamp = Date.now(); - -import { version } from "../package.json"; -import { attachHandlers, defineCustomDetails } from "@/attachHandlers"; -import { logPackager } from "@/logPackager"; -import { logSender } from "@/logSender"; -import { registerAuthCallback } from "@/utils"; - -import type { Settings, Logging } from "@/types"; - - -export class LoggingEngine { - private config = Configuration.getInstance(); - private logs: Array = []; - private endLoadTimestamp: number; - public static version = userAleVersion; - private started = false; - - constructor() { - this.endLoadTimestamp = Date.now(); - try { - window.onload = () => { - this.endLoadTimestamp = Date.now(); - }; - } catch { - this.endLoadTimestamp = Date.now(); - } - - this.config.update({ - useraleVersion: userAleVersion, - }); - initPackager(this.logs, this.config); - - if (this.config.autostart) { - this.setup(); - } - } - - private setup(): void { - if (!this.started) { - setTimeout(() => { - let state: DocumentReadyState; - try { - state = document.readyState; - } catch { - return; - } - - if (this.config.autostart && (state === "interactive" || state === "complete")) { - attachHandlers(this.config); - initSender(this.logs, this.config); - this.started = this.config.on = true; - packageCustomLog( - { - type: "load", - details: { pageLoadTime: this.endLoadTimestamp - this.startLoadTimestamp }, - }, - () => ({}), - false - ); - } else { - this.setup(); - } - }, 100); - } - } - /** - * Used to start the logging process if the - * autostart configuration option is set to false. - */ - public start(): void { - if (!this.started || this.config.autostart === false) { - this.started = this.config.on = true; - this.config.update({ autostart: true }); - } - } - /** - * Halts the logging process. Logs will no longer be sent. - */ - public stop(): void { - this.started = this.config.on = false; - this.config.update({ autostart: false }); - } - - /** - * Updates the current configuration - * object with the provided values. - * @param {Partial} newConfig The configuration options to use. - * @return {Settings.Config} Returns the updated configuration. - */ - public options(newConfig?: Partial): Settings.Config { - if (newConfig) { - this.config.update(newConfig); - } - return this.config; - } - - /** - * Appends a log to the log queue. - * @param {Logging.CustomLog} customLog The log to append. - * @return {boolean} Whether the operation succeeded. - */ - public log(customLog?: Logging.CustomLog): boolean { - if (customLog) { - this.logs.push(customLog); - return true; - } - return false; - } -} - -// Export auxiliary utilities -export { - defineCustomDetails as details, - registerAuthCallback, - addCallbacks, - removeCallbacks, - packageLog, - packageCustomLog, -}; diff --git a/products/userale/packages/flagon-userale/src/main.ts b/products/userale/packages/flagon-userale/src/main.ts new file mode 100644 index 0000000..9f75c21 --- /dev/null +++ b/products/userale/packages/flagon-userale/src/main.ts @@ -0,0 +1,166 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { version as userAleVersion } from "../package.json"; +import { Configuration } from "@/configure"; +import { attachHandlers } from "@/attachHandlers"; +import { initPackager, packageCustomLog } from "@/packageLogs"; +import { initSender, sendOnClose } from "@/sendLogs"; + +import type { Settings, Logging } from "@/types"; + +const config = Configuration.getInstance(); +const logs: Array = []; + +const startLoadTimestamp = Date.now(); +let endLoadTimestamp: number; +try { + window.onload = function() { + endLoadTimestamp = Date.now(); + }; +} catch (error) { + endLoadTimestamp = Date.now(); +} + +export let started = false; +export let wsock: WebSocket; +export { defineCustomDetails as details } from "@/attachHandlers"; +export { registerAuthCallback as registerAuthCallback } from "@/utils"; +export { + addCallbacks as addCallbacks, + removeCallbacks as removeCallbacks, + packageLog as packageLog, + packageCustomLog as packageCustomLog, + getSelector as getSelector, + buildPath as buildPath, +} from "@/packageLogs"; + +config.update({ + useraleVersion: userAleVersion, +}); +initPackager(logs, config); +// getWebsocketsEnabled(config); +if (config.autostart) { + setup(config); +} + +/** + * Hooks the global event listener, and starts up the + * logging interval. + * @param {Configuration} config Configuration settings for the logger + */ +function setup(config: Configuration) { + if (!started) { + setTimeout(function() { + let state; + try { + state = document.readyState; + } catch (error) { + initSender(logs, config); + } + + if ( + config.autostart && + (state === "interactive" || state === "complete") + ) { + attachHandlers(config); + initSender(logs, config); + started = config.on = true; + packageCustomLog( + { + type: "load", + details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp }, + }, + () => ({}), + false, + ); + } else { + setup(config); + } + }, 100); + } +} + +/** + * Checks to see if the specified backend URL supporsts Websockets + * and updates the config accordingly + */ +function getWebsocketsEnabled(config: Configuration) { + wsock = new WebSocket(config.url.replace("http://", "ws://")); + wsock.onerror = () => { + console.log("no websockets detected"); + }; + wsock.onopen = () => { + console.log("connection established with websockets"); + config.websocketsEnabled = true; + }; + wsock.onclose = () => { + sendOnClose(logs, config); + }; +} + +// Export the Userale API +export const version = userAleVersion; + +/** + * Used to start the logging process if the + * autostart configuration option is set to false. + */ +export function start(): void { + if (!started || config.autostart === false) { + started = config.on = true; + config.update({ autostart: true }); + } +} + +/** + * Halts the logging process. Logs will no longer be sent. + */ +export function stop(): void { + started = config.on = false; + config.update({ autostart: false }); +} + +/** + * Updates the current configuration + * object with the provided values. + * @param {Partial} newConfig The configuration options to use. + * @return {Settings.Config} Returns the updated configuration. + */ +export function options( + newConfig: Partial | undefined, +): Settings.Config { + if (newConfig) { + config.update(newConfig); + } + + return config; +} + +/** + * Appends a log to the log queue. + * @param {Logging.CustomLog} customLog The log to append. + * @return {boolean} Whether the operation succeeded. + */ +export function log(customLog: Logging.CustomLog | undefined) { + if (customLog) { + logs.push(customLog); + return true; + } else { + return false; + } +} diff --git a/products/userale/packages/flagon-userale/src/packageLogs.ts b/products/userale/packages/flagon-userale/src/packageLogs.ts new file mode 100644 index 0000000..2cb0cbe --- /dev/null +++ b/products/userale/packages/flagon-userale/src/packageLogs.ts @@ -0,0 +1,471 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { detect } from "detect-browser"; +import { Callbacks, Logging } from "@/types"; +import { Configuration } from "@/configure"; +const browserInfo = detect(); + +export let logs: Array; +let config: Configuration; + +// Interval Logging Globals +let intervalId: string | null; +let intervalType: string | null; +let intervalPath: string[] | null; +let intervalTimer: number | null; +let intervalCounter: number | null; +let intervalLog: Logging.Log | null; + +export const filterHandler: CallableFunction | null = null; +export const mapHandler: CallableFunction | null = null; +export let cbHandlers: Callbacks.CallbackMap = {}; + +/** + * Adds named callbacks to be executed when logging. + * @param {Object } newCallbacks An object containing named callback functions. + */ +export function addCallbacks( + ...newCallbacks: Record[] +) { + newCallbacks.forEach((source) => { + let descriptors: { [key in string | symbol]: any } = {}; + + descriptors = Object.keys(source).reduce((descriptors, key) => { + descriptors[key] = Object.getOwnPropertyDescriptor(source, key); + return descriptors; + }, descriptors); + + Object.getOwnPropertySymbols(source).forEach((sym) => { + const descriptor = Object.getOwnPropertyDescriptor(source, sym); + if (descriptor?.enumerable) { + descriptors[sym] = descriptor; + } + }); + Object.defineProperties(cbHandlers, descriptors); + }); + return cbHandlers; +} + +/** + * Removes callbacks by name. + * @param {String[]} targetKeys A list of names of functions to remove. + */ +export function removeCallbacks(targetKeys: string[]) { + targetKeys.forEach((key) => { + if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) { + delete cbHandlers[key]; + } + }); +} + +/** + * Assigns the config and log container to be used by the logging functions. + * @param {Array} newLogs Log container. + * @param {Object} newConfig Configuration to use while logging. + */ +export function initPackager( + newLogs: Array, + newConfig: Configuration, +) { + logs = newLogs; + config = newConfig; + cbHandlers = {}; + intervalId = null; + intervalType = null; + intervalPath = null; + intervalTimer = null; + intervalCounter = 0; + intervalLog = null; +} + +/** + * Transforms the provided HTML event into a log and appends it to the log queue. + * @param {Event} e The event to be logged. + * @param {Function} detailFcn The function to extract additional log parameters from the event. + * @return {boolean} Whether the event was logged. + */ +export function packageLog( + e: Event, + detailFcn?: Logging.DynamicDetailFunction | null, +) { + if (!config.on) { + return false; + } + + let details = null; + if (detailFcn) { + details = detailFcn(e); + } + + const timeFields = extractTimeFields( + e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(), + ); + + let log: Logging.Log = { + target: e.target ? getSelector(e.target) : null, + path: buildPath(e), + pageUrl: window.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, + browser: detectBrowser(), + clientTime: timeFields.milli, + microTime: timeFields.micro, + location: getLocation(e), + scrnRes: getScreenRes(), + type: e.type, + logType: "raw", + userAction: true, + details: details, + userId: config.userId, + toolVersion: config.toolVersion, + toolName: config.toolName, + useraleVersion: config.useraleVersion, + sessionId: config.sessionId, + httpSessionId: config.httpSessionId, + browserSessionId: config.browserSessionId, + attributes: buildAttrs(e), + style: buildCSS(e), + }; + + if (typeof filterHandler === "function" && !filterHandler(log)) { + return false; + } + + if (typeof mapHandler === "function") { + log = mapHandler(log, e); + } + + for (const func of Object.values(cbHandlers)) { + if (typeof func === "function") { + log = func(log, e); + if (!log) { + return false; + } + } + } + + logs.push(log); + return true; +} + +/** + * Packages the provided customLog to include standard meta data and appends it to the log queue. + * @param {Logging.CustomLog} customLog The behavior to be logged. + * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. + * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) + * @return {boolean} Whether the event was logged. + */ +export function packageCustomLog( + customLog: Logging.CustomLog, + detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction, + userAction: boolean, +): boolean { + if (!config.on) { + return false; + } + + let details = null; + if (detailFcn.length === 0) { + // In the case of a union, the type checker will default to the more stringent + // type, i.e. the DetailFunction that expects an argument for safety purposes. + // To avoid this, we must explicitly check the type by asserting it receives + // no arguments (detailFcn.length === 0) and then cast it to the + // StaticDetailFunction type. + const staticDetailFcn = detailFcn as Logging.StaticDetailFunction; + details = staticDetailFcn(); + } + + const metaData = { + pageUrl: window.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, + browser: detectBrowser(), + clientTime: Date.now(), + scrnRes: getScreenRes(), + logType: "custom", + userAction: userAction, + details: details, + userId: config.userId, + toolVersion: config.toolVersion, + toolName: config.toolName, + useraleVersion: config.useraleVersion, + sessionId: config.sessionId, + httpSessionId: config.httpSessionId, + browserSessionId: config.browserSessionId, + }; + + let log = Object.assign(metaData, customLog); + + if (typeof filterHandler === "function" && !filterHandler(log)) { + return false; + } + + if (typeof mapHandler === "function") { + log = mapHandler(log); + } + + for (const func of Object.values(cbHandlers)) { + if (typeof func === "function") { + log = func(log, null); + if (!log) { + return false; + } + } + } + + logs.push(log); + + return true; +} + +/** + * Extract the millisecond and microsecond portions of a timestamp. + * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields. + * @return {Object} An object containing the millisecond + * and microsecond portions of the timestamp. + */ +export function extractTimeFields(timeStamp: number) { + return { + milli: Math.floor(timeStamp), + micro: Number((timeStamp % 1).toFixed(3)), + }; +} + +/** + * Track intervals and gather details about it. + * @param {Object} e + * @return boolean + */ +export function packageIntervalLog(e: Event) { + try { + const target = e.target ? getSelector(e.target) : null; + const path = buildPath(e); + const type = e.type; + const timestamp = Math.floor( + e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(), + ); + + // Init - this should only happen once on initialization + if (intervalId == null) { + intervalId = target; + intervalType = type; + intervalPath = path; + intervalTimer = timestamp; + intervalCounter = 0; + } + + if ((intervalId !== target || intervalType !== type) && intervalTimer) { + // When to create log? On transition end + // @todo Possible for intervalLog to not be pushed in the event the interval never ends... + + intervalLog = { + target: intervalId, + path: intervalPath, + pageUrl: window.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, + browser: detectBrowser(), + count: intervalCounter, + duration: timestamp - intervalTimer, // microseconds + startTime: intervalTimer, + endTime: timestamp, + type: intervalType, + logType: "interval", + targetChange: intervalId !== target, + typeChange: intervalType !== type, + userAction: false, + userId: config.userId, + toolVersion: config.toolVersion, + toolName: config.toolName, + useraleVersion: config.useraleVersion, + sessionId: config.sessionId, + httpSessionId: config.httpSessionId, + browserSessionId: config.browserSessionId, + }; + + if (typeof filterHandler === "function" && !filterHandler(intervalLog)) { + return false; + } + + if (typeof mapHandler === "function") { + intervalLog = mapHandler(intervalLog, e); + } + + for (const func of Object.values(cbHandlers)) { + if (typeof func === "function") { + intervalLog = func(intervalLog, null); + if (!intervalLog) { + return false; + } + } + } + + if (intervalLog) logs.push(intervalLog); + + // Reset + intervalId = target; + intervalType = type; + intervalPath = path; + intervalTimer = timestamp; + intervalCounter = 0; + } + + // Interval is still occuring, just update counter + if (intervalId == target && intervalType == type && intervalCounter) { + intervalCounter = intervalCounter + 1; + } + + return true; + } catch { + return false; + } +} + +/** + * Extracts coordinate information from the event + * depending on a few browser quirks. + * @param {Event} e The event to extract coordinate information from. + * @return {Object} An object containing nullable x and y coordinates for the event. + */ +export function getLocation(e: Event) { + if (e instanceof MouseEvent) { + if (e.pageX != null) { + return { x: e.pageX, y: e.pageY }; + } else if (e.clientX != null) { + return { + x: document.documentElement.scrollLeft + e.clientX, + y: document.documentElement.scrollTop + e.clientY, + }; + } + } else { + return { x: null, y: null }; + } +} + +/** + * Extracts innerWidth and innerHeight to provide estimates of screen resolution + * @return {Object} An object containing the innerWidth and InnerHeight + */ +export function getScreenRes() { + return { width: window.innerWidth, height: window.innerHeight }; +} + +/** + * Builds a string CSS selector from the provided element + * @param {EventTarget} ele The element from which the selector is built. + * @return {string} The CSS selector for the element, or Unknown if it can't be determined. + */ +export function getSelector(ele: EventTarget) { + if (ele instanceof HTMLElement || ele instanceof Element) { + if (ele.localName) { + return ( + ele.localName + + (ele.id ? "#" + ele.id : "") + + (ele.className ? "." + ele.className : "") + ); + } else if (ele.nodeName) { + return ( + ele.nodeName + + (ele.id ? "#" + ele.id : "") + + (ele.className ? "." + ele.className : "") + ); + } + } else if (ele instanceof Document) { + return "#document"; + } else if (ele === globalThis) { + return "Window"; + } + return "Unknown"; +} + +/** + * Builds an array of elements from the provided event target, to the root element. + * @param {Event} e Event from which the path should be built. + * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. + */ +export function buildPath(e: Event) { + const path = e.composedPath(); + return selectorizePath(path); +} + +/** + * Builds a CSS selector path from the provided list of elements. + * @param {EventTarget[]} path Array of HTML Elements from which the path should be built. + * @return {string[]} Array of string CSS selectors. + */ +export function selectorizePath(path: EventTarget[]) { + let i = 0; + let pathEle; + const pathSelectors: string[] = []; + while ((pathEle = path[i])) { + pathSelectors.push(getSelector(pathEle)); + ++i; + pathEle = path[i]; + } + return pathSelectors; +} + +export function detectBrowser() { + return { + browser: browserInfo ? browserInfo.name : "", + version: browserInfo ? browserInfo.version : "", + }; +} + +/** + * Builds an object containing attributes of an element. + * Attempts to parse all attribute values as JSON text. + * @param {Event} e Event from which the target element's attributes should be extracted. + * @return {Record} Object with element attributes as key-value pairs. + */ +export function buildAttrs(e: Event): Record { + const attributes: Record = {}; + const attributeBlackList = ["style"]; + + if (e.target && e.target instanceof Element) { + for (const attr of e.target.attributes) { + if (attributeBlackList.includes(attr.name)) continue; + let val: any = attr.value; + try { + val = JSON.parse(val); + } catch (error) { + // Ignore parsing errors, fallback to raw string value + } + attributes[attr.name] = val; + } + } + + return attributes; +} + +/** + * Builds an object containing all CSS properties of an element. + * @param {Event} e Event from which the target element's properties should be extracted. + * @return {Record} Object with all CSS properties as key-value pairs. + */ +export function buildCSS(e: Event): Record { + const properties: Record = {}; + if (e.target && e.target instanceof HTMLElement) { + const styleObj = e.target.style; + for (let i = 0; i < styleObj.length; i++) { + const prop = styleObj[i]; + properties[prop] = styleObj.getPropertyValue(prop); + } + } + return properties; +} diff --git a/products/userale/packages/flagon-userale/src/sendLogs.ts b/products/userale/packages/flagon-userale/src/sendLogs.ts new file mode 100644 index 0000000..2c9e6fc --- /dev/null +++ b/products/userale/packages/flagon-userale/src/sendLogs.ts @@ -0,0 +1,156 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Configuration } from "@/configure"; +import { Logging } from "@/types"; +import { updateAuthHeader, updateCustomHeaders } from "@/utils"; +import { wsock } from "./main"; + +let sendIntervalId: string | number | NodeJS.Timeout | undefined; + +/** + * Initializes the log queue processors. + * @param {Array} logs Array of logs to append to. + * @param {Configuration} config Configuration object to use when logging. + */ +export function initSender(logs: Array, config: Configuration) { + if (sendIntervalId) { + clearInterval(sendIntervalId); + } + + sendIntervalId = sendOnInterval(logs, config); + sendOnClose(logs, config); +} + +/** + * Checks the provided log array on an interval, flushing the logs + * if the queue has reached the threshold specified by the provided config. + * @param {Array} logs Array of logs to read from. + * @param {Configuration} config Configuration singleton to be read from. + * @return {Number} The newly created interval id. + */ +export function sendOnInterval( + logs: Array, + config: Configuration, +): NodeJS.Timeout { + return setInterval(function() { + if (!config.on) { + return; + } + + if (logs.length >= config.logCountThreshold) { + sendLogs(logs.slice(0), config, 0); // Send a copy + logs.splice(0); // Clear array reference (no reassignment) + } + }, config.transmitInterval); +} + +/** + * Attempts to flush the remaining logs when the window is closed. + * @param {Array} logs Array of logs to be flushed. + * @param {Configuration} config Configuration singleton to be read from. + */ +export function sendOnClose( + logs: Array, + config: Configuration, +): void { + window.addEventListener("pagehide", function() { + if (!config.on) { + return; + } + + if (logs.length > 0) { + if (config.websocketsEnabled) { + const data = JSON.stringify(logs); + wsock.send(data); + } else { + const headers: HeadersInit = new Headers(); + headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); + + if (config.authHeader) { + headers.set("Authorization", config.authHeader.toString()); + } + + fetch(config.url, { + keepalive: true, + method: "POST", + headers: headers, + body: JSON.stringify(logs), + }).catch((error) => { + console.error(error); + }); + } + logs.splice(0); // clear log queue + } + }); +} + +/** + * Sends the provided array of logs to the specified url, + * retrying the request up to the specified number of retries. + * @param {Array} logs Array of logs to send. + * @param {Configuration} config configuration singleton. + * @param {Number} retries Maximum number of attempts to send the logs. + */ + +// @todo expose config object to sendLogs replate url with config.url +export function sendLogs( + logs: Array, + config: Configuration, + retries: number, +) { + const data = JSON.stringify(logs); + + if (config.websocketsEnabled) { + wsock.send(data); + } else { + const req = new XMLHttpRequest(); + + req.open("POST", config.url); + + // Update headers + updateAuthHeader(config); + if (config.authHeader) { + req.setRequestHeader( + "Authorization", + typeof config.authHeader === "function" + ? config.authHeader() + : config.authHeader, + ); + } + req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); + + // Update custom headers last to allow them to over-write the defaults. This assumes + // the user knows what they are doing and may want to over-write the defaults. + updateCustomHeaders(config); + if (config.headers) { + Object.entries(config.headers).forEach(([header, value]) => { + req.setRequestHeader(header, value); + }); + } + + req.onreadystatechange = function() { + if (req.readyState === 4 && req.status !== 200) { + if (retries > 0) { + sendLogs(logs, config, retries--); + } + } + }; + + req.send(data); + } +} diff --git a/products/userale/packages/flagon-userale/src/types.d.ts b/products/userale/packages/flagon-userale/src/types.d.ts index 5534a15..193f9b0 100644 --- a/products/userale/packages/flagon-userale/src/types.d.ts +++ b/products/userale/packages/flagon-userale/src/types.d.ts @@ -65,6 +65,7 @@ export declare namespace Settings { useraleVersion: Version; userId: UserId; version?: Version; + websocketsEnabled?: boolean; } export interface IConfiguration extends Config { @@ -142,10 +143,19 @@ export declare namespace Events { }>; } -export interface CallbackHandlerOptions { - getValue: () => T; - validate: (value: T) => void; - setValue: (config: any, value: T) => void; - description: string; // for error messages +export declare namespace Callbacks { + export type AuthCallback = () => string; + export type HeadersCallback = () => Settings.HeaderObject; + + export type CallbackMap = { + [key in string]: CallableFunction; + }; } +export declare namespace Extension { + export type PluginConfig = { urlWhitelist: string }; + export type ConfigPayload = { + useraleConfig: Partial; + pluginConfig: PluginConfig; + }; +} diff --git a/products/userale/packages/flagon-userale/src/utils/auth/index.ts b/products/userale/packages/flagon-userale/src/utils/auth/index.ts new file mode 100644 index 0000000..12dc7ba --- /dev/null +++ b/products/userale/packages/flagon-userale/src/utils/auth/index.ts @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Configuration } from "@/configure"; +import { Callbacks } from "@/types"; + +export let authCallback: Callbacks.AuthCallback | null = null; + +/** + * Fetches the most up-to-date auth header string from the auth callback + * and updates the config object with the new value. + * @param {Configuration} config Configuration object to be updated. + * @param {Function} authCallback Callback used to fetch the newest header. + * @returns {void} + */ +export function updateAuthHeader(config: Configuration) { + if (authCallback) { + try { + config.authHeader = authCallback(); + } catch (e) { + // We should emit the error, but otherwise continue as this could be a temporary issue + // due to network connectivity or some logic inside the authCallback which is the user's + // responsibility. + console.error(`Error encountered while setting the auth header: ${e}`); + } + } +} + +/** + * Registers the provided callback to be used when updating the auth header. + * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string. + * @returns {boolean} Whether the operation succeeded. + */ +export function registerAuthCallback(callback: Callbacks.AuthCallback) { + try { + verifyCallback(callback); + authCallback = callback; + return true; + } catch (e) { + return false; + } +} + +/** + * Verify that the provided callback is a function which returns a string + * @param {Function} callback Callback used to fetch the newest header. Should return a string. + * @throws {Error} If the callback is not a function or does not return a string. + * @returns {void} + */ +export function verifyCallback(callback: Callbacks.AuthCallback) { + if (typeof callback !== "function") { + throw new Error("Userale auth callback must be a function"); + } + const result = callback(); + if (typeof result !== "string") { + throw new Error("Userale auth callback must return a string"); + } +} + +/** + * Resets the authCallback to null. Used for primarily for testing, but could be used + * to remove the callback in production. + * @returns {void} + */ +export function resetAuthCallback() { + authCallback = null; +} diff --git a/products/userale/packages/flagon-userale/src/utils/headers/index.ts b/products/userale/packages/flagon-userale/src/utils/headers/index.ts new file mode 100644 index 0000000..106f1f7 --- /dev/null +++ b/products/userale/packages/flagon-userale/src/utils/headers/index.ts @@ -0,0 +1,88 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Configuration } from "@/configure"; +import { Callbacks } from "@/types"; + +export let headersCallback: Callbacks.HeadersCallback | null = null; + +/** + * Fetches the most up-to-date custom headers object from the headers callback + * and updates the config object with the new value. + * @param {Configuration} config Configuration object to be updated. + * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers. + * @returns {void} + */ +export function updateCustomHeaders(config: Configuration) { + if (headersCallback) { + try { + config.headers = headersCallback(); + } catch (e) { + // We should emit the error, but otherwise continue as this could be a temporary issue + // due to network connectivity or some logic inside the headersCallback which is the user's + // responsibility. + console.error(`Error encountered while setting the headers: ${e}`); + } + } +} + +/** + * Registers the provided callback to be used when updating the auth header. + * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object. + * @returns {boolean} Whether the operation succeeded. + */ +export function registerHeadersCallback(callback: Callbacks.HeadersCallback) { + try { + verifyCallback(callback); + headersCallback = callback; + return true; + } catch (e) { + return false; + } +} + +/** + * Verify that the provided callback is a function which returns a string + * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object. + * @throws {Error} If the callback is not a function or does not return a string. + * @returns {void} + */ +export function verifyCallback(callback: Callbacks.HeadersCallback) { + if (typeof callback !== "function") { + throw new Error("Userale headers callback must be a function"); + } + const result = callback(); + if (typeof result !== "object") { + throw new Error("Userale headers callback must return an object"); + } + for (const [key, value] of Object.entries(result)) { + if (typeof key !== "string" || typeof value !== "string") { + throw new Error( + "Userale header callback must return an object with string keys and values", + ); + } + } +} + +/** + * Resets the authCallback to null. Used for primarily for testing, but could be used + * to remove the callback in production. + * @returns {void} + */ +export function resetHeadersCallback() { + headersCallback = null; +} diff --git a/products/userale/packages/flagon-userale/src/utils/index.ts b/products/userale/packages/flagon-userale/src/utils/index.ts new file mode 100644 index 0000000..f472640 --- /dev/null +++ b/products/userale/packages/flagon-userale/src/utils/index.ts @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { + authCallback, + updateAuthHeader, + registerAuthCallback, + resetAuthCallback, + verifyCallback as verifyAuthCallback, +} from "./auth"; +export { + headersCallback, + updateCustomHeaders, + registerHeadersCallback, + resetHeadersCallback, + verifyCallback as verifyHeadersCallback, +} from "./headers"; diff --git a/products/userale/packages/flagon-userale/tsup.config.js b/products/userale/packages/flagon-userale/tsup.config.js index 9ccd7ed..7e734de 100644 --- a/products/userale/packages/flagon-userale/tsup.config.js +++ b/products/userale/packages/flagon-userale/tsup.config.js @@ -22,34 +22,6 @@ export default defineConfig([ http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License.*/`, - }, - }, - { - tsconfig: './tsconfig.json', - entry: ['src/iife.ts'], - outDir: 'build/iife', - format: ['iife'], - name: 'userale', - target: 'es2021', - dts: true, - sourcemap: true, - clean: true, - minify: false, - banner: { - js: `/* Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to you under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. From c3c7ff4c5595e6bda0702eb40081fded954fbdd0 Mon Sep 17 00:00:00 2001 From: Mederick Grivel Date: Thu, 8 May 2025 11:58:23 -0400 Subject: [PATCH 03/20] initial set up --- .../packages/flagon-userale/src/main.ts | 28 +++++++++---------- .../packages/flagon-userale/src/sendLogs.ts | 10 +++---- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/products/userale/packages/flagon-userale/src/main.ts b/products/userale/packages/flagon-userale/src/main.ts index 9f75c21..51865ea 100644 --- a/products/userale/packages/flagon-userale/src/main.ts +++ b/products/userale/packages/flagon-userale/src/main.ts @@ -19,7 +19,7 @@ import { version as userAleVersion } from "../package.json"; import { Configuration } from "@/configure"; import { attachHandlers } from "@/attachHandlers"; import { initPackager, packageCustomLog } from "@/packageLogs"; -import { initSender, sendOnClose } from "@/sendLogs"; +import { initSender } from "@/sendLogs"; //, sendOnClose import type { Settings, Logging } from "@/types"; @@ -99,19 +99,19 @@ function setup(config: Configuration) { * Checks to see if the specified backend URL supporsts Websockets * and updates the config accordingly */ -function getWebsocketsEnabled(config: Configuration) { - wsock = new WebSocket(config.url.replace("http://", "ws://")); - wsock.onerror = () => { - console.log("no websockets detected"); - }; - wsock.onopen = () => { - console.log("connection established with websockets"); - config.websocketsEnabled = true; - }; - wsock.onclose = () => { - sendOnClose(logs, config); - }; -} +// function getWebsocketsEnabled(config: Configuration) { +// wsock = new WebSocket(config.url.replace("http://", "ws://")); +// wsock.onerror = () => { +// console.log("no websockets detected"); +// }; +// wsock.onopen = () => { +// console.log("connection established with websockets"); +// config.websocketsEnabled = true; +// }; +// wsock.onclose = () => { +// sendOnClose(logs, config); +// }; +// } // Export the Userale API export const version = userAleVersion; diff --git a/products/userale/packages/flagon-userale/src/sendLogs.ts b/products/userale/packages/flagon-userale/src/sendLogs.ts index 2c9e6fc..a0ca586 100644 --- a/products/userale/packages/flagon-userale/src/sendLogs.ts +++ b/products/userale/packages/flagon-userale/src/sendLogs.ts @@ -59,11 +59,11 @@ export function sendOnInterval( }, config.transmitInterval); } -/** - * Attempts to flush the remaining logs when the window is closed. - * @param {Array} logs Array of logs to be flushed. - * @param {Configuration} config Configuration singleton to be read from. - */ +// /** +// * Attempts to flush the remaining logs when the window is closed. +// * @param {Array} logs Array of logs to be flushed. +// * @param {Configuration} config Configuration singleton to be read from. +// */ export function sendOnClose( logs: Array, config: Configuration, From 98709f54aaa5b9016fd16f118fb5876936996b84 Mon Sep 17 00:00:00 2001 From: Mederick Grivel Date: Thu, 8 May 2025 11:59:57 -0400 Subject: [PATCH 04/20] setup --- products/userale/package.json | 5 + products/userale/pnpm-lock.yaml | 160 ++++++++++++++++++-------------- 2 files changed, 93 insertions(+), 72 deletions(-) diff --git a/products/userale/package.json b/products/userale/package.json index 735eb90..79ed292 100644 --- a/products/userale/package.json +++ b/products/userale/package.json @@ -6,6 +6,11 @@ "build": "pnpm -r run build" }, "devDependencies": { + "@types/detect-browser": "^4.0.3", "pnpm": "^10.0.0" + }, + "dependencies": { + "detect-browser": "^5.3.0", + "esbuild": "^0.21.5" } } \ No newline at end of file diff --git a/products/userale/pnpm-lock.yaml b/products/userale/pnpm-lock.yaml index 57bb975..f8cf5db 100644 --- a/products/userale/pnpm-lock.yaml +++ b/products/userale/pnpm-lock.yaml @@ -7,7 +7,17 @@ settings: importers: .: + dependencies: + detect-browser: + specifier: ^5.3.0 + version: 5.3.0 + esbuild: + specifier: ^0.21.5 + version: 0.21.5 devDependencies: + '@types/detect-browser': + specifier: ^4.0.3 + version: 4.0.3 pnpm: specifier: ^10.0.0 version: 10.10.0 @@ -20,7 +30,7 @@ importers: devDependencies: '@eslint/js': specifier: ^9.2.0 - version: 9.25.1 + version: 9.26.0 '@playwright/test': specifier: ^1.51.0 version: 1.52.0 @@ -32,7 +42,7 @@ importers: version: 21.1.7 '@types/node': specifier: ^20.14.2 - version: 20.17.31 + version: 20.17.46 '@types/ws': specifier: ^8.5.12 version: 8.18.1 @@ -56,10 +66,7 @@ importers: version: 13.17.0 cz-conventional-changelog: specifier: ^3.3.0 - version: 3.3.0(@types/node@20.17.31)(typescript@5.8.3) - detect-browser: - specifier: ^5.3.0 - version: 5.3.0 + version: 3.3.0(@types/node@20.17.46)(typescript@5.8.3) dom-storage: specifier: ^2.1.0 version: 2.1.0 @@ -83,7 +90,7 @@ importers: version: 9.1.7 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) + version: 29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)) jest-environment-jsdom: specifier: ^29.7.0 version: 29.7.0 @@ -101,10 +108,10 @@ importers: version: 3.5.3 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3) + version: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3) tsup: specifier: ^5.10.0 - version: 5.12.9(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3))(typescript@5.8.3) + version: 5.12.9(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3))(typescript@5.8.3) typescript: specifier: ^5.4.5 version: 5.8.3 @@ -113,7 +120,7 @@ importers: version: 7.18.0(eslint@8.57.1)(typescript@5.8.3) ws: specifier: ^8.18.0 - version: 8.18.1 + version: 8.18.2 packages/flagon-userale-ext: dependencies: @@ -711,8 +718,8 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.25.1': - resolution: {integrity: sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==} + '@eslint/js@9.26.0': + resolution: {integrity: sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@expo/spawn-async@1.7.2': @@ -2103,6 +2110,7 @@ packages: '@swc/core@1.11.22': resolution: {integrity: sha512-mjPYbqq8XjwqSE0hEPT9CzaJDyxql97LgK4iyvYlwVSQhdN1uK0DBG4eP9PxYzCS2MUGAXB34WFLegdUj5HGpg==} engines: {node: '>=10'} + deprecated: It has a bug. See https://github.com/swc-project/swc/issues/10413 peerDependencies: '@swc/helpers': '>=0.5.17' peerDependenciesMeta: @@ -2169,6 +2177,10 @@ packages: '@types/conventional-commits-parser@5.0.1': resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} + '@types/detect-browser@4.0.3': + resolution: {integrity: sha512-uQeYXGIqIA9ie/Awh/MpX0le2m07AyBs9UXrXLRpevICR5T7hS8eXtrDqaSj4pYP5G0Th7Bnf8rIyiwCYBDmKQ==} + deprecated: This is a stub types definition. detect-browser provides its own type definitions, so you do not need this installed. + '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} @@ -2208,8 +2220,8 @@ packages: '@types/node@20.11.5': resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==} - '@types/node@20.17.31': - resolution: {integrity: sha512-quODOCNXQAbNf1Q7V+fI8WyErOCh0D5Yd31vHnKu4GkSztGQ7rlltAaqXhHhLl33tlVyUXs2386MkANSwgDn6A==} + '@types/node@20.17.46': + resolution: {integrity: sha512-0PQHLhZPWOxGW4auogW0eOQAuNIlCYvibIpG67ja0TOJ6/sehu+1en7sfceUn+QQtx4Rk3GxbLNwPh0Cav7TWw==} '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -5793,8 +5805,8 @@ packages: resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - ws@8.18.1: - resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} + ws@8.18.2: + resolution: {integrity: sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -6081,7 +6093,7 @@ snapshots: '@commitlint/execute-rule@19.8.0': optional: true - '@commitlint/load@19.8.0(@types/node@20.17.31)(typescript@5.8.3)': + '@commitlint/load@19.8.0(@types/node@20.17.46)(typescript@5.8.3)': dependencies: '@commitlint/config-validator': 19.8.0 '@commitlint/execute-rule': 19.8.0 @@ -6089,7 +6101,7 @@ snapshots: '@commitlint/types': 19.8.0 chalk: 5.4.1 cosmiconfig: 9.0.0(typescript@5.8.3) - cosmiconfig-typescript-loader: 6.1.0(@types/node@20.17.31)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3) + cosmiconfig-typescript-loader: 6.1.0(@types/node@20.17.46)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -6332,7 +6344,7 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.25.1': {} + '@eslint/js@9.26.0': {} '@expo/spawn-async@1.7.2': dependencies: @@ -6577,27 +6589,27 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -6622,7 +6634,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -6640,7 +6652,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.17.31 + '@types/node': 20.17.46 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -6662,7 +6674,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.17.31 + '@types/node': 20.17.46 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -6732,7 +6744,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.17.31 + '@types/node': 20.17.46 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -8180,9 +8192,13 @@ snapshots: '@types/conventional-commits-parser@5.0.1': dependencies: - '@types/node': 20.17.31 + '@types/node': 20.17.46 optional: true + '@types/detect-browser@4.0.3': + dependencies: + detect-browser: 5.3.0 + '@types/estree@1.0.7': {} '@types/filesystem@0.0.36': @@ -8193,7 +8209,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.17.31 + '@types/node': 20.17.46 '@types/har-format@1.2.16': {} @@ -8216,13 +8232,13 @@ snapshots: '@types/jsdom@20.0.1': dependencies: - '@types/node': 20.17.31 + '@types/node': 20.17.46 '@types/tough-cookie': 4.0.5 parse5: 7.3.0 '@types/jsdom@21.1.7': dependencies: - '@types/node': 20.17.31 + '@types/node': 20.17.46 '@types/tough-cookie': 4.0.5 parse5: 7.3.0 @@ -8230,7 +8246,7 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@20.17.31': + '@types/node@20.17.46': dependencies: undici-types: 6.19.8 @@ -8266,7 +8282,7 @@ snapshots: '@types/ws@8.18.1': dependencies: - '@types/node': 20.17.31 + '@types/node': 20.17.46 '@types/yargs-parser@21.0.3': {} @@ -8276,7 +8292,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.17.31 + '@types/node': 20.17.46 optional: true '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3)': @@ -8888,10 +8904,10 @@ snapshots: commander@7.2.0: {} - commitizen@4.3.1(@types/node@20.17.31)(typescript@5.8.3): + commitizen@4.3.1(@types/node@20.17.46)(typescript@5.8.3): dependencies: cachedir: 2.3.0 - cz-conventional-changelog: 3.3.0(@types/node@20.17.31)(typescript@5.8.3) + cz-conventional-changelog: 3.3.0(@types/node@20.17.46)(typescript@5.8.3) dedent: 0.7.0 detect-indent: 6.1.0 find-node-modules: 2.1.3 @@ -8939,9 +8955,9 @@ snapshots: core-util-is@1.0.2: {} - cosmiconfig-typescript-loader@6.1.0(@types/node@20.17.31)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3): + cosmiconfig-typescript-loader@6.1.0(@types/node@20.17.46)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3): dependencies: - '@types/node': 20.17.31 + '@types/node': 20.17.46 cosmiconfig: 9.0.0(typescript@5.8.3) jiti: 2.4.2 typescript: 5.8.3 @@ -8974,13 +8990,13 @@ snapshots: typescript: 5.8.3 optional: true - create-jest@29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): + create-jest@29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -9088,16 +9104,16 @@ snapshots: untildify: 4.0.0 yauzl: 2.10.0 - cz-conventional-changelog@3.3.0(@types/node@20.17.31)(typescript@5.8.3): + cz-conventional-changelog@3.3.0(@types/node@20.17.46)(typescript@5.8.3): dependencies: chalk: 2.4.2 - commitizen: 4.3.1(@types/node@20.17.31)(typescript@5.8.3) + commitizen: 4.3.1(@types/node@20.17.46)(typescript@5.8.3) conventional-commit-types: 3.0.0 lodash.map: 4.6.0 longest: 2.0.1 word-wrap: 1.2.5 optionalDependencies: - '@commitlint/load': 19.8.0(@types/node@20.17.31)(typescript@5.8.3) + '@commitlint/load': 19.8.0(@types/node@20.17.46)(typescript@5.8.3) transitivePeerDependencies: - '@types/node' - typescript @@ -10245,7 +10261,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -10265,16 +10281,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): + jest-cli@29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) + create-jest: 29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -10284,7 +10300,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): + jest-config@29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)): dependencies: '@babel/core': 7.26.10 '@jest/test-sequencer': 29.7.0 @@ -10309,8 +10325,8 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 20.17.31 - ts-node: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3) + '@types/node': 20.17.46 + ts-node: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -10340,7 +10356,7 @@ snapshots: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 20.17.31 + '@types/node': 20.17.46 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3 @@ -10354,7 +10370,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -10364,7 +10380,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.17.31 + '@types/node': 20.17.46 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -10403,7 +10419,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -10438,7 +10454,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -10466,7 +10482,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 chalk: 4.1.2 cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.2 @@ -10512,7 +10528,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -10531,7 +10547,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.31 + '@types/node': 20.17.46 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -10540,17 +10556,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 20.17.31 + '@types/node': 20.17.46 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): + jest@29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) + jest-cli: 29.7.0(@types/node@20.17.46)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -10603,7 +10619,7 @@ snapshots: whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 - ws: 8.18.1 + ws: 8.18.2 xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil @@ -10631,7 +10647,7 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.2.0 - ws: 8.18.1 + ws: 8.18.2 xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil @@ -11336,13 +11352,13 @@ snapshots: camelcase-css: 2.0.1 postcss: 8.5.3 - postcss-load-config@3.1.4(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): + postcss-load-config@3.1.4(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: postcss: 8.5.3 - ts-node: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3) + ts-node: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3) postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3)): dependencies: @@ -11998,14 +12014,14 @@ snapshots: '@swc/core': 1.11.22(@swc/helpers@0.5.17) optional: true - ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3): + ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.17.31 + '@types/node': 20.17.46 acorn: 8.14.1 acorn-walk: 8.3.4 arg: 4.1.3 @@ -12020,7 +12036,7 @@ snapshots: tslib@2.8.1: {} - tsup@5.12.9(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3))(typescript@5.8.3): + tsup@5.12.9(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3))(typescript@5.8.3): dependencies: bundle-require: 3.1.2(esbuild@0.14.54) cac: 6.7.14 @@ -12030,7 +12046,7 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 3.1.4(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) + postcss-load-config: 3.1.4(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.46)(typescript@5.8.3)) resolve-from: 5.0.0 rollup: 2.79.2 source-map: 0.8.0-beta.0 @@ -12270,7 +12286,7 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 3.0.7 - ws@8.18.1: {} + ws@8.18.2: {} xml-name-validator@4.0.0: {} From 3fdc297cdf124bb23d9dbf4415ea8b089fc9a5e4 Mon Sep 17 00:00:00 2001 From: Mederick Charles Fernand Grivel Date: Tue, 13 May 2025 17:59:02 -0400 Subject: [PATCH 05/20] minor changes --- .../flagon-userale/build/esm/main.mjs.map | 2 +- .../packages/flagon-userale/src/main.ts | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/products/userale/packages/flagon-userale/build/esm/main.mjs.map b/products/userale/packages/flagon-userale/build/esm/main.mjs.map index 66a020b..fc6f4b0 100644 --- a/products/userale/packages/flagon-userale/build/esm/main.mjs.map +++ b/products/userale/packages/flagon-userale/build/esm/main.mjs.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/getInitialSettings.ts","../../src/configure.ts","../../../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js","../../src/packageLogs.ts","../../src/attachHandlers.ts","../../src/utils/auth/index.ts","../../src/utils/headers/index.ts","../../src/sendLogs.ts","../../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (window.sessionStorage.getItem(sessionKey) === null) {\n window.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(window.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { detect } from \"detect-browser\";\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\nconst browserInfo = detect();\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: window.innerWidth, height: window.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\nexport function detectBrowser() {\n return {\n browser: browserInfo ? browserInfo.name : \"\",\n version: browserInfo ? browserInfo.version : \"\",\n };\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n window.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n window.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n window.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n if (config.websocketsEnabled) {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\n\n// @todo expose config object to sendLogs replate url with config.url\nexport function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n) {\n const data = JSON.stringify(logs);\n\n if (config.websocketsEnabled) {\n wsock.send(data);\n } else {\n const req = new XMLHttpRequest();\n\n req.open(\"POST\", config.url);\n\n // Update headers\n updateAuthHeader(config);\n if (config.authHeader) {\n req.setRequestHeader(\n \"Authorization\",\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader,\n );\n }\n req.setRequestHeader(\"Content-type\", \"application/json;charset=UTF-8\");\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n Object.entries(config.headers).forEach(([header, value]) => {\n req.setRequestHeader(header, value);\n });\n }\n\n req.onreadystatechange = function() {\n if (req.readyState === 4 && req.status !== 200) {\n if (retries > 0) {\n sendLogs(logs, config, retries--);\n }\n }\n };\n\n req.send(data);\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender, sendOnClose } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\ntry {\n window.onload = function() {\n endLoadTimestamp = Date.now();\n };\n} catch (error) {\n endLoadTimestamp = Date.now();\n}\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\ngetWebsocketsEnabled(config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n initSender(logs, config);\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n/**\n * Checks to see if the specified backend URL supporsts Websockets\n * and updates the config accordingly\n */\nfunction getWebsocketsEnabled(config: Configuration) {\n wsock = new WebSocket(config.url.replace(\"http://\", \"ws://\"));\n wsock.onerror = () => {\n console.log(\"no websockets detected\");\n };\n wsock.onopen = () => {\n console.log(\"connection established with websockets\");\n config.websocketsEnabled = true;\n };\n wsock.onclose = () => {\n sendOnClose(logs, config);\n };\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAI,YAA2B;AAC/B,IAAI,gBAA+B;AAO5B,SAAS,qBAAsC;AACpD,MAAI,cAAc,MAAM;AACtB,gBAAY;AAAA,MACV;AAAA,MACA,aAAa,OAAO,KAAK,IAAI,CAAC;AAAA,IAChC;AAAA,EACF;AAEA,MAAI,kBAAkB,MAAM;AAC1B,oBAAgB;AAAA,MACd;AAAA,MACA,sBAAsB;AAAA,IACxB;AAAA,EACF;AAEA,QAAM,SACJ,SAAS,iBACR,WAAY;AACX,UAAM,UAAU,SAAS,qBAAqB,QAAQ;AACtD,WAAO,QAAQ,QAAQ,SAAS;AAAA,EAClC,EAAG;AAEL,QAAM,MAAM,SACR,OAAO,aAAa,KAAK,MAAM,IAC/B,WAAY;AACV,WAAO;AAAA,EACT;AACJ,QAAM,UAAU,IAAI,cAAc;AAClC,QAAM,WAA4B;AAAA,IAChC,YAAY,IAAI,WAAW,KAAK;AAAA,IAChC,WAAW,IAAI,gBAAgB,MAAM,UAAU,QAAQ;AAAA,IACvD,kBAAkB;AAAA,IAClB,WAAW,IAAI,YAAY,KAAK;AAAA,IAChC,SAAS,UAAU,KAAK,MAAM,OAAO,IAAI;AAAA,IACz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;AACA,QAAM,UAAU,MAAM;AACpB,gBAAYC,OAAMD,OAAM;AAAA,EAC1B;AACF;AAGO,IAAME,WAAU;AAMhB,SAAS,QAAc;AAC5B,MAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;","names":["BrowserInfo","version","NodeInfo","version","SearchBotDeviceInfo","version","BotInfo","ReactNativeInfo","version","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file +{"version":3,"sources":["../../src/getInitialSettings.ts","../../src/configure.ts","../../../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js","../../src/packageLogs.ts","../../src/attachHandlers.ts","../../src/utils/auth/index.ts","../../src/utils/headers/index.ts","../../src/sendLogs.ts","../../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (window.sessionStorage.getItem(sessionKey) === null) {\n window.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(window.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { detect } from \"detect-browser\";\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\nconst browserInfo = detect();\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: window.innerWidth, height: window.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\nexport function detectBrowser() {\n return {\n browser: browserInfo ? browserInfo.name : \"\",\n version: browserInfo ? browserInfo.version : \"\",\n };\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n window.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n window.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n// /**\n// * Attempts to flush the remaining logs when the window is closed.\n// * @param {Array} logs Array of logs to be flushed.\n// * @param {Configuration} config Configuration singleton to be read from.\n// */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n window.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n if (config.websocketsEnabled) {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\n\n// @todo expose config object to sendLogs replate url with config.url\nexport function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n) {\n const data = JSON.stringify(logs);\n\n if (config.websocketsEnabled) {\n wsock.send(data);\n } else {\n const req = new XMLHttpRequest();\n\n req.open(\"POST\", config.url);\n\n // Update headers\n updateAuthHeader(config);\n if (config.authHeader) {\n req.setRequestHeader(\n \"Authorization\",\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader,\n );\n }\n req.setRequestHeader(\"Content-type\", \"application/json;charset=UTF-8\");\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n Object.entries(config.headers).forEach(([header, value]) => {\n req.setRequestHeader(header, value);\n });\n }\n\n req.onreadystatechange = function() {\n if (req.readyState === 4 && req.status !== 200) {\n if (retries > 0) {\n sendLogs(logs, config, retries--);\n }\n }\n };\n\n req.send(data);\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender, sendOnClose } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\ntry {\n window.onload = function() {\n endLoadTimestamp = Date.now();\n };\n} catch (error) {\n endLoadTimestamp = Date.now();\n}\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\ngetWebsocketsEnabled(config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n initSender(logs, config);\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n/**\n * Checks to see if the specified backend URL supporsts Websockets\n * and updates the config accordingly\n */\nfunction getWebsocketsEnabled(config: Configuration) {\n wsock = new WebSocket(config.url.replace(\"http://\", \"ws://\"));\n wsock.onerror = () => {\n console.log(\"no websockets detected\");\n };\n wsock.onopen = () => {\n console.log(\"connection established with websockets\");\n config.websocketsEnabled = true;\n };\n wsock.onclose = () => {\n sendOnClose(logs, config);\n };\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAI,YAA2B;AAC/B,IAAI,gBAA+B;AAO5B,SAAS,qBAAsC;AACpD,MAAI,cAAc,MAAM;AACtB,gBAAY;AAAA,MACV;AAAA,MACA,aAAa,OAAO,KAAK,IAAI,CAAC;AAAA,IAChC;AAAA,EACF;AAEA,MAAI,kBAAkB,MAAM;AAC1B,oBAAgB;AAAA,MACd;AAAA,MACA,sBAAsB;AAAA,IACxB;AAAA,EACF;AAEA,QAAM,SACJ,SAAS,iBACR,WAAY;AACX,UAAM,UAAU,SAAS,qBAAqB,QAAQ;AACtD,WAAO,QAAQ,QAAQ,SAAS;AAAA,EAClC,EAAG;AAEL,QAAM,MAAM,SACR,OAAO,aAAa,KAAK,MAAM,IAC/B,WAAY;AACV,WAAO;AAAA,EACT;AACJ,QAAM,UAAU,IAAI,cAAc;AAClC,QAAM,WAA4B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AI,UAAUA,QAAO,IAAI,QAAQ,WAAW,OAAO,CAAC;AAC5D,QAAM,UAAU,MAAM;AACpB,YAAQ,IAAI,wBAAwB;AAAA,EACtC;AACA,QAAM,SAAS,MAAM;AACnB,YAAQ,IAAI,wCAAwC;AACpD,IAAAA,QAAO,oBAAoB;AAAA,EAC7B;AACA,QAAM,UAAU,MAAM;AACpB,gBAAYC,OAAMD,OAAM;AAAA,EAC1B;AACF;AAGO,IAAME,WAAU;AAMhB,SAAS,QAAc;AAC5B,MAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;","names":["BrowserInfo","version","NodeInfo","version","SearchBotDeviceInfo","version","BotInfo","ReactNativeInfo","version","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/src/main.ts b/products/userale/packages/flagon-userale/src/main.ts index 51865ea..0eaebb1 100644 --- a/products/userale/packages/flagon-userale/src/main.ts +++ b/products/userale/packages/flagon-userale/src/main.ts @@ -19,7 +19,7 @@ import { version as userAleVersion } from "../package.json"; import { Configuration } from "@/configure"; import { attachHandlers } from "@/attachHandlers"; import { initPackager, packageCustomLog } from "@/packageLogs"; -import { initSender } from "@/sendLogs"; //, sendOnClose +import { initSender, sendOnClose } from "@/sendLogs"; import type { Settings, Logging } from "@/types"; @@ -53,7 +53,7 @@ config.update({ useraleVersion: userAleVersion, }); initPackager(logs, config); -// getWebsocketsEnabled(config); +getWebsocketsEnabled(config); if (config.autostart) { setup(config); } @@ -99,19 +99,19 @@ function setup(config: Configuration) { * Checks to see if the specified backend URL supporsts Websockets * and updates the config accordingly */ -// function getWebsocketsEnabled(config: Configuration) { -// wsock = new WebSocket(config.url.replace("http://", "ws://")); -// wsock.onerror = () => { -// console.log("no websockets detected"); -// }; -// wsock.onopen = () => { -// console.log("connection established with websockets"); -// config.websocketsEnabled = true; -// }; -// wsock.onclose = () => { -// sendOnClose(logs, config); -// }; -// } +function getWebsocketsEnabled(config: Configuration) { + wsock = new WebSocket(config.url.replace("http://", "ws://")); + wsock.onerror = () => { + console.log("no websockets detected"); + }; + wsock.onopen = () => { + console.log("connection established with websockets"); + config.websocketsEnabled = true; + }; + wsock.onclose = () => { + sendOnClose(logs, config); + }; +} // Export the Userale API export const version = userAleVersion; From a97b903904d0c5ffad1bc95e9af555ad23a31a3e Mon Sep 17 00:00:00 2001 From: Jason Young Date: Thu, 22 May 2025 14:47:10 -0700 Subject: [PATCH 06/20] ignore pnpm lock --- .gitignore | 3 +- products/userale/pnpm-lock.yaml | 12314 ------------------------------ 2 files changed, 2 insertions(+), 12315 deletions(-) delete mode 100644 products/userale/pnpm-lock.yaml diff --git a/.gitignore b/.gitignore index d96d5dc..fe08657 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ node_modules/ npm-debug.log *.DS_store ./site/_site -.jekyll-cache \ No newline at end of file +.jekyll-cache +pnpm-lock.yaml \ No newline at end of file diff --git a/products/userale/pnpm-lock.yaml b/products/userale/pnpm-lock.yaml deleted file mode 100644 index 57bb975..0000000 --- a/products/userale/pnpm-lock.yaml +++ /dev/null @@ -1,12314 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - pnpm: - specifier: ^10.0.0 - version: 10.10.0 - - packages/flagon-userale: - dependencies: - '@jest/globals': - specifier: ^29.7.0 - version: 29.7.0 - devDependencies: - '@eslint/js': - specifier: ^9.2.0 - version: 9.25.1 - '@playwright/test': - specifier: ^1.51.0 - version: 1.52.0 - '@types/jest': - specifier: ^29.5.12 - version: 29.5.14 - '@types/jsdom': - specifier: ^21.1.6 - version: 21.1.7 - '@types/node': - specifier: ^20.14.2 - version: 20.17.31 - '@types/ws': - specifier: ^8.5.12 - version: 8.18.1 - '@typescript-eslint/eslint-plugin': - specifier: ^7.8.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/parser': - specifier: ^7.8.0 - version: 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript/lib-dom': - specifier: npm:@types/web@^0.0.144 - version: '@types/web@0.0.144' - body-parser: - specifier: ^1.20.2 - version: 1.20.3 - commander: - specifier: ^12.1.0 - version: 12.1.0 - cypress: - specifier: ^13.6.0 - version: 13.17.0 - cz-conventional-changelog: - specifier: ^3.3.0 - version: 3.3.0(@types/node@20.17.31)(typescript@5.8.3) - detect-browser: - specifier: ^5.3.0 - version: 5.3.0 - dom-storage: - specifier: ^2.1.0 - version: 2.1.0 - esbuild: - specifier: ^0.21.2 - version: 0.21.5 - eslint: - specifier: ^8.57.0 - version: 8.57.1 - express: - specifier: ^4.18.2 - version: 4.21.2 - global-jsdom: - specifier: ^24.0.0 - version: 24.0.0(jsdom@24.1.3) - globals: - specifier: ^15.2.0 - version: 15.15.0 - husky: - specifier: ^9.0.11 - version: 9.1.7 - jest: - specifier: ^29.7.0 - version: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) - jest-environment-jsdom: - specifier: ^29.7.0 - version: 29.7.0 - jsdom: - specifier: ^24.0.0 - version: 24.1.3 - jsonschema: - specifier: ^1.4.1 - version: 1.5.0 - nodemon: - specifier: ^3.0.2 - version: 3.1.10 - prettier: - specifier: ^3.2.5 - version: 3.5.3 - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3) - tsup: - specifier: ^5.10.0 - version: 5.12.9(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3))(typescript@5.8.3) - typescript: - specifier: ^5.4.5 - version: 5.8.3 - typescript-eslint: - specifier: ^7.8.0 - version: 7.18.0(eslint@8.57.1)(typescript@5.8.3) - ws: - specifier: ^8.18.0 - version: 8.18.1 - - packages/flagon-userale-ext: - dependencies: - '@plasmohq/messaging': - specifier: ^0.7.1 - version: 0.7.1(react@18.2.0) - '@types/webextension-polyfill': - specifier: ^0.12.3 - version: 0.12.3 - flagon-userale: - specifier: file:../flagon-userale/ - version: link:../flagon-userale - pkce-challenge: - specifier: ^5.0.0 - version: 5.0.0 - plasmo: - specifier: 0.90.3 - version: 0.90.3(@swc/core@1.11.22(@swc/helpers@0.5.17))(@swc/helpers@0.5.17)(@types/node@20.11.5)(lodash@4.17.21)(postcss@8.5.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3)) - react: - specifier: 18.2.0 - version: 18.2.0 - react-dom: - specifier: 18.2.0 - version: 18.2.0(react@18.2.0) - webextension-polyfill: - specifier: ^0.12.0 - version: 0.12.0 - devDependencies: - '@ianvs/prettier-plugin-sort-imports': - specifier: 4.1.1 - version: 4.1.1(@vue/compiler-sfc@3.3.4)(prettier@3.2.4) - '@types/chrome': - specifier: 0.0.258 - version: 0.0.258 - '@types/node': - specifier: 20.11.5 - version: 20.11.5 - '@types/react': - specifier: 18.2.48 - version: 18.2.48 - '@types/react-dom': - specifier: 18.2.18 - version: 18.2.18 - autoprefixer: - specifier: ^10.4.21 - version: 10.4.21(postcss@8.5.3) - postcss: - specifier: ^8.5.3 - version: 8.5.3 - prettier: - specifier: 3.2.4 - version: 3.2.4 - tailwindcss: - specifier: '3' - version: 3.4.17(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3)) - typescript: - specifier: 5.3.3 - version: 5.3.3 - -packages: - - '@alloc/quick-lru@5.2.0': - resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} - engines: {node: '>=10'} - - '@ampproject/remapping@2.3.0': - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} - engines: {node: '>=6.0.0'} - - '@asamuzakjp/css-color@3.1.5': - resolution: {integrity: sha512-w7AmVyTTiU41fNLsFDf+gA2Dwtbx2EJtn2pbJNAGSRAg50loXy1uLXA3hEpD8+eydcomTurw09tq5/AyceCaGg==} - - '@babel/code-frame@7.26.2': - resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} - engines: {node: '>=6.9.0'} - - '@babel/compat-data@7.26.8': - resolution: {integrity: sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==} - engines: {node: '>=6.9.0'} - - '@babel/core@7.26.10': - resolution: {integrity: sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==} - engines: {node: '>=6.9.0'} - - '@babel/generator@7.27.0': - resolution: {integrity: sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==} - engines: {node: '>=6.9.0'} - - '@babel/helper-compilation-targets@7.27.0': - resolution: {integrity: sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-module-imports@7.25.9': - resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} - engines: {node: '>=6.9.0'} - - '@babel/helper-module-transforms@7.26.0': - resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/helper-plugin-utils@7.26.5': - resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} - engines: {node: '>=6.9.0'} - - '@babel/helper-string-parser@7.25.9': - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-option@7.25.9': - resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} - engines: {node: '>=6.9.0'} - - '@babel/helpers@7.27.0': - resolution: {integrity: sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==} - engines: {node: '>=6.9.0'} - - '@babel/parser@7.27.0': - resolution: {integrity: sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/plugin-syntax-async-generators@7.8.4': - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-bigint@7.8.3': - resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-class-properties@7.12.13': - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-class-static-block@7.14.5': - resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-import-attributes@7.26.0': - resolution: {integrity: sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-import-meta@7.10.4': - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-json-strings@7.8.3': - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-jsx@7.25.9': - resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-logical-assignment-operators@7.10.4': - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-numeric-separator@7.10.4': - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-object-rest-spread@7.8.3': - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-optional-catch-binding@7.8.3': - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-optional-chaining@7.8.3': - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-private-property-in-object@7.14.5': - resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-top-level-await@7.14.5': - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-typescript@7.25.9': - resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/runtime@7.27.0': - resolution: {integrity: sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==} - engines: {node: '>=6.9.0'} - - '@babel/template@7.27.0': - resolution: {integrity: sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==} - engines: {node: '>=6.9.0'} - - '@babel/traverse@7.27.0': - resolution: {integrity: sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==} - engines: {node: '>=6.9.0'} - - '@babel/types@7.27.0': - resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==} - engines: {node: '>=6.9.0'} - - '@bcoe/v8-coverage@0.2.3': - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - - '@colors/colors@1.5.0': - resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} - engines: {node: '>=0.1.90'} - - '@commitlint/config-validator@19.8.0': - resolution: {integrity: sha512-+r5ZvD/0hQC3w5VOHJhGcCooiAVdynFlCe2d6I9dU+PvXdV3O+fU4vipVg+6hyLbQUuCH82mz3HnT/cBQTYYuA==} - engines: {node: '>=v18'} - - '@commitlint/execute-rule@19.8.0': - resolution: {integrity: sha512-fuLeI+EZ9x2v/+TXKAjplBJWI9CNrHnyi5nvUQGQt4WRkww/d95oVRsc9ajpt4xFrFmqMZkd/xBQHZDvALIY7A==} - engines: {node: '>=v18'} - - '@commitlint/load@19.8.0': - resolution: {integrity: sha512-4rvmm3ff81Sfb+mcWT5WKlyOa+Hd33WSbirTVUer0wjS1Hv/Hzr07Uv1ULIV9DkimZKNyOwXn593c+h8lsDQPQ==} - engines: {node: '>=v18'} - - '@commitlint/resolve-extends@19.8.0': - resolution: {integrity: sha512-CLanRQwuG2LPfFVvrkTrBR/L/DMy3+ETsgBqW1OvRxmzp/bbVJW0Xw23LnnExgYcsaFtos967lul1CsbsnJlzQ==} - engines: {node: '>=v18'} - - '@commitlint/types@19.8.0': - resolution: {integrity: sha512-LRjP623jPyf3Poyfb0ohMj8I3ORyBDOwXAgxxVPbSD0unJuW2mJWeiRfaQinjtccMqC5Wy1HOMfa4btKjbNxbg==} - engines: {node: '>=v18'} - - '@cspotcode/source-map-support@0.8.1': - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - - '@csstools/color-helpers@5.0.2': - resolution: {integrity: sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==} - engines: {node: '>=18'} - - '@csstools/css-calc@2.1.3': - resolution: {integrity: sha512-XBG3talrhid44BY1x3MHzUx/aTG8+x/Zi57M4aTKK9RFB4aLlF3TTSzfzn8nWVHWL3FgAXAxmupmDd6VWww+pw==} - engines: {node: '>=18'} - peerDependencies: - '@csstools/css-parser-algorithms': ^3.0.4 - '@csstools/css-tokenizer': ^3.0.3 - - '@csstools/css-color-parser@3.0.9': - resolution: {integrity: sha512-wILs5Zk7BU86UArYBJTPy/FMPPKVKHMj1ycCEyf3VUptol0JNRLFU/BZsJ4aiIHJEbSLiizzRrw8Pc1uAEDrXw==} - engines: {node: '>=18'} - peerDependencies: - '@csstools/css-parser-algorithms': ^3.0.4 - '@csstools/css-tokenizer': ^3.0.3 - - '@csstools/css-parser-algorithms@3.0.4': - resolution: {integrity: sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==} - engines: {node: '>=18'} - peerDependencies: - '@csstools/css-tokenizer': ^3.0.3 - - '@csstools/css-tokenizer@3.0.3': - resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} - engines: {node: '>=18'} - - '@cypress/request@3.0.8': - resolution: {integrity: sha512-h0NFgh1mJmm1nr4jCwkGHwKneVYKghUyWe6TMNrk0B9zsjAJxpg8C4/+BAcmLgCPa1vj1V8rNUaILl+zYRUWBQ==} - engines: {node: '>= 6'} - - '@cypress/xvfb@1.2.4': - resolution: {integrity: sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==} - - '@emnapi/runtime@1.4.3': - resolution: {integrity: sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==} - - '@esbuild/aix-ppc64@0.21.5': - resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - - '@esbuild/android-arm64@0.18.20': - resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm64@0.21.5': - resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm@0.18.20': - resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - - '@esbuild/android-arm@0.21.5': - resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - - '@esbuild/android-x64@0.18.20': - resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - - '@esbuild/android-x64@0.21.5': - resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - - '@esbuild/darwin-arm64@0.18.20': - resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-arm64@0.21.5': - resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-x64@0.18.20': - resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - - '@esbuild/darwin-x64@0.21.5': - resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - - '@esbuild/freebsd-arm64@0.18.20': - resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-arm64@0.21.5': - resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.18.20': - resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.21.5': - resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - - '@esbuild/linux-arm64@0.18.20': - resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm64@0.21.5': - resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm@0.18.20': - resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-arm@0.21.5': - resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-ia32@0.18.20': - resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-ia32@0.21.5': - resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-loong64@0.14.54': - resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-loong64@0.18.20': - resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-loong64@0.21.5': - resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-mips64el@0.18.20': - resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-mips64el@0.21.5': - resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-ppc64@0.18.20': - resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-ppc64@0.21.5': - resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-riscv64@0.18.20': - resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-riscv64@0.21.5': - resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-s390x@0.18.20': - resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-s390x@0.21.5': - resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-x64@0.18.20': - resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - - '@esbuild/linux-x64@0.21.5': - resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - - '@esbuild/netbsd-x64@0.18.20': - resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - - '@esbuild/netbsd-x64@0.21.5': - resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - - '@esbuild/openbsd-x64@0.18.20': - resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.21.5': - resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - - '@esbuild/sunos-x64@0.18.20': - resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - - '@esbuild/sunos-x64@0.21.5': - resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - - '@esbuild/win32-arm64@0.18.20': - resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-arm64@0.21.5': - resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-ia32@0.18.20': - resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-ia32@0.21.5': - resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-x64@0.18.20': - resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - - '@esbuild/win32-x64@0.21.5': - resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - - '@eslint-community/eslint-utils@4.6.1': - resolution: {integrity: sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.12.1': - resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@eslint/js@9.25.1': - resolution: {integrity: sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@expo/spawn-async@1.7.2': - resolution: {integrity: sha512-QdWi16+CHB9JYP7gma19OVVg0BFkvU8zNj9GjWorYI8Iv8FUxjOCcYRuAmX4s/h91e4e7BPsskc8cSrZYho9Ew==} - engines: {node: '>=12'} - - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead - - '@ianvs/prettier-plugin-sort-imports@4.1.1': - resolution: {integrity: sha512-kJhXq63ngpTQ2dxgf5GasbPJWsJA3LgoOdd7WGhpUSzLgLgI4IsIzYkbJf9kmpOHe7Vdm/o3PcRA3jmizXUuAQ==} - peerDependencies: - '@vue/compiler-sfc': '>=3.0.0' - prettier: 2 || 3 - peerDependenciesMeta: - '@vue/compiler-sfc': - optional: true - - '@img/sharp-darwin-arm64@0.33.5': - resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [darwin] - - '@img/sharp-darwin-x64@0.33.5': - resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [darwin] - - '@img/sharp-libvips-darwin-arm64@1.0.4': - resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} - cpu: [arm64] - os: [darwin] - - '@img/sharp-libvips-darwin-x64@1.0.4': - resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} - cpu: [x64] - os: [darwin] - - '@img/sharp-libvips-linux-arm64@1.0.4': - resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} - cpu: [arm64] - os: [linux] - - '@img/sharp-libvips-linux-arm@1.0.5': - resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} - cpu: [arm] - os: [linux] - - '@img/sharp-libvips-linux-s390x@1.0.4': - resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} - cpu: [s390x] - os: [linux] - - '@img/sharp-libvips-linux-x64@1.0.4': - resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} - cpu: [x64] - os: [linux] - - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': - resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} - cpu: [arm64] - os: [linux] - - '@img/sharp-libvips-linuxmusl-x64@1.0.4': - resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} - cpu: [x64] - os: [linux] - - '@img/sharp-linux-arm64@0.33.5': - resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - - '@img/sharp-linux-arm@0.33.5': - resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm] - os: [linux] - - '@img/sharp-linux-s390x@0.33.5': - resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [s390x] - os: [linux] - - '@img/sharp-linux-x64@0.33.5': - resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - - '@img/sharp-linuxmusl-arm64@0.33.5': - resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - - '@img/sharp-linuxmusl-x64@0.33.5': - resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - - '@img/sharp-wasm32@0.33.5': - resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [wasm32] - - '@img/sharp-win32-ia32@0.33.5': - resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [ia32] - os: [win32] - - '@img/sharp-win32-x64@0.33.5': - resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [win32] - - '@inquirer/checkbox@4.1.5': - resolution: {integrity: sha512-swPczVU+at65xa5uPfNP9u3qx/alNwiaykiI/ExpsmMSQW55trmZcwhYWzw/7fj+n6Q8z1eENvR7vFfq9oPSAQ==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/confirm@5.1.9': - resolution: {integrity: sha512-NgQCnHqFTjF7Ys2fsqK2WtnA8X1kHyInyG+nMIuHowVTIgIuS10T4AznI/PvbqSpJqjCUqNBlKGh1v3bwLFL4w==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/core@10.1.10': - resolution: {integrity: sha512-roDaKeY1PYY0aCqhRmXihrHjoSW2A00pV3Ke5fTpMCkzcGF64R8e0lw3dK+eLEHwS4vB5RnW1wuQmvzoRul8Mw==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/editor@4.2.10': - resolution: {integrity: sha512-5GVWJ+qeI6BzR6TIInLP9SXhWCEcvgFQYmcRG6d6RIlhFjM5TyG18paTGBgRYyEouvCmzeco47x9zX9tQEofkw==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/expand@4.0.12': - resolution: {integrity: sha512-jV8QoZE1fC0vPe6TnsOfig+qwu7Iza1pkXoUJ3SroRagrt2hxiL+RbM432YAihNR7m7XnU0HWl/WQ35RIGmXHw==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/figures@1.0.11': - resolution: {integrity: sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==} - engines: {node: '>=18'} - - '@inquirer/input@4.1.9': - resolution: {integrity: sha512-mshNG24Ij5KqsQtOZMgj5TwEjIf+F2HOESk6bjMwGWgcH5UBe8UoljwzNFHqdMbGYbgAf6v2wU/X9CAdKJzgOA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/number@3.0.12': - resolution: {integrity: sha512-7HRFHxbPCA4e4jMxTQglHJwP+v/kpFsCf2szzfBHy98Wlc3L08HL76UDiA87TOdX5fwj2HMOLWqRWv9Pnn+Z5Q==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/password@4.0.12': - resolution: {integrity: sha512-FlOB0zvuELPEbnBYiPaOdJIaDzb2PmJ7ghi/SVwIHDDSQ2K4opGBkF+5kXOg6ucrtSUQdLhVVY5tycH0j0l+0g==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/prompts@7.5.0': - resolution: {integrity: sha512-tk8Bx7l5AX/CR0sVfGj3Xg6v7cYlFBkEahH+EgBB+cZib6Fc83dwerTbzj7f2+qKckjIUGsviWRI1d7lx6nqQA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/rawlist@4.1.0': - resolution: {integrity: sha512-6ob45Oh9pXmfprKqUiEeMz/tjtVTFQTgDDz1xAMKMrIvyrYjAmRbQZjMJfsictlL4phgjLhdLu27IkHNnNjB7g==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/search@3.0.12': - resolution: {integrity: sha512-H/kDJA3kNlnNIjB8YsaXoQI0Qccgf0Na14K1h8ExWhNmUg2E941dyFPrZeugihEa9AZNW5NdsD/NcvUME83OPQ==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/select@4.2.0': - resolution: {integrity: sha512-KkXQ4aSySWimpV4V/TUJWdB3tdfENZUU765GjOIZ0uPwdbGIG6jrxD4dDf1w68uP+DVtfNhr1A92B+0mbTZ8FA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/type@3.0.6': - resolution: {integrity: sha512-/mKVCtVpyBu3IDarv0G+59KC4stsD5mDsGpYh+GKs1NZT88Jh52+cuoA1AtLk2Q0r/quNl+1cSUyLRHBFeD0XA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - - '@istanbuljs/load-nyc-config@1.1.0': - resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} - engines: {node: '>=8'} - - '@istanbuljs/schema@0.1.3': - resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} - engines: {node: '>=8'} - - '@jest/console@29.7.0': - resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/core@29.7.0': - resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - - '@jest/environment@29.7.0': - resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/expect-utils@29.7.0': - resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/expect@29.7.0': - resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/fake-timers@29.7.0': - resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/globals@29.7.0': - resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/reporters@29.7.0': - resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - - '@jest/schemas@29.6.3': - resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/source-map@29.6.3': - resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/test-result@29.7.0': - resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/test-sequencer@29.7.0': - resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/transform@29.7.0': - resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jest/types@29.6.3': - resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jridgewell/gen-mapping@0.3.8': - resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} - engines: {node: '>=6.0.0'} - - '@jridgewell/resolve-uri@3.1.2': - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - - '@jridgewell/set-array@1.2.1': - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} - - '@jridgewell/sourcemap-codec@1.5.0': - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - - '@jridgewell/trace-mapping@0.3.25': - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - - '@jridgewell/trace-mapping@0.3.9': - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - - '@lezer/common@0.15.12': - resolution: {integrity: sha512-edfwCxNLnzq5pBA/yaIhwJ3U3Kz8VAUOTRg0hhxaizaI1N+qxV7EXDv/kLCkLeq2RzSFvxexlaj5Mzfn2kY0Ig==} - - '@lezer/common@1.2.3': - resolution: {integrity: sha512-w7ojc8ejBqr2REPsWxJjrMFsA/ysDCFICn8zEOR9mrqzOu2amhITYuLD8ag6XZf0CFXDrhKqw7+tW8cX66NaDA==} - - '@lezer/lr@0.15.8': - resolution: {integrity: sha512-bM6oE6VQZ6hIFxDNKk8bKPa14hqFrV07J/vHGOeiAbJReIaQXmkVb6xQu4MR+JBTLa5arGRyAAjJe1qaQt3Uvg==} - - '@lezer/lr@1.4.2': - resolution: {integrity: sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==} - - '@lmdb/lmdb-darwin-arm64@2.5.2': - resolution: {integrity: sha512-+F8ioQIUN68B4UFiIBYu0QQvgb9FmlKw2ctQMSBfW2QBrZIxz9vD9jCGqTCPqZBRbPHAS/vG1zSXnKqnS2ch/A==} - cpu: [arm64] - os: [darwin] - - '@lmdb/lmdb-darwin-arm64@2.7.11': - resolution: {integrity: sha512-r6+vYq2vKzE+vgj/rNVRMwAevq0+ZR9IeMFIqcSga+wMtMdXQ27KqQ7uS99/yXASg29bos7yHP3yk4x6Iio0lw==} - cpu: [arm64] - os: [darwin] - - '@lmdb/lmdb-darwin-x64@2.5.2': - resolution: {integrity: sha512-KvPH56KRLLx4KSfKBx0m1r7GGGUMXm0jrKmNE7plbHlesZMuPJICtn07HYgQhj1LNsK7Yqwuvnqh1QxhJnF1EA==} - cpu: [x64] - os: [darwin] - - '@lmdb/lmdb-darwin-x64@2.7.11': - resolution: {integrity: sha512-jhj1aB4K8ycRL1HOQT5OtzlqOq70jxUQEWRN9Gqh3TIDN30dxXtiHi6EWF516tzw6v2+3QqhDMJh8O6DtTGG8Q==} - cpu: [x64] - os: [darwin] - - '@lmdb/lmdb-linux-arm64@2.5.2': - resolution: {integrity: sha512-aLl89VHL/wjhievEOlPocoefUyWdvzVrcQ/MHQYZm2JfV1jUsrbr/ZfkPPUFvZBf+VSE+Q0clWs9l29PCX1hTQ==} - cpu: [arm64] - os: [linux] - - '@lmdb/lmdb-linux-arm64@2.7.11': - resolution: {integrity: sha512-7xGEfPPbmVJWcY2Nzqo11B9Nfxs+BAsiiaY/OcT4aaTDdykKeCjvKMQJA3KXCtZ1AtiC9ljyGLi+BfUwdulY5A==} - cpu: [arm64] - os: [linux] - - '@lmdb/lmdb-linux-arm@2.5.2': - resolution: {integrity: sha512-5kQAP21hAkfW5Bl+e0P57dV4dGYnkNIpR7f/GAh6QHlgXx+vp/teVj4PGRZaKAvt0GX6++N6hF8NnGElLDuIDw==} - cpu: [arm] - os: [linux] - - '@lmdb/lmdb-linux-arm@2.7.11': - resolution: {integrity: sha512-dHfLFVSrw/v5X5lkwp0Vl7+NFpEeEYKfMG2DpdFJnnG1RgHQZngZxCaBagFoaJGykRpd2DYF1AeuXBFrAUAXfw==} - cpu: [arm] - os: [linux] - - '@lmdb/lmdb-linux-x64@2.5.2': - resolution: {integrity: sha512-xUdUfwDJLGjOUPH3BuPBt0NlIrR7f/QHKgu3GZIXswMMIihAekj2i97oI0iWG5Bok/b+OBjHPfa8IU9velnP/Q==} - cpu: [x64] - os: [linux] - - '@lmdb/lmdb-linux-x64@2.7.11': - resolution: {integrity: sha512-vUKI3JrREMQsXX8q0Eq5zX2FlYCKWMmLiCyyJNfZK0Uyf14RBg9VtB3ObQ41b4swYh2EWaltasWVe93Y8+KDng==} - cpu: [x64] - os: [linux] - - '@lmdb/lmdb-win32-x64@2.5.2': - resolution: {integrity: sha512-zrBczSbXKxEyK2ijtbRdICDygRqWSRPpZMN5dD1T8VMEW5RIhIbwFWw2phDRXuBQdVDpSjalCIUMWMV2h3JaZA==} - cpu: [x64] - os: [win32] - - '@lmdb/lmdb-win32-x64@2.7.11': - resolution: {integrity: sha512-BJwkHlSUgtB+Ei52Ai32M1AOMerSlzyIGA/KC4dAGL+GGwVMdwG8HGCOA2TxP3KjhbgDPMYkv7bt/NmOmRIFng==} - cpu: [x64] - os: [win32] - - '@mischnic/json-sourcemap@0.1.0': - resolution: {integrity: sha512-dQb3QnfNqmQNYA4nFSN/uLaByIic58gOXq4Y4XqLOWmOrw73KmJPt/HLyG0wvn1bnR6mBKs/Uwvkh+Hns1T0XA==} - engines: {node: '>=12.0.0'} - - '@mischnic/json-sourcemap@0.1.1': - resolution: {integrity: sha512-iA7+tyVqfrATAIsIRWQG+a7ZLLD0VaOCKV2Wd/v4mqIU3J9c4jx9p7S0nw1XH3gJCKNBOOwACOPYYSUu9pgT+w==} - engines: {node: '>=12.0.0'} - - '@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3': - resolution: {integrity: sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==} - cpu: [arm64] - os: [darwin] - - '@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3': - resolution: {integrity: sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==} - cpu: [x64] - os: [darwin] - - '@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3': - resolution: {integrity: sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==} - cpu: [arm64] - os: [linux] - - '@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3': - resolution: {integrity: sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==} - cpu: [arm] - os: [linux] - - '@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3': - resolution: {integrity: sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==} - cpu: [x64] - os: [linux] - - '@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3': - resolution: {integrity: sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==} - cpu: [x64] - os: [win32] - - '@nodelib/fs.scandir@2.1.5': - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - - '@nodelib/fs.stat@2.0.5': - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - - '@nodelib/fs.walk@1.2.8': - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - - '@parcel/bundler-default@2.9.3': - resolution: {integrity: sha512-JjJK8dq39/UO/MWI/4SCbB1t/qgpQRFnFDetAAAezQ8oN++b24u1fkMDa/xqQGjbuPmGeTds5zxGgYs7id7PYg==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/cache@2.8.3': - resolution: {integrity: sha512-k7xv5vSQrJLdXuglo+Hv3yF4BCSs1tQ/8Vbd6CHTkOhf7LcGg6CPtLw053R/KdMpd/4GPn0QrAsOLdATm1ELtQ==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@parcel/core': ^2.8.3 - - '@parcel/cache@2.9.3': - resolution: {integrity: sha512-Bj/H2uAJJSXtysG7E/x4EgTrE2hXmm7td/bc97K8M9N7+vQjxf7xb0ebgqe84ePVMkj4MVQSMEJkEucXVx4b0Q==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@parcel/core': ^2.9.3 - - '@parcel/codeframe@2.8.3': - resolution: {integrity: sha512-FE7sY53D6n/+2Pgg6M9iuEC6F5fvmyBkRE4d9VdnOoxhTXtkEqpqYgX7RJ12FAQwNlxKq4suBJQMgQHMF2Kjeg==} - engines: {node: '>= 12.0.0'} - - '@parcel/codeframe@2.9.3': - resolution: {integrity: sha512-z7yTyD6h3dvduaFoHpNqur74/2yDWL++33rjQjIjCaXREBN6dKHoMGMizzo/i4vbiI1p9dDox2FIDEHCMQxqdA==} - engines: {node: '>= 12.0.0'} - - '@parcel/compressor-raw@2.9.3': - resolution: {integrity: sha512-jz3t4/ICMsHEqgiTmv5i1DJva2k5QRpZlBELVxfY+QElJTVe8edKJ0TiKcBxh2hx7sm4aUigGmp7JiqqHRRYmA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/config-default@2.9.3': - resolution: {integrity: sha512-tqN5tF7QnVABDZAu76co5E6N8mA9n8bxiWdK4xYyINYFIEHgX172oRTqXTnhEMjlMrdmASxvnGlbaPBaVnrCTw==} - peerDependencies: - '@parcel/core': ^2.9.3 - - '@parcel/core@2.9.3': - resolution: {integrity: sha512-4KlM1Zr/jpsqWuMXr2zmGsaOUs1zMMFh9vfCNKRZkptf+uk8I3sugHbNdo+F5B+4e2yMuOEb1zgAmvJLeuH6ww==} - engines: {node: '>= 12.0.0'} - - '@parcel/diagnostic@2.8.3': - resolution: {integrity: sha512-u7wSzuMhLGWZjVNYJZq/SOViS3uFG0xwIcqXw12w54Uozd6BH8JlhVtVyAsq9kqnn7YFkw6pXHqAo5Tzh4FqsQ==} - engines: {node: '>= 12.0.0'} - - '@parcel/diagnostic@2.9.3': - resolution: {integrity: sha512-6jxBdyB3D7gP4iE66ghUGntWt2v64E6EbD4AetZk+hNJpgudOOPsKTovcMi/i7I4V0qD7WXSF4tvkZUoac0jwA==} - engines: {node: '>= 12.0.0'} - - '@parcel/events@2.8.3': - resolution: {integrity: sha512-hoIS4tAxWp8FJk3628bsgKxEvR7bq2scCVYHSqZ4fTi/s0+VymEATrRCUqf+12e5H47uw1/ZjoqrGtBI02pz4w==} - engines: {node: '>= 12.0.0'} - - '@parcel/events@2.9.3': - resolution: {integrity: sha512-K0Scx+Bx9f9p1vuShMzNwIgiaZUkxEnexaKYHYemJrM7pMAqxIuIqhnvwurRCsZOVLUJPDDNJ626cWTc5vIq+A==} - engines: {node: '>= 12.0.0'} - - '@parcel/fs-search@2.8.3': - resolution: {integrity: sha512-DJBT2N8knfN7Na6PP2mett3spQLTqxFrvl0gv+TJRp61T8Ljc4VuUTb0hqBj+belaASIp3Q+e8+SgaFQu7wLiQ==} - engines: {node: '>= 12.0.0'} - - '@parcel/fs-search@2.9.3': - resolution: {integrity: sha512-nsNz3bsOpwS+jphcd+XjZL3F3PDq9lik0O8HPm5f6LYkqKWT+u/kgQzA8OkAHCR3q96LGiHxUywHPEBc27vI4Q==} - engines: {node: '>= 12.0.0'} - - '@parcel/fs@2.8.3': - resolution: {integrity: sha512-y+i+oXbT7lP0e0pJZi/YSm1vg0LDsbycFuHZIL80pNwdEppUAtibfJZCp606B7HOjMAlNZOBo48e3hPG3d8jgQ==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@parcel/core': ^2.8.3 - - '@parcel/fs@2.9.3': - resolution: {integrity: sha512-/PrRKgCRw22G7rNPSpgN3Q+i2nIkZWuvIOAdMG4KWXC4XLp8C9jarNaWd5QEQ75amjhQSl3oUzABzkdCtkKrgg==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@parcel/core': ^2.9.3 - - '@parcel/graph@2.9.3': - resolution: {integrity: sha512-3LmRJmF8+OprAr6zJT3X2s8WAhLKkrhi6RsFlMWHifGU5ED1PFcJWFbOwJvSjcAhMQJP0fErcFIK1Ludv3Vm3g==} - engines: {node: '>= 12.0.0'} - - '@parcel/hash@2.8.3': - resolution: {integrity: sha512-FVItqzjWmnyP4ZsVgX+G00+6U2IzOvqDtdwQIWisCcVoXJFCqZJDy6oa2qDDFz96xCCCynjRjPdQx2jYBCpfYw==} - engines: {node: '>= 12.0.0'} - - '@parcel/hash@2.9.3': - resolution: {integrity: sha512-qlH5B85XLzVAeijgKPjm1gQu35LoRYX/8igsjnN8vOlbc3O8BYAUIutU58fbHbtE8MJPbxQQUw7tkTjeoujcQQ==} - engines: {node: '>= 12.0.0'} - - '@parcel/logger@2.8.3': - resolution: {integrity: sha512-Kpxd3O/Vs7nYJIzkdmB6Bvp3l/85ydIxaZaPfGSGTYOfaffSOTkhcW9l6WemsxUrlts4za6CaEWcc4DOvaMOPA==} - engines: {node: '>= 12.0.0'} - - '@parcel/logger@2.9.3': - resolution: {integrity: sha512-5FNBszcV6ilGFcijEOvoNVG6IUJGsnMiaEnGQs7Fvc1dktTjEddnoQbIYhcSZL63wEmzBZOgkT5yDMajJ/41jw==} - engines: {node: '>= 12.0.0'} - - '@parcel/markdown-ansi@2.8.3': - resolution: {integrity: sha512-4v+pjyoh9f5zuU/gJlNvNFGEAb6J90sOBwpKJYJhdWXLZMNFCVzSigxrYO+vCsi8G4rl6/B2c0LcwIMjGPHmFQ==} - engines: {node: '>= 12.0.0'} - - '@parcel/markdown-ansi@2.9.3': - resolution: {integrity: sha512-/Q4X8F2aN8UNjAJrQ5NfK2OmZf6shry9DqetUSEndQ0fHonk78WKt6LT0zSKEBEW/bB/bXk6mNMsCup6L8ibjQ==} - engines: {node: '>= 12.0.0'} - - '@parcel/namer-default@2.9.3': - resolution: {integrity: sha512-1ynFEcap48/Ngzwwn318eLYpLUwijuuZoXQPCsEQ21OOIOtfhFQJaPwXTsw6kRitshKq76P2aafE0BioGSqxcA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/node-resolver-core@3.0.3': - resolution: {integrity: sha512-AjxNcZVHHJoNT/A99PKIdFtwvoze8PAiC3yz8E/dRggrDIOboUEodeQYV5Aq++aK76uz/iOP0tST2T8A5rhb1A==} - engines: {node: '>= 12.0.0'} - - '@parcel/optimizer-css@2.9.3': - resolution: {integrity: sha512-RK1QwcSdWDNUsFvuLy0hgnYKtPQebzCb0vPPzqs6LhL+vqUu9utOyRycGaQffHCkHVQP6zGlN+KFssd7YtFGhA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/optimizer-data-url@2.9.3': - resolution: {integrity: sha512-k8lOKLzgZ24JKOuyrNe5PptoH8GJ78AwnumG1xEOKZ77gZnUgdrn3XdjzE28ZqTI4LFkT3jApUiBKBmqnWDe7Q==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/optimizer-htmlnano@2.9.3': - resolution: {integrity: sha512-9g/KBck3c6DokmJfvJ5zpHFBiCSolaGrcsTGx8C3YPdCTVTI9P1TDCwUxvAr4LjpcIRSa82wlLCI+nF6sSgxKA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/optimizer-image@2.9.3': - resolution: {integrity: sha512-530YzthE7kmecnNhPbkAK+26yQNt69pfJrgE0Ev0BZaM1Wu2+33nki7o8qvkTkikhPrurEJLGIXt1qKmbKvCbA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - peerDependencies: - '@parcel/core': ^2.9.3 - - '@parcel/optimizer-svgo@2.9.3': - resolution: {integrity: sha512-ytQS0wY5JJhWU4mL0wfhYDUuHcfuw+Gy2+JcnTm1t1AZXHlOTbU6EzRWNqBShsgXjvdrQQXizAe3B6GFFlFJVQ==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/optimizer-swc@2.9.3': - resolution: {integrity: sha512-GQINNeqtdpL1ombq/Cpwi6IBk02wKJ/JJbYbyfHtk8lxlq13soenpwOlzJ5T9D2fdG+FUhai9NxpN5Ss4lNoAg==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/package-manager@2.8.3': - resolution: {integrity: sha512-tIpY5pD2lH53p9hpi++GsODy6V3khSTX4pLEGuMpeSYbHthnOViobqIlFLsjni+QA1pfc8NNNIQwSNdGjYflVA==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@parcel/core': ^2.8.3 - - '@parcel/package-manager@2.9.3': - resolution: {integrity: sha512-NH6omcNTEupDmW4Lm1e4NUYBjdqkURxgZ4CNESESInHJe6tblVhNB8Rpr1ar7zDar7cly9ILr8P6N3Ei7bTEjg==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@parcel/core': ^2.9.3 - - '@parcel/packager-css@2.9.3': - resolution: {integrity: sha512-mePiWiYZOULY6e1RdAIJyRoYqXqGci0srOaVZYaP7mnrzvJgA63kaZFFsDiEWghunQpMUuUjM2x/vQVHzxmhKQ==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/packager-html@2.9.3': - resolution: {integrity: sha512-0Ex+O0EaZf9APNERRNGgGto02hFJ6f5RQEvRWBK55WAV1rXeU+kpjC0c0qZvnUaUtXfpWMsEBkevJCwDkUMeMg==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/packager-js@2.9.3': - resolution: {integrity: sha512-V5xwkoE3zQ3R+WqAWhA1KGQ791FvJeW6KonOlMI1q76Djjgox68hhObqcLu66AmYNhR2R/wUpkP18hP2z8dSFw==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/packager-raw@2.9.3': - resolution: {integrity: sha512-oPQTNoYanQ2DdJyL61uPYK2py83rKOT8YVh2QWAx0zsSli6Kiy64U3+xOCYWgDVCrHw9+9NpQMuAdSiFg4cq8g==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/packager-svg@2.9.3': - resolution: {integrity: sha512-p/Ya6UO9DAkaCUFxfFGyeHZDp9YPAlpdnh1OChuwqSFOXFjjeXuoK4KLT+ZRalVBo2Jo8xF70oKMZw4MVvaL7Q==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/plugin@2.8.3': - resolution: {integrity: sha512-jZ6mnsS4D9X9GaNnvrixDQwlUQJCohDX2hGyM0U0bY2NWU8Km97SjtoCpWjq+XBCx/gpC4g58+fk9VQeZq2vlw==} - engines: {node: '>= 12.0.0'} - - '@parcel/plugin@2.9.3': - resolution: {integrity: sha512-qN85Gqr2GMuxX1dT1mnuO9hOcvlEv1lrYrCxn7CJN2nUhbwcfG+LEvcrCzCOJ6XtIHm+ZBV9h9p7FfoPLvpw+g==} - engines: {node: '>= 12.0.0'} - - '@parcel/profiler@2.9.3': - resolution: {integrity: sha512-pyHc9lw8VZDfgZoeZWZU9J0CVEv1Zw9O5+e0DJPDPHuXJYr72ZAOhbljtU3owWKAeW+++Q2AZWkbUGEOjI/e6g==} - engines: {node: '>= 12.0.0'} - - '@parcel/reporter-bundle-buddy@2.9.3': - resolution: {integrity: sha512-9ftzLZ161USdvnxueT55EWufLI48va0xJfB5MAJLG92VAS1N1FSFgYKdkGFzBKw0eK9UScQNYnntCGC17rBayQ==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/reporter-dev-server@2.9.3': - resolution: {integrity: sha512-s6eboxdLEtRSvG52xi9IiNbcPKC0XMVmvTckieue2EqGDbDcaHQoHmmwkk0rNq0/Z/UxelGcQXoIYC/0xq3ykQ==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/resolver-default@2.9.3': - resolution: {integrity: sha512-8ESJk1COKvDzkmOnppNXoDamNMlYVIvrKc2RuFPmp8nKVj47R6NwMgvwxEaatyPzvkmyTpq5RvG9I3HFc+r4Cw==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/runtime-browser-hmr@2.9.3': - resolution: {integrity: sha512-EgiDIDrVAWpz7bOzWXqVinQkaFjLwT34wsonpXAbuI7f7r00d52vNAQC9AMu+pTijA3gyKoJ+Q4NWPMZf7ACDA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/runtime-js@2.8.3': - resolution: {integrity: sha512-IRja0vNKwvMtPgIqkBQh0QtRn0XcxNC8HU1jrgWGRckzu10qJWO+5ULgtOeR4pv9krffmMPqywGXw6l/gvJKYQ==} - engines: {node: '>= 12.0.0', parcel: ^2.8.3} - - '@parcel/runtime-js@2.9.3': - resolution: {integrity: sha512-EvIy+qXcKnB5qxHhe96zmJpSAViNVXHfQI5RSdZ2a7CPwORwhTI+zPNT9sb7xb/WwFw/WuTTgzT40b41DceU6Q==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/runtime-react-refresh@2.9.3': - resolution: {integrity: sha512-XBgryZQIyCmi6JwEfMUCmINB3l1TpTp9a2iFxmYNpzHlqj4Ve0saKaqWOVRLvC945ZovWIBzcSW2IYqWKGtbAA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/runtime-service-worker@2.9.3': - resolution: {integrity: sha512-qLJLqv1mMdWL7gyh8aKBFFAuEiJkhUUgLKpdn6eSfH/R7kTtb76WnOwqUrhvEI9bZFUM/8Pa1bzJnPpqSOM+Sw==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/source-map@2.1.1': - resolution: {integrity: sha512-Ejx1P/mj+kMjQb8/y5XxDUn4reGdr+WyKYloBljpppUy8gs42T+BNoEOuRYqDVdgPc6NxduzIDoJS9pOFfV5Ew==} - engines: {node: ^12.18.3 || >=14} - - '@parcel/transformer-babel@2.9.3': - resolution: {integrity: sha512-pURtEsnsp3h6tOBDuzh9wRvVtw4PgIlqwAArIWdrG7iwqOUYv9D8ME4+ePWEu7MQWAp58hv9pTJtqWv4T+Sq8A==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-css@2.9.3': - resolution: {integrity: sha512-duWMdbEBBPjg3fQdXF16iWIdThetDZvCs2TpUD7xOlXH6kR0V5BJy8ONFT15u1RCqIV9hSNGaS3v3I9YRNY5zQ==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-graphql@2.9.3': - resolution: {integrity: sha512-cIohsH3WlXgn63baU35ZoWHzttmkyE2Q1pexKjszODzSUq3pdcg+9k4rB/z8GGMzXvFRYuBgl2M2Ukqz7SueMg==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-html@2.9.3': - resolution: {integrity: sha512-0NU4omcHzFXA1seqftAXA2KNZaMByoKaNdXnLgBgtCGDiYvOcL+6xGHgY6pw9LvOh5um10KI5TxSIMILoI7VtA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-image@2.9.3': - resolution: {integrity: sha512-7CEe35RaPadQzLIuxzTtIxnItvOoy46hcbXtOdDt6lmVa4omuOygZYRIya2lsGIP4JHvAaALMb5nt99a1uTwJg==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - peerDependencies: - '@parcel/core': ^2.9.3 - - '@parcel/transformer-inline-string@2.9.3': - resolution: {integrity: sha512-IZNd0Ksl32psX1M41KbUc4BmvVSoLVnlpaMrh9C/l+piFSkDXWMnF0PONX/RcxYMBIwB2jYllheIKH54naeNaA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-js@2.9.3': - resolution: {integrity: sha512-Z2MVVg5FYcPOfxlUwxqb5l9yjTMEqE3KI3zq2MBRUme6AV07KxLmCDF23b6glzZlHWQUE8MXzYCTAkOPCcPz+Q==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - peerDependencies: - '@parcel/core': ^2.9.3 - - '@parcel/transformer-json@2.9.3': - resolution: {integrity: sha512-yNL27dbOLhkkrjaQjiQ7Im9VOxmkfuuSNSmS0rA3gEjVcm07SLKRzWkAaPnyx44Lb6bzyOTWwVrb9aMmxgADpA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-less@2.9.3': - resolution: {integrity: sha512-qwF5NQ8rPZjS79tv9RRPxzkZcwLcI4Xg2gHm9c1PvsgoaL2tVNpfjiRA6MOrzfJp+xr7xEzeMDZksOJ1WQiiQg==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-postcss@2.9.3': - resolution: {integrity: sha512-HoDvPqKzhpmvMmHqQhDnt8F1vH61m6plpGiYaYnYv2Om4HHi5ZIq9bO+9QLBnTKfaZ7ndYSefTKOxTYElg7wyw==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-posthtml@2.9.3': - resolution: {integrity: sha512-2fQGgrzRmaqbWf3y2/T6xhqrNjzqMMKksqJzvc8TMfK6f2kg3Ddjv158eaSW2JdkV39aY7tvAOn5f1uzo74BMA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-raw@2.9.3': - resolution: {integrity: sha512-oqdPzMC9QzWRbY9J6TZEqltknjno+dY24QWqf8ondmdF2+W+/2mRDu59hhCzQrqUHgTq4FewowRZmSfpzHxwaQ==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-react-refresh-wrap@2.9.3': - resolution: {integrity: sha512-cb9NyU6oJlDblFIlzqIE8AkvRQVGl2IwJNKwD4PdE7Y6sq2okGEPG4hOw3k/Y9JVjM4/2pUORqvjSRhWwd9oVQ==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-sass@2.9.3': - resolution: {integrity: sha512-i9abj9bKg3xCHghJyTM3rUVxIEn9n1Rl+DFdpyNAD8VZ52COfOshFDQOWNuhU1hEnJOFYCjnfcO0HRTsg3dWmg==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-svg-react@2.9.3': - resolution: {integrity: sha512-RXmCn58CkCBhpsS1AaRBrSRla0U5JN3r3hb7kQvEb+d7chGnsxCCWsBxtlrxPUjoUFLdQli9rhpCTkiyOBXY2A==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-svg@2.9.3': - resolution: {integrity: sha512-ypmE+dzB09IMCdEAkOsSxq1dEIm2A3h67nAFz4qbfHbwNgXBUuy/jB3ZMwXN/cO0f7SBh/Ap8Jhq6vmGqB5tWw==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/transformer-worklet@2.9.3': - resolution: {integrity: sha512-Fgd81OTOvAxAKoBGsQow/mgxELaNG1FeZW4DuDEPo/hR3lbs90oYuVpG2thdx7hmi/W6xqhrLaEN5Ea1v0LvEA==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - - '@parcel/types@2.8.3': - resolution: {integrity: sha512-FECA1FB7+0UpITKU0D6TgGBpGxYpVSMNEENZbSJxFSajNy3wrko+zwBKQmFOLOiPcEtnGikxNs+jkFWbPlUAtw==} - - '@parcel/types@2.9.3': - resolution: {integrity: sha512-NSNY8sYtRhvF1SqhnIGgGvJocyWt1K8Tnw5cVepm0g38ywtX6mwkBvMkmeehXkII4mSUn+frD9wGsydTunezvA==} - - '@parcel/utils@2.8.3': - resolution: {integrity: sha512-IhVrmNiJ+LOKHcCivG5dnuLGjhPYxQ/IzbnF2DKNQXWBTsYlHkJZpmz7THoeLtLliGmSOZ3ZCsbR8/tJJKmxjA==} - engines: {node: '>= 12.0.0'} - - '@parcel/utils@2.9.3': - resolution: {integrity: sha512-cesanjtj/oLehW8Waq9JFPmAImhoiHX03ihc3JTWkrvJYSbD7wYKCDgPAM3JiRAqvh1LZ6P699uITrYWNoRLUg==} - engines: {node: '>= 12.0.0'} - - '@parcel/watcher-android-arm64@2.2.0': - resolution: {integrity: sha512-nU2wh00CTQT9rr1TIKTjdQ9lAGYpmz6XuKw0nAwAN+S2A5YiD55BK1u+E5WMCT8YOIDe/n6gaj4o/Bi9294SSQ==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [android] - - '@parcel/watcher-android-arm64@2.5.1': - resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [android] - - '@parcel/watcher-darwin-arm64@2.2.0': - resolution: {integrity: sha512-cJl0UZDcodciy3TDMomoK/Huxpjlkkim3SyMgWzjovHGOZKNce9guLz2dzuFwfObBFCjfznbFMIvAZ5syXotYw==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [darwin] - - '@parcel/watcher-darwin-arm64@2.5.1': - resolution: {integrity: sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [darwin] - - '@parcel/watcher-darwin-x64@2.2.0': - resolution: {integrity: sha512-QI77zxaGrCV1StKcoRYfsUfmUmvPMPfQrubkBBy5XujV2fwaLgZivQOTQMBgp5K2+E19u1ufpspKXAPqSzpbyg==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [darwin] - - '@parcel/watcher-darwin-x64@2.5.1': - resolution: {integrity: sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [darwin] - - '@parcel/watcher-freebsd-x64@2.5.1': - resolution: {integrity: sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [freebsd] - - '@parcel/watcher-linux-arm-glibc@2.2.0': - resolution: {integrity: sha512-I2GPBcAXazPzabCmfsa3HRRW+MGlqxYd8g8RIueJU+a4o5nyNZDz0CR1cu0INT0QSQXEZV7w6UE8Hz9CF8u3Pg==} - engines: {node: '>= 10.0.0'} - cpu: [arm] - os: [linux] - - '@parcel/watcher-linux-arm-glibc@2.5.1': - resolution: {integrity: sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==} - engines: {node: '>= 10.0.0'} - cpu: [arm] - os: [linux] - - '@parcel/watcher-linux-arm-musl@2.5.1': - resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==} - engines: {node: '>= 10.0.0'} - cpu: [arm] - os: [linux] - - '@parcel/watcher-linux-arm64-glibc@2.2.0': - resolution: {integrity: sha512-St5mlfp+2lS9AmgixUqfwJa/DwVmTCJxC1HcOubUTz6YFOKIlkHCeUa1Bxi4E/tR/HSez8+heXHL8HQkJ4Bd8g==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [linux] - - '@parcel/watcher-linux-arm64-glibc@2.5.1': - resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [linux] - - '@parcel/watcher-linux-arm64-musl@2.2.0': - resolution: {integrity: sha512-jS+qfhhoOBVWwMLP65MaG8xdInMK30pPW8wqTCg2AAuVJh5xepMbzkhHJ4zURqHiyY3EiIRuYu4ONJKCxt8iqA==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [linux] - - '@parcel/watcher-linux-arm64-musl@2.5.1': - resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [linux] - - '@parcel/watcher-linux-x64-glibc@2.2.0': - resolution: {integrity: sha512-xJvJ7R2wJdi47WZBFS691RDOWvP1j/IAs3EXaWVhDI8FFITbWrWaln7KoNcR0Y3T+ZwimFY/cfb0PNht1q895g==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [linux] - - '@parcel/watcher-linux-x64-glibc@2.5.1': - resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [linux] - - '@parcel/watcher-linux-x64-musl@2.2.0': - resolution: {integrity: sha512-D+NMpgr23a+RI5mu8ZPKWy7AqjBOkURFDgP5iIXXEf/K3hm0jJ3ogzi0Ed2237B/CdYREimCgXyeiAlE/FtwyA==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [linux] - - '@parcel/watcher-linux-x64-musl@2.5.1': - resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [linux] - - '@parcel/watcher-win32-arm64@2.2.0': - resolution: {integrity: sha512-z225cPn3aygJsyVUOWwfyW+fY0Tvk7N3XCOl66qUPFxpbuXeZuiuuJemmtm8vxyqa3Ur7peU/qJxrpC64aeI7Q==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [win32] - - '@parcel/watcher-win32-arm64@2.5.1': - resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [win32] - - '@parcel/watcher-win32-ia32@2.5.1': - resolution: {integrity: sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==} - engines: {node: '>= 10.0.0'} - cpu: [ia32] - os: [win32] - - '@parcel/watcher-win32-x64@2.2.0': - resolution: {integrity: sha512-JqGW0RJ61BkKx+yYzIURt9s53P7xMVbv0uxYPzAXLBINGaFmkIKSuUPyBVfy8TMbvp93lvF4SPBNDzVRJfvgOw==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [win32] - - '@parcel/watcher-win32-x64@2.5.1': - resolution: {integrity: sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [win32] - - '@parcel/watcher@2.2.0': - resolution: {integrity: sha512-71S4TF+IMyAn24PK4KSkdKtqJDR3zRzb0HE3yXpacItqTM7XfF2f5q9NEGLEVl0dAaBAGfNwDCjH120y25F6Tg==} - engines: {node: '>= 10.0.0'} - - '@parcel/watcher@2.5.1': - resolution: {integrity: sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==} - engines: {node: '>= 10.0.0'} - - '@parcel/workers@2.8.3': - resolution: {integrity: sha512-+AxBnKgjqVpUHBcHLWIHcjYgKIvHIpZjN33mG5LG9XXvrZiqdWvouEzqEXlVLq5VzzVbKIQQcmsvRy138YErkg==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@parcel/core': ^2.8.3 - - '@parcel/workers@2.9.3': - resolution: {integrity: sha512-zRrDuZJzTevrrwElYosFztgldhqW6G9q5zOeQXfVQFkkEJCNfg36ixeiofKRU8uu2x+j+T6216mhMNB6HiuY+w==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@parcel/core': ^2.9.3 - - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - - '@plasmohq/consolidate@0.17.0': - resolution: {integrity: sha512-Na8imBnvzYPtzkK+9Uv9hPZ/oJti/0jgiQWD222SHxHw2QCVuR4KzslxXCy/rS8gGluSiTs1BGVvc3d2O6aJCA==} - engines: {node: '>= 0.10.0'} - peerDependencies: - arc-templates: ^0.5.3 - atpl: '>=0.7.6' - babel-core: ^6.26.3 - bracket-template: ^1.1.5 - coffeescript: ^2.7.0 - dot: ^1.1.3 - eco: ^1.1.0-rc-3 - ect: ^0.5.9 - ejs: ^3.1.5 - haml-coffee: ^1.14.1 - hamlet: ^0.3.3 - hamljs: ^0.6.2 - handlebars: ^4.7.6 - hogan.js: ^3.0.2 - htmling: ^0.0.8 - jazz: ^0.0.18 - jqtpl: ~1.1.0 - just: ^0.1.8 - liquid: ^5.1.1 - liquor: ^0.0.5 - lodash: ^4.17.20 - marko: ^3.14.4 - mote: ^0.2.0 - mustache: ^4.0.1 - nunjucks: ^3.2.2 - plates: ~0.4.11 - pug: ^3.0.0 - qejs: ^3.0.5 - ractive: ^1.3.12 - razor-tmpl: ^1.3.1 - react: ^18.2.0 - react-dom: ^18.2.0 - slm: ^2.0.0 - squirrelly: ^5.1.0 - teacup: ^2.0.0 - templayed: '>=0.2.3' - then-pug: '*' - tinyliquid: ^0.2.34 - toffee: ^0.3.6 - twig: ^1.15.2 - twing: ^5.0.2 - underscore: ^1.11.0 - vash: ^0.13.0 - velocityjs: ^2.0.1 - walrus: ^0.10.1 - whiskers: ^0.4.0 - peerDependenciesMeta: - arc-templates: - optional: true - atpl: - optional: true - babel-core: - optional: true - bracket-template: - optional: true - coffeescript: - optional: true - dot: - optional: true - eco: - optional: true - ect: - optional: true - ejs: - optional: true - haml-coffee: - optional: true - hamlet: - optional: true - hamljs: - optional: true - handlebars: - optional: true - hogan.js: - optional: true - htmling: - optional: true - jazz: - optional: true - jqtpl: - optional: true - just: - optional: true - liquid: - optional: true - liquor: - optional: true - lodash: - optional: true - marko: - optional: true - mote: - optional: true - mustache: - optional: true - nunjucks: - optional: true - plates: - optional: true - pug: - optional: true - qejs: - optional: true - ractive: - optional: true - razor-tmpl: - optional: true - react: - optional: true - react-dom: - optional: true - slm: - optional: true - squirrelly: - optional: true - teacup: - optional: true - templayed: - optional: true - then-pug: - optional: true - tinyliquid: - optional: true - toffee: - optional: true - twig: - optional: true - twing: - optional: true - underscore: - optional: true - vash: - optional: true - velocityjs: - optional: true - walrus: - optional: true - whiskers: - optional: true - - '@plasmohq/init@0.7.0': - resolution: {integrity: sha512-P75g48dqOGneJ+n0AcqnLE/TYflcaPc3B7h6EopnCBBYUDnCNBMwYmKAkaf5pnhsEB0ybPS6TU1C2DTGfqaW7A==} - - '@plasmohq/messaging@0.7.1': - resolution: {integrity: sha512-oKTrEO+Qhm/hgUKoiz17dspt2Vwf0O0JN5sUT3WjwEhL6uK7NdSawBl8eELK4qvm7pFSvNcJXiiuHYAvtPKaWg==} - peerDependencies: - react: ^16.8.6 || ^17 || ^18 || ^19.0.0 - peerDependenciesMeta: - react: - optional: true - - '@plasmohq/parcel-bundler@0.5.6': - resolution: {integrity: sha512-kjwj5tQUhdAK00AxXOzgqJ2jryZg4X6aleYAcjbREPzVMqKEu1NrNSNy5VGAfNRG6NCT6ZYg39ZCyuUOR2lEsQ==} - engines: {node: '>= 16.0.0', parcel: '>= 2.7.0'} - - '@plasmohq/parcel-compressor-utf8@0.1.1': - resolution: {integrity: sha512-9zcF39XIBzauYLERoGNVSy7qR1MzEqjhQn16RrlCpZ1AyNMlBJ3B28SmnUpBQNgne8JOHTtcx6cUVm1IvM3J+g==} - engines: {parcel: '>= 2.8.0'} - - '@plasmohq/parcel-config@0.42.0': - resolution: {integrity: sha512-GHtipmFGA84UsBVLO4v9qrc14XD3iKQA1PfHKiUW/xvGL2+gFzV8+WOvOnTslsh+VpOfJdVQQ5nWqVIH9yRiXg==} - - '@plasmohq/parcel-core@0.1.10': - resolution: {integrity: sha512-XbJrqlgPNo+uQaukWayfRDZnAvdkYrmcydCOz0wfmuksTjDisyGkL3ZbWeX86QPN65CXFyou11/9h3+U9IsHfA==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-namer-manifest@0.3.12': - resolution: {integrity: sha512-mNyIVK4nRbjlnXXUygBcmV7xLzgS1HZ3vedxUrMQah0Wp0Y20GFcomToDBC0w9NXIZVSSKY0bRIeh0B6/verfQ==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-optimizer-encapsulate@0.0.8': - resolution: {integrity: sha512-iXDXoLtYBvV4rHhFw3O6nrS3dEWYe9k2m0i/Tvzg2lz4lUHFyvK5NN9RWqkOLfI8JviaqQzaaMKteJhLsX6z1A==} - engines: {parcel: '>= 2.8.0'} - - '@plasmohq/parcel-optimizer-es@0.4.1': - resolution: {integrity: sha512-2FvBq3L5wHyD+TNHpO0IVMJKX1XQ+uBruFVcRUgo+lDkIAyop7P8wpsY4iq3dOKXJrqjwBop9nzNcq0L/zaalQ==} - engines: {parcel: '>= 2.8.0'} - - '@plasmohq/parcel-packager@0.6.15': - resolution: {integrity: sha512-c6Afk5l8EqxyZ/N7p8avWEBt5teTQPQsvZZpPHWhsAY9eonX+h8bFdmXym1oevaq5TySJOpNCSUdTvqqZtlSnQ==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-resolver-post@0.4.5': - resolution: {integrity: sha512-Y5la9wruh3fMHlUoWtVBcbSyvg2xZE1kSRp5BAjtfyZlKS2cT/vIbFTUkqk9nPvXLExBDNajIxTKk9ag/9WzpA==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-resolver@0.14.1': - resolution: {integrity: sha512-1nmmMI7N5rtpni2TpUyPkI8XU1wIk/lTDGNZXLxtkzOoFiFP2sc2xZq4OGhmnRYvWphZYrnhMjRrjNJmqOFqxw==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-runtime@0.25.2': - resolution: {integrity: sha512-oeW/JKIYBkkB8vtFAvCTODYH+UeXjh78iFchUyIkdGh69SPViPqW91xS45M7G8Q+0kNV7In/Byv701XyS3W4sg==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-transformer-inject-env@0.2.12': - resolution: {integrity: sha512-QhM5Je0LyuAAJMAXeBEu4YvDirIPXuO2SoxHkwTMIwCMXpstPinnKiElrIoolqZjcxLmDCfsXerXZfbN6NhSlA==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-transformer-inline-css@0.3.11': - resolution: {integrity: sha512-EUSwEowFNSgC/F1q/V4H4NXJ23wwLzlmRI6lvIr6S0mIuG/FCga+lAV3IZ+yAuXqUM2VexX6JyYYpNVidrMSxw==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-transformer-manifest@0.21.0': - resolution: {integrity: sha512-swxCJWU/tfCTbcQl2u5TpoQCcxlp3xjdPKk9RB709CWN4fsmNhFDUCAKo5kpl7+YGwCqlGr09b5sqWJrriUBrw==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-transformer-svelte@0.6.0': - resolution: {integrity: sha512-5lZW6NBtzhJaCyjpKaZF1/YzY9CF+kbfNknvASJB/Cf6uJPJlrgdxoWiVJ8IWMs3DyLgAnJXTdIU+uwjwXP1wg==} - engines: {parcel: '>= 2.7.0'} - - '@plasmohq/parcel-transformer-vue@0.5.0': - resolution: {integrity: sha512-/3oVbajt+DRqtbM0RkKFtfyZR8DVjcsYpj1jHqPParGVBiXwgP0D/8Bj5p5/5Iqihs08gzasTcjKcwQKKdj0og==} - engines: {parcel: '>= 2.7.0'} - - '@playwright/test@1.52.0': - resolution: {integrity: sha512-uh6W7sb55hl7D6vsAeA+V2p5JnlAqzhqFyF0VcJkKZXkgnFcVG9PziERRHQfPLfNGx1C292a4JqbWzhR8L4R1g==} - engines: {node: '>=18'} - hasBin: true - - '@pnpm/config.env-replace@1.1.0': - resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} - engines: {node: '>=12.22.0'} - - '@pnpm/network.ca-file@1.0.2': - resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} - engines: {node: '>=12.22.0'} - - '@pnpm/npm-conf@2.3.1': - resolution: {integrity: sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==} - engines: {node: '>=12'} - - '@sec-ant/readable-stream@0.4.1': - resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} - - '@sinclair/typebox@0.27.8': - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - - '@sindresorhus/is@5.6.0': - resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==} - engines: {node: '>=14.16'} - - '@sindresorhus/is@7.0.1': - resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==} - engines: {node: '>=18'} - - '@sinonjs/commons@3.0.1': - resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} - - '@sinonjs/fake-timers@10.3.0': - resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} - - '@svgr/babel-plugin-add-jsx-attribute@6.5.1': - resolution: {integrity: sha512-9PYGcXrAxitycIjRmZB+Q0JaN07GZIWaTBIGQzfaZv+qr1n8X1XUEJ5rZ/vx6OVD9RRYlrNnXWExQXcmZeD/BQ==} - engines: {node: '>=10'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@svgr/babel-plugin-remove-jsx-attribute@8.0.0': - resolution: {integrity: sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==} - engines: {node: '>=14'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0': - resolution: {integrity: sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==} - engines: {node: '>=14'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@svgr/babel-plugin-replace-jsx-attribute-value@6.5.1': - resolution: {integrity: sha512-8DPaVVE3fd5JKuIC29dqyMB54sA6mfgki2H2+swh+zNJoynC8pMPzOkidqHOSc6Wj032fhl8Z0TVn1GiPpAiJg==} - engines: {node: '>=10'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@svgr/babel-plugin-svg-dynamic-title@6.5.1': - resolution: {integrity: sha512-FwOEi0Il72iAzlkaHrlemVurgSQRDFbk0OC8dSvD5fSBPHltNh7JtLsxmZUhjYBZo2PpcU/RJvvi6Q0l7O7ogw==} - engines: {node: '>=10'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@svgr/babel-plugin-svg-em-dimensions@6.5.1': - resolution: {integrity: sha512-gWGsiwjb4tw+ITOJ86ndY/DZZ6cuXMNE/SjcDRg+HLuCmwpcjOktwRF9WgAiycTqJD/QXqL2f8IzE2Rzh7aVXA==} - engines: {node: '>=10'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@svgr/babel-plugin-transform-react-native-svg@6.5.1': - resolution: {integrity: sha512-2jT3nTayyYP7kI6aGutkyfJ7UMGtuguD72OjeGLwVNyfPRBD8zQthlvL+fAbAKk5n9ZNcvFkp/b1lZ7VsYqVJg==} - engines: {node: '>=10'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@svgr/babel-plugin-transform-svg-component@6.5.1': - resolution: {integrity: sha512-a1p6LF5Jt33O3rZoVRBqdxL350oge54iZWHNI6LJB5tQ7EelvD/Mb1mfBiZNAan0dt4i3VArkFRjA4iObuNykQ==} - engines: {node: '>=12'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@svgr/babel-preset@6.5.1': - resolution: {integrity: sha512-6127fvO/FF2oi5EzSQOAjo1LE3OtNVh11R+/8FXa+mHx1ptAaS4cknIjnUA7e6j6fwGGJ17NzaTJFUwOV2zwCw==} - engines: {node: '>=10'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@svgr/core@6.5.1': - resolution: {integrity: sha512-/xdLSWxK5QkqG524ONSjvg3V/FkNyCv538OIBdQqPNaAta3AsXj/Bd2FbvR87yMbXO2hFSWiAe/Q6IkVPDw+mw==} - engines: {node: '>=10'} - - '@svgr/hast-util-to-babel-ast@6.5.1': - resolution: {integrity: sha512-1hnUxxjd83EAxbL4a0JDJoD3Dao3hmjvyvyEV8PzWmLK3B9m9NPlW7GKjFyoWE8nM7HnXzPcmmSyOW8yOddSXw==} - engines: {node: '>=10'} - - '@svgr/plugin-jsx@6.5.1': - resolution: {integrity: sha512-+UdQxI3jgtSjCykNSlEMuy1jSRQlGC7pqBCPvkG/2dATdWo082zHTTK3uhnAju2/6XpE6B5mZ3z4Z8Ns01S8Gw==} - engines: {node: '>=10'} - peerDependencies: - '@svgr/core': ^6.0.0 - - '@svgr/plugin-svgo@6.5.1': - resolution: {integrity: sha512-omvZKf8ixP9z6GWgwbtmP9qQMPX4ODXi+wzbVZgomNFsUIlHA1sf4fThdwTWSsZGgvGAG6yE+b/F5gWUkcZ/iQ==} - engines: {node: '>=10'} - peerDependencies: - '@svgr/core': '*' - - '@swc/core-darwin-arm64@1.11.22': - resolution: {integrity: sha512-upSiFQfo1TE2QM3+KpBcp5SrOdKKjoc+oUoD1mmBDU2Wv4Bjjv16Z2I5ADvIqMV+b87AhYW+4Qu6iVrQD7j96Q==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - - '@swc/core-darwin-arm64@1.3.96': - resolution: {integrity: sha512-8hzgXYVd85hfPh6mJ9yrG26rhgzCmcLO0h1TIl8U31hwmTbfZLzRitFQ/kqMJNbIBCwmNH1RU2QcJnL3d7f69A==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - - '@swc/core-darwin-x64@1.11.22': - resolution: {integrity: sha512-8PEuF/gxIMJVK21DjuCOtzdqstn2DqnxVhpAYfXEtm3WmMqLIOIZBypF/xafAozyaHws4aB/5xmz8/7rPsjavw==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - - '@swc/core-darwin-x64@1.3.96': - resolution: {integrity: sha512-mFp9GFfuPg+43vlAdQZl0WZpZSE8sEzqL7sr/7Reul5McUHP0BaLsEzwjvD035ESfkY8GBZdLpMinblIbFNljQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - - '@swc/core-linux-arm-gnueabihf@1.11.22': - resolution: {integrity: sha512-NIPTXvqtn9e7oQHgdaxM9Z/anHoXC3Fg4ZAgw5rSGa1OlnKKupt5sdfJamNggSi+eAtyoFcyfkgqHnfe2u63HA==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - - '@swc/core-linux-arm-gnueabihf@1.3.96': - resolution: {integrity: sha512-8UEKkYJP4c8YzYIY/LlbSo8z5Obj4hqcv/fUTHiEePiGsOddgGf7AWjh56u7IoN/0uEmEro59nc1ChFXqXSGyg==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - - '@swc/core-linux-arm64-gnu@1.11.22': - resolution: {integrity: sha512-xZ+bgS60c5r8kAeYsLNjJJhhQNkXdidQ277pUabSlu5GjR0CkQUPQ+L9hFeHf8DITEqpPBPRiAiiJsWq5eqMBg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - - '@swc/core-linux-arm64-gnu@1.3.96': - resolution: {integrity: sha512-c/IiJ0s1y3Ymm2BTpyC/xr6gOvoqAVETrivVXHq68xgNms95luSpbYQ28rqaZC8bQC8M5zdXpSc0T8DJu8RJGw==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - - '@swc/core-linux-arm64-musl@1.11.22': - resolution: {integrity: sha512-JhrP/q5VqQl2eJR0xKYIkKTPjgf8CRsAmRnjJA2PtZhfQ543YbYvUqxyXSRyBOxdyX8JwzuAxIPEAlKlT7PPuQ==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - - '@swc/core-linux-arm64-musl@1.3.96': - resolution: {integrity: sha512-i5/UTUwmJLri7zhtF6SAo/4QDQJDH2fhYJaBIUhrICmIkRO/ltURmpejqxsM/ye9Jqv5zG7VszMC0v/GYn/7BQ==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - - '@swc/core-linux-x64-gnu@1.11.22': - resolution: {integrity: sha512-htmAVL+U01gk9GyziVUP0UWYaUQBgrsiP7Ytf6uDffrySyn/FclUS3MDPocNydqYsOpj3OpNKPxkaHK+F+X5fg==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - - '@swc/core-linux-x64-gnu@1.3.96': - resolution: {integrity: sha512-USdaZu8lTIkm4Yf9cogct/j5eqtdZqTgcTib4I+NloUW0E/hySou3eSyp3V2UAA1qyuC72ld1otXuyKBna0YKQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - - '@swc/core-linux-x64-musl@1.11.22': - resolution: {integrity: sha512-PL0VHbduWPX+ANoyOzr58jBiL2VnD0xGSFwPy7NRZ1Pr6SNWm4jw3x2u6RjLArGhS5EcWp64BSk9ZxqmTV3FEg==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - - '@swc/core-linux-x64-musl@1.3.96': - resolution: {integrity: sha512-QYErutd+G2SNaCinUVobfL7jWWjGTI0QEoQ6hqTp7PxCJS/dmKmj3C5ZkvxRYcq7XcZt7ovrYCTwPTHzt6lZBg==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - - '@swc/core-win32-arm64-msvc@1.11.22': - resolution: {integrity: sha512-moJvFhhTVGoMeEThtdF7hQog80Q00CS06v5uB+32VRuv+I31+4WPRyGlTWHO+oY4rReNcXut/mlDHPH7p0LdFg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - - '@swc/core-win32-arm64-msvc@1.3.96': - resolution: {integrity: sha512-hjGvvAduA3Un2cZ9iNP4xvTXOO4jL3G9iakhFsgVhpkU73SGmK7+LN8ZVBEu4oq2SUcHO6caWvnZ881cxGuSpg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - - '@swc/core-win32-ia32-msvc@1.11.22': - resolution: {integrity: sha512-/jnsPJJz89F1aKHIb5ScHkwyzBciz2AjEq2m9tDvQdIdVufdJ4SpEDEN9FqsRNRLcBHjtbLs6bnboA+B+pRFXw==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - - '@swc/core-win32-ia32-msvc@1.3.96': - resolution: {integrity: sha512-Far2hVFiwr+7VPCM2GxSmbh3ikTpM3pDombE+d69hkedvYHYZxtTF+2LTKl/sXtpbUnsoq7yV/32c9R/xaaWfw==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - - '@swc/core-win32-x64-msvc@1.11.22': - resolution: {integrity: sha512-lc93Y8Mku7LCFGqIxJ91coXZp2HeoDcFZSHCL90Wttg5xhk5xVM9uUCP+OdQsSsEixLF34h5DbT9ObzP8rAdRw==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - - '@swc/core-win32-x64-msvc@1.3.96': - resolution: {integrity: sha512-4VbSAniIu0ikLf5mBX81FsljnfqjoVGleEkCQv4+zRlyZtO3FHoDPkeLVoy6WRlj7tyrRcfUJ4mDdPkbfTO14g==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - - '@swc/core@1.11.22': - resolution: {integrity: sha512-mjPYbqq8XjwqSE0hEPT9CzaJDyxql97LgK4iyvYlwVSQhdN1uK0DBG4eP9PxYzCS2MUGAXB34WFLegdUj5HGpg==} - engines: {node: '>=10'} - peerDependencies: - '@swc/helpers': '>=0.5.17' - peerDependenciesMeta: - '@swc/helpers': - optional: true - - '@swc/core@1.3.96': - resolution: {integrity: sha512-zwE3TLgoZwJfQygdv2SdCK9mRLYluwDOM53I+dT6Z5ZvrgVENmY3txvWDvduzkV+/8IuvrRbVezMpxcojadRdQ==} - engines: {node: '>=10'} - peerDependencies: - '@swc/helpers': ^0.5.0 - peerDependenciesMeta: - '@swc/helpers': - optional: true - - '@swc/counter@0.1.3': - resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} - - '@swc/helpers@0.5.17': - resolution: {integrity: sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==} - - '@swc/types@0.1.21': - resolution: {integrity: sha512-2YEtj5HJVbKivud9N4bpPBAyZhj4S2Ipe5LkUG94alTpr7in/GU/EARgPAd3BwU+YOmFVJC2+kjqhGRi3r0ZpQ==} - - '@szmarczak/http-timer@5.0.1': - resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} - engines: {node: '>=14.16'} - - '@tootallnate/once@2.0.0': - resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} - engines: {node: '>= 10'} - - '@trysound/sax@0.2.0': - resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} - engines: {node: '>=10.13.0'} - - '@tsconfig/node10@1.0.11': - resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} - - '@tsconfig/node12@1.0.11': - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - - '@tsconfig/node14@1.0.3': - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - - '@tsconfig/node16@1.0.4': - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - - '@types/babel__core@7.20.5': - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - - '@types/babel__generator@7.27.0': - resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} - - '@types/babel__template@7.4.4': - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - - '@types/babel__traverse@7.20.7': - resolution: {integrity: sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==} - - '@types/chrome@0.0.258': - resolution: {integrity: sha512-vicJi6cg2zaFuLmLY7laG6PHBknjKFusPYlaKQ9Zlycskofy71rStlGvW07MUuqUIVorZf8k5KH+zeTTGcH2dQ==} - - '@types/conventional-commits-parser@5.0.1': - resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} - - '@types/estree@1.0.7': - resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} - - '@types/filesystem@0.0.36': - resolution: {integrity: sha512-vPDXOZuannb9FZdxgHnqSwAG/jvdGM8Wq+6N4D/d80z+D4HWH+bItqsZaVRQykAn6WEVeEkLm2oQigyHtgb0RA==} - - '@types/filewriter@0.0.33': - resolution: {integrity: sha512-xFU8ZXTw4gd358lb2jw25nxY9QAgqn2+bKKjKOYfNCzN4DKCFetK7sPtrlpg66Ywe3vWY9FNxprZawAh9wfJ3g==} - - '@types/graceful-fs@4.1.9': - resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} - - '@types/har-format@1.2.16': - resolution: {integrity: sha512-fluxdy7ryD3MV6h8pTfTYpy/xQzCFC7m89nOH9y94cNqJ1mDIDPut7MnRHI3F6qRmh/cT2fUjG1MLdCNb4hE9A==} - - '@types/http-cache-semantics@4.0.4': - resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} - - '@types/istanbul-lib-coverage@2.0.6': - resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} - - '@types/istanbul-lib-report@3.0.3': - resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} - - '@types/istanbul-reports@3.0.4': - resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} - - '@types/jest@29.5.14': - resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} - - '@types/jsdom@20.0.1': - resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} - - '@types/jsdom@21.1.7': - resolution: {integrity: sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==} - - '@types/node@20.11.5': - resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==} - - '@types/node@20.17.31': - resolution: {integrity: sha512-quODOCNXQAbNf1Q7V+fI8WyErOCh0D5Yd31vHnKu4GkSztGQ7rlltAaqXhHhLl33tlVyUXs2386MkANSwgDn6A==} - - '@types/parse-json@4.0.2': - resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} - - '@types/prop-types@15.7.14': - resolution: {integrity: sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==} - - '@types/react-dom@18.2.18': - resolution: {integrity: sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==} - - '@types/react@18.2.48': - resolution: {integrity: sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==} - - '@types/scheduler@0.26.0': - resolution: {integrity: sha512-WFHp9YUJQ6CKshqoC37iOlHnQSmxNc795UhB26CyBBttrN9svdIrUjl/NjnNmfcwtncN0h/0PPAFWv9ovP8mLA==} - - '@types/sinonjs__fake-timers@8.1.1': - resolution: {integrity: sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==} - - '@types/sizzle@2.3.9': - resolution: {integrity: sha512-xzLEyKB50yqCUPUJkIsrVvoWNfFUbIZI+RspLWt8u+tIW/BetMBZtgV2LY/2o+tYH8dRvQ+eoPf3NdhQCcLE2w==} - - '@types/stack-utils@2.0.3': - resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} - - '@types/tough-cookie@4.0.5': - resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} - - '@types/trusted-types@2.0.7': - resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} - - '@types/web@0.0.144': - resolution: {integrity: sha512-TLnchKKvrpmQ7O8RWgBuiR+1iNQLzM8vkEU4h/MVSqerw5vpxr51sh+Bc2upjUtfgz+6LWyXtsq4rSQlGuRt7A==} - - '@types/webextension-polyfill@0.12.3': - resolution: {integrity: sha512-F58aDVSeN/MjUGazXo/cPsmR76EvqQhQ1v4x23hFjUX0cfAJYE+JBWwiOGW36/VJGGxoH74sVlRIF3z7SJCKyg==} - - '@types/ws@8.18.1': - resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} - - '@types/yargs-parser@21.0.3': - resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - - '@types/yargs@17.0.33': - resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - - '@types/yauzl@2.10.3': - resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - - '@typescript-eslint/eslint-plugin@7.18.0': - resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@7.18.0': - resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/scope-manager@7.18.0': - resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/type-utils@7.18.0': - resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/types@7.18.0': - resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/typescript-estree@7.18.0': - resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/utils@7.18.0': - resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - - '@typescript-eslint/visitor-keys@7.18.0': - resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@ungap/structured-clone@1.3.0': - resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} - - '@vue/compiler-core@3.3.4': - resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} - - '@vue/compiler-dom@3.3.4': - resolution: {integrity: sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==} - - '@vue/compiler-sfc@3.3.4': - resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} - - '@vue/compiler-ssr@3.3.4': - resolution: {integrity: sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==} - - '@vue/reactivity-transform@3.3.4': - resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} - - '@vue/reactivity@3.3.4': - resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==} - - '@vue/runtime-core@3.3.4': - resolution: {integrity: sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==} - - '@vue/runtime-dom@3.3.4': - resolution: {integrity: sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==} - - '@vue/server-renderer@3.3.4': - resolution: {integrity: sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==} - peerDependencies: - vue: 3.3.4 - - '@vue/shared@3.3.4': - resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} - - abab@2.0.6: - resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} - deprecated: Use your platform's native atob() and btoa() methods instead - - abortcontroller-polyfill@1.7.5: - resolution: {integrity: sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==} - - abortcontroller-polyfill@1.7.8: - resolution: {integrity: sha512-9f1iZ2uWh92VcrU9Y8x+LdM4DLj75VE0MJB8zuF1iUnroEptStw+DQ8EQPMUdfe5k+PkB1uUfDQfWbhstH8LrQ==} - - accepts@1.3.8: - resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} - engines: {node: '>= 0.6'} - - acorn-globals@7.0.1: - resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} - - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - - acorn-walk@8.3.4: - resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} - engines: {node: '>=0.4.0'} - - acorn@8.14.1: - resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==} - engines: {node: '>=0.4.0'} - hasBin: true - - agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - - agent-base@7.1.3: - resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} - engines: {node: '>= 14'} - - aggregate-error@3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} - - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - - ajv@8.17.1: - resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} - - ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - - ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.1.0: - resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} - engines: {node: '>=12'} - - ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - ansi-styles@5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} - - ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} - engines: {node: '>=12'} - - any-promise@1.3.0: - resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} - - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - - arch@2.2.0: - resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} - - arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - - arg@5.0.2: - resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} - - argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - aria-query@5.3.2: - resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} - engines: {node: '>= 0.4'} - - array-flatten@1.1.1: - resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - - array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - - asn1@0.2.6: - resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} - - assert-plus@1.0.0: - resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} - engines: {node: '>=0.8'} - - astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} - - async@3.2.6: - resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} - - asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - - at-least-node@1.0.0: - resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} - engines: {node: '>= 4.0.0'} - - autoprefixer@10.4.21: - resolution: {integrity: sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==} - engines: {node: ^10 || ^12 || >=14} - hasBin: true - peerDependencies: - postcss: ^8.1.0 - - aws-sign2@0.7.0: - resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} - - aws4@1.13.2: - resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==} - - axobject-query@3.2.4: - resolution: {integrity: sha512-aPTElBrbifBU1krmZxGZOlBkslORe7Ll7+BDnI50Wy4LgOt69luMgevkDfTq1O/ZgprooPCtWpjCwKSZw/iZ4A==} - engines: {node: '>= 0.4'} - - babel-jest@29.7.0: - resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.8.0 - - babel-plugin-istanbul@6.1.1: - resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} - engines: {node: '>=8'} - - babel-plugin-jest-hoist@29.6.3: - resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - babel-preset-current-node-syntax@1.1.0: - resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} - peerDependencies: - '@babel/core': ^7.0.0 - - babel-preset-jest@29.6.3: - resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.0.0 - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - base-x@3.0.11: - resolution: {integrity: sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==} - - base64-js@1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - - bcrypt-pbkdf@1.0.2: - resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} - - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - - bl@4.1.0: - resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - - blob-util@2.0.2: - resolution: {integrity: sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==} - - bluebird@3.7.2: - resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} - - body-parser@1.20.3: - resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - - boolbase@1.0.0: - resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - - brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - - brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - - braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} - - browserslist@4.22.1: - resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - - browserslist@4.24.4: - resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - - bser@2.1.1: - resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} - - buffer-crc32@0.2.13: - resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} - - buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - - buffer@5.7.1: - resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - - buffer@6.0.3: - resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - - bundle-require@3.1.2: - resolution: {integrity: sha512-Of6l6JBAxiyQ5axFxUM6dYeP/W7X2Sozeo/4EYB9sJhL+dqL7TKjg+shwxp6jlu/6ZSERfsYtIpSJ1/x3XkAEA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - peerDependencies: - esbuild: '>=0.13' - - bundle-require@4.2.1: - resolution: {integrity: sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - peerDependencies: - esbuild: '>=0.17' - - bytes@3.1.2: - resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} - engines: {node: '>= 0.8'} - - cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} - - cacheable-lookup@7.0.0: - resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} - engines: {node: '>=14.16'} - - cacheable-request@10.2.14: - resolution: {integrity: sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==} - engines: {node: '>=14.16'} - - cacheable-request@12.0.1: - resolution: {integrity: sha512-Yo9wGIQUaAfIbk+qY0X4cDQgCosecfBe3V9NSyeY4qPC2SAkbCS4Xj79VP8WOzitpJUZKc/wsRCYF5ariDIwkg==} - engines: {node: '>=18'} - - cachedir@2.3.0: - resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} - engines: {node: '>=6'} - - cachedir@2.4.0: - resolution: {integrity: sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==} - engines: {node: '>=6'} - - call-bind-apply-helpers@1.0.2: - resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} - engines: {node: '>= 0.4'} - - call-bound@1.0.4: - resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} - engines: {node: '>= 0.4'} - - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - - camelcase-css@2.0.1: - resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} - engines: {node: '>= 6'} - - camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - - caniuse-lite@1.0.30001715: - resolution: {integrity: sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==} - - caseless@0.12.0: - resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - - chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - chalk@5.3.0: - resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - - chalk@5.4.1: - resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - - change-case@5.1.2: - resolution: {integrity: sha512-CAtbGEDulyjzs05RXy3uKcwqeztz/dMEuAc1Xu9NQBsbrhuGMneL0u9Dj5SoutLKBFYun8txxYIwhjtLNfUmCA==} - - char-regex@1.0.2: - resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} - engines: {node: '>=10'} - - chardet@0.7.0: - resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - - check-more-types@2.24.0: - resolution: {integrity: sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==} - engines: {node: '>= 0.8.0'} - - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} - - chrome-trace-event@1.0.4: - resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} - engines: {node: '>=6.0'} - - ci-info@3.9.0: - resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} - engines: {node: '>=8'} - - ci-info@4.2.0: - resolution: {integrity: sha512-cYY9mypksY8NRqgDB1XD1RiJL338v/551niynFTGkZOO2LHuB2OmOYxDIe/ttN9AHwrqdum1360G3ald0W9kCg==} - engines: {node: '>=8'} - - cjs-module-lexer@1.4.3: - resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} - - clean-stack@2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} - - cli-cursor@3.1.0: - resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} - engines: {node: '>=8'} - - cli-spinners@2.9.2: - resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} - engines: {node: '>=6'} - - cli-table3@0.6.5: - resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} - engines: {node: 10.* || >= 12.*} - - cli-truncate@2.1.0: - resolution: {integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==} - engines: {node: '>=8'} - - cli-width@3.0.0: - resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} - engines: {node: '>= 10'} - - cli-width@4.1.0: - resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} - engines: {node: '>= 12'} - - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - - clone@1.0.4: - resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} - engines: {node: '>=0.8'} - - clone@2.1.2: - resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} - engines: {node: '>=0.8'} - - co@4.6.0: - resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - - code-red@1.0.4: - resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} - - collect-v8-coverage@1.0.2: - resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} - - color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - color-string@1.9.1: - resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} - - color@4.2.3: - resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} - engines: {node: '>=12.5.0'} - - colorette@2.0.20: - resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - - combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - - commander@12.1.0: - resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} - engines: {node: '>=18'} - - commander@4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} - engines: {node: '>= 6'} - - commander@6.2.1: - resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==} - engines: {node: '>= 6'} - - commander@7.2.0: - resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} - engines: {node: '>= 10'} - - commitizen@4.3.1: - resolution: {integrity: sha512-gwAPAVTy/j5YcOOebcCRIijn+mSjWJC+IYKivTu6aG8Ei/scoXgfsMRnuAk6b0GRste2J4NGxVdMN3ZpfNaVaw==} - engines: {node: '>= 12'} - hasBin: true - - common-tags@1.8.2: - resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} - engines: {node: '>=4.0.0'} - - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - - config-chain@1.1.13: - resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} - - content-disposition@0.5.4: - resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} - engines: {node: '>= 0.6'} - - content-security-policy-parser@0.4.1: - resolution: {integrity: sha512-NNJS8XPnx3OKr/CUOSwDSJw+lWTrZMYnclLKj0Y9CYOfJNJTWLFGPg3u2hYgbXMXKVRkZR2fbyReNQ1mUff/Qg==} - engines: {node: '>=8.0.0'} - - content-type@1.0.5: - resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} - engines: {node: '>= 0.6'} - - conventional-commit-types@3.0.0: - resolution: {integrity: sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==} - - convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - - cookie-signature@1.0.6: - resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} - - cookie@0.7.1: - resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} - engines: {node: '>= 0.6'} - - copy-anything@2.0.6: - resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==} - - core-util-is@1.0.2: - resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} - - cosmiconfig-typescript-loader@6.1.0: - resolution: {integrity: sha512-tJ1w35ZRUiM5FeTzT7DtYWAFFv37ZLqSRkGi2oeCK1gPhvaWjkAtfXvLmvE1pRfxxp9aQo6ba/Pvg1dKj05D4g==} - engines: {node: '>=v18'} - peerDependencies: - '@types/node': '*' - cosmiconfig: '>=9' - typescript: '>=5' - - cosmiconfig@7.1.0: - resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} - engines: {node: '>=10'} - - cosmiconfig@9.0.0: - resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} - engines: {node: '>=14'} - peerDependencies: - typescript: '>=4.9.5' - peerDependenciesMeta: - typescript: - optional: true - - create-jest@29.7.0: - resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - - create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} - - crypto-random-string@4.0.0: - resolution: {integrity: sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==} - engines: {node: '>=12'} - - css-select@4.3.0: - resolution: {integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==} - - css-tree@1.1.3: - resolution: {integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==} - engines: {node: '>=8.0.0'} - - css-tree@2.3.1: - resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} - engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - - css-what@6.1.0: - resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} - engines: {node: '>= 6'} - - cssesc@3.0.0: - resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} - engines: {node: '>=4'} - hasBin: true - - csso@4.2.0: - resolution: {integrity: sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==} - engines: {node: '>=8.0.0'} - - cssom@0.3.8: - resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==} - - cssom@0.5.0: - resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} - - cssstyle@2.3.0: - resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} - engines: {node: '>=8'} - - cssstyle@4.3.1: - resolution: {integrity: sha512-ZgW+Jgdd7i52AaLYCriF8Mxqft0gD/R9i9wi6RWBhs1pqdPEzPjym7rvRKi397WmQFf3SlyUsszhw+VVCbx79Q==} - engines: {node: '>=18'} - - csstype@3.1.3: - resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - - cypress@13.17.0: - resolution: {integrity: sha512-5xWkaPurwkIljojFidhw8lFScyxhtiFHl/i/3zov+1Z5CmY4t9tjIdvSXfu82Y3w7wt0uR9KkucbhkVvJZLQSA==} - engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} - hasBin: true - - cz-conventional-changelog@3.3.0: - resolution: {integrity: sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==} - engines: {node: '>= 10'} - - dashdash@1.14.1: - resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} - engines: {node: '>=0.10'} - - data-urls@3.0.2: - resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} - engines: {node: '>=12'} - - data-urls@5.0.0: - resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} - engines: {node: '>=18'} - - dayjs@1.11.13: - resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} - - debug@2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - debug@4.4.0: - resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - decimal.js@10.5.0: - resolution: {integrity: sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==} - - decompress-response@6.0.0: - resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} - engines: {node: '>=10'} - - dedent@0.7.0: - resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} - - dedent@1.5.3: - resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - - deep-extend@0.6.0: - resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} - engines: {node: '>=4.0.0'} - - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - - deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} - - defaults@1.0.4: - resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} - - defer-to-connect@2.0.1: - resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} - engines: {node: '>=10'} - - delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - - depd@2.0.0: - resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} - engines: {node: '>= 0.8'} - - destroy@1.2.0: - resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - - detect-browser@5.3.0: - resolution: {integrity: sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==} - - detect-file@1.0.0: - resolution: {integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==} - engines: {node: '>=0.10.0'} - - detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - - detect-libc@1.0.3: - resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} - engines: {node: '>=0.10'} - hasBin: true - - detect-libc@2.0.4: - resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} - engines: {node: '>=8'} - - detect-newline@3.1.0: - resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} - engines: {node: '>=8'} - - didyoumean@1.2.2: - resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} - - diff-sequences@29.6.3: - resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - - dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - - dlv@1.1.3: - resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} - - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - - dom-serializer@1.4.1: - resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} - - dom-storage@2.1.0: - resolution: {integrity: sha512-g6RpyWXzl0RR6OTElHKBl7nwnK87GUyZMYC7JWsB/IA73vpqK2K6LT39x4VepLxlSsWBFrPVLnsSR5Jyty0+2Q==} - - domelementtype@2.3.0: - resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} - - domexception@4.0.0: - resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} - engines: {node: '>=12'} - deprecated: Use your platform's native DOMException instead - - domhandler@4.3.1: - resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} - engines: {node: '>= 4'} - - domutils@2.8.0: - resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} - - dotenv-expand@12.0.1: - resolution: {integrity: sha512-LaKRbou8gt0RNID/9RoI+J2rvXsBRPMV7p+ElHlPhcSARbCPDYcYG2s1TIzAfWv4YSgyY5taidWzzs31lNV3yQ==} - engines: {node: '>=12'} - - dotenv-expand@5.1.0: - resolution: {integrity: sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==} - - dotenv@16.3.1: - resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} - engines: {node: '>=12'} - - dotenv@16.5.0: - resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==} - engines: {node: '>=12'} - - dotenv@7.0.0: - resolution: {integrity: sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==} - engines: {node: '>=6'} - - dunder-proto@1.0.1: - resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} - engines: {node: '>= 0.4'} - - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - - ecc-jsbn@0.1.2: - resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} - - ee-first@1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - - electron-to-chromium@1.5.143: - resolution: {integrity: sha512-QqklJMOFBMqe46k8iIOwA9l2hz57V2OKMmP5eSWcUvwx+mASAsbU+wkF1pHjn9ZVSBPrsYWr4/W/95y5SwYg2g==} - - emittery@0.13.1: - resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} - engines: {node: '>=12'} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - - encodeurl@1.0.2: - resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} - engines: {node: '>= 0.8'} - - encodeurl@2.0.0: - resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} - engines: {node: '>= 0.8'} - - end-of-stream@1.4.4: - resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - - enquirer@2.4.1: - resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} - engines: {node: '>=8.6'} - - entities@2.2.0: - resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} - - entities@3.0.1: - resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==} - engines: {node: '>=0.12'} - - entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - - entities@6.0.0: - resolution: {integrity: sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==} - engines: {node: '>=0.12'} - - env-paths@2.2.1: - resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} - engines: {node: '>=6'} - - errno@0.1.8: - resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} - hasBin: true - - error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - - es-define-property@1.0.1: - resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} - engines: {node: '>= 0.4'} - - es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - - es-object-atoms@1.1.1: - resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} - engines: {node: '>= 0.4'} - - es-set-tostringtag@2.1.0: - resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} - engines: {node: '>= 0.4'} - - esbuild-android-64@0.14.54: - resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - - esbuild-android-arm64@0.14.54: - resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - - esbuild-darwin-64@0.14.54: - resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - - esbuild-darwin-arm64@0.14.54: - resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - - esbuild-freebsd-64@0.14.54: - resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - - esbuild-freebsd-arm64@0.14.54: - resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - - esbuild-linux-32@0.14.54: - resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - - esbuild-linux-64@0.14.54: - resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - - esbuild-linux-arm64@0.14.54: - resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - - esbuild-linux-arm@0.14.54: - resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - - esbuild-linux-mips64le@0.14.54: - resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - - esbuild-linux-ppc64le@0.14.54: - resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - - esbuild-linux-riscv64@0.14.54: - resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - - esbuild-linux-s390x@0.14.54: - resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - - esbuild-netbsd-64@0.14.54: - resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - - esbuild-openbsd-64@0.14.54: - resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - - esbuild-sunos-64@0.14.54: - resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - - esbuild-windows-32@0.14.54: - resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - - esbuild-windows-64@0.14.54: - resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - - esbuild-windows-arm64@0.14.54: - resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - - esbuild@0.14.54: - resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==} - engines: {node: '>=12'} - hasBin: true - - esbuild@0.18.20: - resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} - engines: {node: '>=12'} - hasBin: true - - esbuild@0.21.5: - resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} - engines: {node: '>=12'} - hasBin: true - - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - - escape-html@1.0.3: - resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} - - escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - - escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - escodegen@2.1.0: - resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} - engines: {node: '>=6.0'} - hasBin: true - - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. - hasBin: true - - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} - engines: {node: '>=0.10'} - - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - - estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - - estree-walker@3.0.3: - resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} - - esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - - etag@1.8.1: - resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} - engines: {node: '>= 0.6'} - - eventemitter2@6.4.7: - resolution: {integrity: sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==} - - events@3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - - execa@4.1.0: - resolution: {integrity: sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==} - engines: {node: '>=10'} - - execa@5.1.1: - resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} - engines: {node: '>=10'} - - executable@4.1.1: - resolution: {integrity: sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==} - engines: {node: '>=4'} - - exit@0.1.2: - resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} - engines: {node: '>= 0.8.0'} - - expand-tilde@2.0.2: - resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==} - engines: {node: '>=0.10.0'} - - expect@29.7.0: - resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - express@4.21.2: - resolution: {integrity: sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==} - engines: {node: '>= 0.10.0'} - - extend@3.0.2: - resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - - external-editor@3.1.0: - resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} - engines: {node: '>=4'} - - extract-zip@2.0.1: - resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} - engines: {node: '>= 10.17.0'} - hasBin: true - - extsprintf@1.3.0: - resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==} - engines: {'0': node >=0.6.0} - - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} - engines: {node: '>=8.6.0'} - - fast-glob@3.3.3: - resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} - engines: {node: '>=8.6.0'} - - fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - - fast-uri@3.0.6: - resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} - - fastq@1.19.1: - resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} - - fb-watchman@2.0.2: - resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} - - fd-slicer@1.1.0: - resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} - - fflate@0.8.1: - resolution: {integrity: sha512-/exOvEuc+/iaUm105QIiOt4LpBdMTWsXxqR0HDF35vx3fmaKzw7354gTilCh5rkzEt8WYyG//ku3h3nRmd7CHQ==} - - figures@3.2.0: - resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} - engines: {node: '>=8'} - - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - - fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} - - finalhandler@1.3.1: - resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} - engines: {node: '>= 0.8'} - - find-node-modules@2.1.3: - resolution: {integrity: sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==} - - find-root@1.1.0: - resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} - - find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - findup-sync@4.0.0: - resolution: {integrity: sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==} - engines: {node: '>= 8'} - - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - - flatted@3.3.3: - resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} - - foreground-child@3.3.1: - resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} - engines: {node: '>=14'} - - forever-agent@0.6.1: - resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - - form-data-encoder@2.1.4: - resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} - engines: {node: '>= 14.17'} - - form-data-encoder@4.0.2: - resolution: {integrity: sha512-KQVhvhK8ZkWzxKxOr56CPulAhH3dobtuQ4+hNQ+HekH/Wp5gSOafqRAeTphQUJAIk0GBvHZgJ2ZGRWd5kphMuw==} - engines: {node: '>= 18'} - - form-data@4.0.2: - resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} - engines: {node: '>= 6'} - - forwarded@0.2.0: - resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} - engines: {node: '>= 0.6'} - - fraction.js@4.3.7: - resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} - - fresh@0.5.2: - resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} - engines: {node: '>= 0.6'} - - fs-extra@11.1.1: - resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} - engines: {node: '>=14.14'} - - fs-extra@9.1.0: - resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} - engines: {node: '>=10'} - - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - - fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - - fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - - function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - - gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} - - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - get-intrinsic@1.3.0: - resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} - engines: {node: '>= 0.4'} - - get-package-type@0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} - - get-port@7.0.0: - resolution: {integrity: sha512-mDHFgApoQd+azgMdwylJrv2DX47ywGq1i5VFJE7fZ0dttNq3iQMfsU4IvEgBHojA3KqEudyu7Vq+oN8kNaNkWw==} - engines: {node: '>=16'} - - get-proto@1.0.1: - resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} - engines: {node: '>= 0.4'} - - get-stream@5.2.0: - resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} - engines: {node: '>=8'} - - get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} - - get-stream@9.0.1: - resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} - engines: {node: '>=18'} - - getos@3.2.1: - resolution: {integrity: sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==} - - getpass@0.1.7: - resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} - - glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - - glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - - glob@10.4.5: - resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} - hasBin: true - - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported - - global-directory@4.0.1: - resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} - engines: {node: '>=18'} - - global-dirs@3.0.1: - resolution: {integrity: sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==} - engines: {node: '>=10'} - - global-jsdom@24.0.0: - resolution: {integrity: sha512-CARBUWkqZ3O9VOc2PIVE5kQpdQeJh9eF9kQ7zSeNtmqx5vAFDKMr9XnDt1epVMMrz1s9uK/yFCa4HLwpa6TcPA==} - engines: {node: '>=18'} - peerDependencies: - jsdom: '>=24 <25' - - global-modules@1.0.0: - resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} - engines: {node: '>=0.10.0'} - - global-prefix@1.0.2: - resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==} - engines: {node: '>=0.10.0'} - - globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - - globals@15.15.0: - resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} - engines: {node: '>=18'} - - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - - gopd@1.2.0: - resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} - engines: {node: '>= 0.4'} - - got@13.0.0: - resolution: {integrity: sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA==} - engines: {node: '>=16'} - - got@14.4.5: - resolution: {integrity: sha512-sq+uET8TnNKRNnjEOPJzMcxeI0irT8BBNmf+GtZcJpmhYsQM1DSKmCROUjPWKsXZ5HzwD5Cf5/RV+QD9BSTxJg==} - engines: {node: '>=20'} - - graceful-fs@4.2.10: - resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} - - graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - - graphql-import-macro@1.0.0: - resolution: {integrity: sha512-YK4g6iP60H++MpP93tb0VwOg7aM5iIC0hdSQKTrEDANeLWf0KFAT9dwlBeMDrhY+jcW7qsAEDtaw58cgVnQXAw==} - - graphql@15.10.1: - resolution: {integrity: sha512-BL/Xd/T9baO6NFzoMpiMD7YUZ62R6viR5tp/MULVEnbYJXZA//kRNW7J0j1w/wXArgL0sCxhDfK5dczSKn3+cg==} - engines: {node: '>= 10.x'} - - has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - has-symbols@1.1.0: - resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} - engines: {node: '>= 0.4'} - - has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} - engines: {node: '>= 0.4'} - - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} - engines: {node: '>= 0.4'} - - homedir-polyfill@1.0.3: - resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} - engines: {node: '>=0.10.0'} - - html-encoding-sniffer@3.0.0: - resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} - engines: {node: '>=12'} - - html-encoding-sniffer@4.0.0: - resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} - engines: {node: '>=18'} - - html-escaper@2.0.2: - resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - - htmlnano@2.1.1: - resolution: {integrity: sha512-kAERyg/LuNZYmdqgCdYvugyLWNFAm8MWXpQMz1pLpetmCbFwoMxvkSoaAMlFrOC4OKTWI4KlZGT/RsNxg4ghOw==} - peerDependencies: - cssnano: ^7.0.0 - postcss: ^8.3.11 - purgecss: ^6.0.0 - relateurl: ^0.2.7 - srcset: 5.0.1 - svgo: ^3.0.2 - terser: ^5.10.0 - uncss: ^0.17.3 - peerDependenciesMeta: - cssnano: - optional: true - postcss: - optional: true - purgecss: - optional: true - relateurl: - optional: true - srcset: - optional: true - svgo: - optional: true - terser: - optional: true - uncss: - optional: true - - htmlparser2@7.2.0: - resolution: {integrity: sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==} - - http-cache-semantics@4.1.1: - resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} - - http-errors@2.0.0: - resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} - engines: {node: '>= 0.8'} - - http-proxy-agent@5.0.0: - resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} - engines: {node: '>= 6'} - - http-proxy-agent@7.0.2: - resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} - engines: {node: '>= 14'} - - http-signature@1.4.0: - resolution: {integrity: sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==} - engines: {node: '>=0.10'} - - http2-wrapper@2.2.1: - resolution: {integrity: sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==} - engines: {node: '>=10.19.0'} - - https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - - https-proxy-agent@7.0.6: - resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} - engines: {node: '>= 14'} - - human-signals@1.1.1: - resolution: {integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==} - engines: {node: '>=8.12.0'} - - human-signals@2.1.0: - resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} - engines: {node: '>=10.17.0'} - - husky@9.1.7: - resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} - engines: {node: '>=18'} - hasBin: true - - iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - - iconv-lite@0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} - engines: {node: '>=0.10.0'} - - ieee754@1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - - ignore-by-default@1.0.1: - resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} - - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} - - ignore@7.0.3: - resolution: {integrity: sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==} - engines: {node: '>= 4'} - - image-size@0.5.5: - resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} - engines: {node: '>=0.10.0'} - hasBin: true - - immutable@5.1.1: - resolution: {integrity: sha512-3jatXi9ObIsPGr3N5hGw/vWWcTkq6hUYhpQz4k0wLC+owqWi/LiugIw9x0EdNZ2yGedKN/HzePiBvaJRXa0Ujg==} - - import-fresh@3.3.1: - resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} - engines: {node: '>=6'} - - import-local@3.2.0: - resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} - engines: {node: '>=8'} - hasBin: true - - import-meta-resolve@4.1.0: - resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} - - imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - - indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} - - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - ini@1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - - ini@2.0.0: - resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} - engines: {node: '>=10'} - - ini@4.1.1: - resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - - inquirer@12.4.1: - resolution: {integrity: sha512-/V7OyFkeUBFO2jAokUq5emSlcVMHVvzg8bwwZnzmCwErPgbeftsthmPUg71AIi5mR0YmiJOLQ+bTiHVWEjOw7A==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - inquirer@8.2.5: - resolution: {integrity: sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==} - engines: {node: '>=12.0.0'} - - ipaddr.js@1.9.1: - resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} - engines: {node: '>= 0.10'} - - is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - - is-arrayish@0.3.2: - resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - - is-core-module@2.16.1: - resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} - engines: {node: '>= 0.4'} - - is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-generator-fn@2.1.0: - resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} - engines: {node: '>=6'} - - is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - - is-installed-globally@0.4.0: - resolution: {integrity: sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==} - engines: {node: '>=10'} - - is-interactive@1.0.0: - resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} - engines: {node: '>=8'} - - is-json@2.0.1: - resolution: {integrity: sha512-6BEnpVn1rcf3ngfmViLM6vjUjGErbdrL4rwlv+u1NO1XO8kqT4YGL8+19Q+Z/bas8tY90BTWMk2+fW1g6hQjbA==} - - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - is-path-inside@4.0.0: - resolution: {integrity: sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==} - engines: {node: '>=12'} - - is-potential-custom-element-name@1.0.1: - resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - - is-reference@3.0.3: - resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} - - is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} - - is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - is-stream@4.0.1: - resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} - engines: {node: '>=18'} - - is-typedarray@1.0.0: - resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} - - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - - is-utf8@0.2.1: - resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} - - is-what@3.14.1: - resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==} - - is-windows@1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} - - isbinaryfile@4.0.10: - resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} - engines: {node: '>= 8.0.0'} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - isstream@0.1.2: - resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} - - istanbul-lib-coverage@3.2.2: - resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} - engines: {node: '>=8'} - - istanbul-lib-instrument@5.2.1: - resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} - engines: {node: '>=8'} - - istanbul-lib-instrument@6.0.3: - resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} - engines: {node: '>=10'} - - istanbul-lib-report@3.0.1: - resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} - engines: {node: '>=10'} - - istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} - - istanbul-reports@3.1.7: - resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} - engines: {node: '>=8'} - - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - - jest-changed-files@29.7.0: - resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-circus@29.7.0: - resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-cli@29.7.0: - resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - - jest-config@29.7.0: - resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true - - jest-diff@29.7.0: - resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-docblock@29.7.0: - resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-each@29.7.0: - resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-environment-jsdom@29.7.0: - resolution: {integrity: sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - - jest-environment-node@29.7.0: - resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-get-type@29.6.3: - resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-haste-map@29.7.0: - resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-leak-detector@29.7.0: - resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-matcher-utils@29.7.0: - resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-message-util@29.7.0: - resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-mock@29.7.0: - resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-pnp-resolver@1.2.3: - resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} - engines: {node: '>=6'} - peerDependencies: - jest-resolve: '*' - peerDependenciesMeta: - jest-resolve: - optional: true - - jest-regex-util@29.6.3: - resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-resolve-dependencies@29.7.0: - resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-resolve@29.7.0: - resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-runner@29.7.0: - resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-runtime@29.7.0: - resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-snapshot@29.7.0: - resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-util@29.7.0: - resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-validate@29.7.0: - resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-watcher@29.7.0: - resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-worker@29.7.0: - resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest@29.7.0: - resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - - jiti@1.21.7: - resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==} - hasBin: true - - jiti@2.4.2: - resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} - hasBin: true - - joycon@3.1.1: - resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} - engines: {node: '>=10'} - - js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - - js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true - - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - - jsbn@0.1.1: - resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} - - jsdom@20.0.3: - resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} - engines: {node: '>=14'} - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - - jsdom@24.1.3: - resolution: {integrity: sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ==} - engines: {node: '>=18'} - peerDependencies: - canvas: ^2.11.2 - peerDependenciesMeta: - canvas: - optional: true - - jsesc@3.1.0: - resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} - engines: {node: '>=6'} - hasBin: true - - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - - json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - - json-schema-to-ts@3.1.1: - resolution: {integrity: sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==} - engines: {node: '>=16'} - - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - - json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - - json-schema@0.4.0: - resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - - json-stringify-safe@5.0.1: - resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} - - json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true - - jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - - jsonschema@1.5.0: - resolution: {integrity: sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw==} - - jsprim@2.0.2: - resolution: {integrity: sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==} - engines: {'0': node >=0.6.0} - - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - - kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - - ky@1.8.1: - resolution: {integrity: sha512-7Bp3TpsE+L+TARSnnDpk3xg8Idi8RwSLdj6CMbNWoOARIrGrbuLGusV0dYwbZOm4bB3jHNxSw8Wk/ByDqJEnDw==} - engines: {node: '>=18'} - - lazy-ass@1.6.0: - resolution: {integrity: sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==} - engines: {node: '> 0.8'} - - less@4.3.0: - resolution: {integrity: sha512-X9RyH9fvemArzfdP8Pi3irr7lor2Ok4rOttDXBhlwDg+wKQsXOXgHWduAJE1EsF7JJx0w0bcO6BC6tCKKYnXKA==} - engines: {node: '>=14'} - hasBin: true - - leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} - - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - - lightningcss-darwin-arm64@1.21.8: - resolution: {integrity: sha512-BOMoGfcgkk2f4ltzsJqmkjiqRtlZUK+UdwhR+P6VgIsnpQBV3G01mlL6GzYxYqxq+6/3/n/D+4oy2NeknmADZw==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [darwin] - - lightningcss-darwin-arm64@1.29.3: - resolution: {integrity: sha512-fb7raKO3pXtlNbQbiMeEu8RbBVHnpyqAoxTyTRMEWFQWmscGC2wZxoHzZ+YKAepUuKT9uIW5vL2QbFivTgprZg==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [darwin] - - lightningcss-darwin-x64@1.21.8: - resolution: {integrity: sha512-YhF64mcVDPKKufL4aNFBnVH7uvzE0bW3YUsPXdP4yUcT/8IXChypOZ/PE1pmt2RlbmsyVuuIIeZU4zTyZe5Amw==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [darwin] - - lightningcss-darwin-x64@1.29.3: - resolution: {integrity: sha512-KF2XZ4ZdmDGGtEYmx5wpzn6u8vg7AdBHaEOvDKu8GOs7xDL/vcU2vMKtTeNe1d4dogkDdi3B9zC77jkatWBwEQ==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [darwin] - - lightningcss-freebsd-x64@1.21.8: - resolution: {integrity: sha512-CV6A/vTG2Ryd3YpChEgfWWv4TXCAETo9TcHSNx0IP0dnKcnDEiAko4PIKhCqZL11IGdN1ZLBCVPw+vw5ZYwzfA==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [freebsd] - - lightningcss-freebsd-x64@1.29.3: - resolution: {integrity: sha512-VUWeVf+V1UM54jv9M4wen9vMlIAyT69Krl9XjI8SsRxz4tdNV/7QEPlW6JASev/pYdiynUCW0pwaFquDRYdxMw==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [freebsd] - - lightningcss-linux-arm-gnueabihf@1.21.8: - resolution: {integrity: sha512-9PMbqh8n/Xq0F4/j2NR/hHM2HRDiFXFSF0iOvV67pNWKJkHIO6mR8jBw/88Aro5Ye/ILsX5OuWsxIVJDFv0NXA==} - engines: {node: '>= 12.0.0'} - cpu: [arm] - os: [linux] - - lightningcss-linux-arm-gnueabihf@1.29.3: - resolution: {integrity: sha512-UhgZ/XVNfXQVEJrMIWeK1Laj8KbhjbIz7F4znUk7G4zeGw7TRoJxhb66uWrEsonn1+O45w//0i0Fu0wIovYdYg==} - engines: {node: '>= 12.0.0'} - cpu: [arm] - os: [linux] - - lightningcss-linux-arm64-gnu@1.21.8: - resolution: {integrity: sha512-JTM/TuMMllkzaXV7/eDjG4IJKLlCl+RfYZwtsVmC82gc0QX0O37csGAcY2OGleiuA4DnEo/Qea5WoFfZUNC6zg==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - - lightningcss-linux-arm64-gnu@1.29.3: - resolution: {integrity: sha512-Pqau7jtgJNmQ/esugfmAT1aCFy/Gxc92FOxI+3n+LbMHBheBnk41xHDhc0HeYlx9G0xP5tK4t0Koy3QGGNqypw==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - - lightningcss-linux-arm64-musl@1.21.8: - resolution: {integrity: sha512-01gWShXrgoIb8urzShpn1RWtZuaSyKSzF2hfO+flzlTPoACqcO3rgcu/3af4Cw54e8vKzL5hPRo4kROmgaOMLg==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - - lightningcss-linux-arm64-musl@1.29.3: - resolution: {integrity: sha512-dxakOk66pf7KLS7VRYFO7B8WOJLecE5OPL2YOk52eriFd/yeyxt2Km5H0BjLfElokIaR+qWi33gB8MQLrdAY3A==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - - lightningcss-linux-x64-gnu@1.21.8: - resolution: {integrity: sha512-yVB5vYJjJb/Aku0V9QaGYIntvK/1TJOlNB9GmkNpXX5bSSP2pYW4lWW97jxFMHO908M0zjEt1qyOLMyqojHL+Q==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - - lightningcss-linux-x64-gnu@1.29.3: - resolution: {integrity: sha512-ySZTNCpbfbK8rqpKJeJR2S0g/8UqqV3QnzcuWvpI60LWxnFN91nxpSSwCbzfOXkzKfar9j5eOuOplf+klKtINg==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - - lightningcss-linux-x64-musl@1.21.8: - resolution: {integrity: sha512-TYi+KNtBVK0+FZvxTX/d5XJb+tw3Jq+2Rr9hW359wp1afsi1Vkg+uVGgbn+m2dipa5XwpCseQq81ylMlXuyfPw==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - - lightningcss-linux-x64-musl@1.29.3: - resolution: {integrity: sha512-3pVZhIzW09nzi10usAXfIGTTSTYQ141dk88vGFNCgawIzayiIzZQxEcxVtIkdvlEq2YuFsL9Wcj/h61JHHzuFQ==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - - lightningcss-win32-arm64-msvc@1.29.3: - resolution: {integrity: sha512-VRnkAvtIkeWuoBJeGOTrZxsNp4HogXtcaaLm8agmbYtLDOhQdpgxW6NjZZjDXbvGF+eOehGulXZ3C1TiwHY4QQ==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [win32] - - lightningcss-win32-x64-msvc@1.21.8: - resolution: {integrity: sha512-mww+kqbPx0/C44l2LEloECtRUuOFDjq9ftp+EHTPiCp2t+avy0sh8MaFwGsrKkj2XfZhaRhi4CPVKBoqF1Qlwg==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [win32] - - lightningcss-win32-x64-msvc@1.29.3: - resolution: {integrity: sha512-IszwRPu2cPnDQsZpd7/EAr0x2W7jkaWqQ1SwCVIZ/tSbZVXPLt6k8s6FkcyBjViCzvB5CW0We0QbbP7zp2aBjQ==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [win32] - - lightningcss@1.21.8: - resolution: {integrity: sha512-jEqaL7m/ZckZJjlMAfycr1Kpz7f93k6n7KGF5SJjuPSm6DWI6h3ayLZmgRHgy1OfrwoCed6h4C/gHYPOd1OFMA==} - engines: {node: '>= 12.0.0'} - - lightningcss@1.29.3: - resolution: {integrity: sha512-GlOJwTIP6TMIlrTFsxTerwC0W6OpQpCGuX1ECRLBUVRh6fpJH3xTqjCjRgQHTb4ZXexH9rtHou1Lf03GKzmhhQ==} - engines: {node: '>= 12.0.0'} - - lilconfig@2.1.0: - resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} - engines: {node: '>=10'} - - lilconfig@3.1.3: - resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} - engines: {node: '>=14'} - - lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - - listr2@3.14.0: - resolution: {integrity: sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==} - engines: {node: '>=10.0.0'} - peerDependencies: - enquirer: '>= 2.3.0 < 3' - peerDependenciesMeta: - enquirer: - optional: true - - lmdb@2.5.2: - resolution: {integrity: sha512-V5V5Xa2Hp9i2XsbDALkBTeHXnBXh/lEmk9p22zdr7jtuOIY9TGhjK6vAvTpOOx9IKU4hJkRWZxn/HsvR1ELLtA==} - - lmdb@2.7.11: - resolution: {integrity: sha512-x9bD4hVp7PFLUoELL8RglbNXhAMt5CYhkmss+CEau9KlNoilsTzNi9QDsPZb3KMpOGZXG6jmXhW3bBxE2XVztw==} - hasBin: true - - load-tsconfig@0.2.5: - resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - locate-character@3.0.0: - resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} - - locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - lodash.isplainobject@4.0.6: - resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} - - lodash.map@4.6.0: - resolution: {integrity: sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==} - - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - - lodash.mergewith@4.6.2: - resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} - - lodash.once@4.1.1: - resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} - - lodash.sortby@4.7.0: - resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} - - lodash.uniq@4.5.0: - resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} - - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - - log-update@4.0.0: - resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} - engines: {node: '>=10'} - - longest@2.0.1: - resolution: {integrity: sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==} - engines: {node: '>=0.10.0'} - - loose-envify@1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - - lowercase-keys@3.0.0: - resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - - lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - - lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - - magic-string@0.30.17: - resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} - - make-dir@2.1.0: - resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} - engines: {node: '>=6'} - - make-dir@4.0.0: - resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} - engines: {node: '>=10'} - - make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - - makeerror@1.0.12: - resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} - - math-intrinsics@1.1.0: - resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} - engines: {node: '>= 0.4'} - - mdn-data@2.0.14: - resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} - - mdn-data@2.0.30: - resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - - media-typer@0.3.0: - resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} - engines: {node: '>= 0.6'} - - merge-descriptors@1.0.3: - resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} - - merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - - merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - - merge@2.1.1: - resolution: {integrity: sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==} - - methods@1.1.2: - resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} - engines: {node: '>= 0.6'} - - micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} - - mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - - mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - - mime@1.6.0: - resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} - engines: {node: '>=4'} - hasBin: true - - mime@2.6.0: - resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} - engines: {node: '>=4.0.0'} - hasBin: true - - mimic-fn@2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} - engines: {node: '>=6'} - - mimic-response@3.1.0: - resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} - engines: {node: '>=10'} - - mimic-response@4.0.0: - resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} - - minimist@1.2.7: - resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} - - minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - - minipass@7.1.2: - resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} - engines: {node: '>=16 || 14 >=14.17'} - - mnemonic-id@3.2.7: - resolution: {integrity: sha512-kysx9gAGbvrzuFYxKkcRjnsg/NK61ovJOV4F1cHTRl9T5leg+bo6WI0pWIvOFh1Z/yDL0cjA5R3EEGPPLDv/XA==} - - ms@2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - msgpackr-extract@3.0.3: - resolution: {integrity: sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==} - hasBin: true - - msgpackr@1.11.2: - resolution: {integrity: sha512-F9UngXRlPyWCDEASDpTf6c9uNhGPTqnTeLVt7bN+bU1eajoR/8V9ys2BRaV5C/e5ihE6sJ9uPIKaYt6bFuO32g==} - - msgpackr@1.8.5: - resolution: {integrity: sha512-mpPs3qqTug6ahbblkThoUY2DQdNXcm4IapwOS3Vm/87vmpzLVelvp9h3It1y9l1VPpiFLV11vfOXnmeEwiIXwg==} - - mute-stream@0.0.8: - resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} - - mute-stream@2.0.0: - resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} - engines: {node: ^18.17.0 || >=20.5.0} - - mz@2.7.0: - resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - - nanoid@3.3.11: - resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - - nanoid@5.0.3: - resolution: {integrity: sha512-I7X2b22cxA4LIHXPSqbBCEQSL+1wv8TuoefejsX4HFWyC6jc5JG7CEaxOltiKjc1M+YCS2YkrZZcj4+dytw9GA==} - engines: {node: ^18 || >=20} - hasBin: true - - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - - needle@3.3.1: - resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==} - engines: {node: '>= 4.4.x'} - hasBin: true - - negotiator@0.6.3: - resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} - engines: {node: '>= 0.6'} - - node-addon-api@4.3.0: - resolution: {integrity: sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==} - - node-addon-api@7.1.1: - resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} - - node-gyp-build-optional-packages@5.0.3: - resolution: {integrity: sha512-k75jcVzk5wnnc/FMxsf4udAoTEUv2jY3ycfdSd3yWu6Cnd1oee6/CfZJApyscA4FJOmdoixWwiwOyf16RzD5JA==} - hasBin: true - - node-gyp-build-optional-packages@5.0.6: - resolution: {integrity: sha512-2ZJErHG4du9G3/8IWl/l9Bp5BBFy63rno5GVmjQijvTuUZKsl6g8RB4KH/x3NLcV5ZBb4GsXmAuTYr6dRml3Gw==} - hasBin: true - - node-gyp-build-optional-packages@5.2.2: - resolution: {integrity: sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==} - hasBin: true - - node-int64@0.4.0: - resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - - node-object-hash@3.0.0: - resolution: {integrity: sha512-jLF6tlyletktvSAawuPmH1SReP0YfZQ+tBrDiTCK+Ai7eXPMS9odi5xW/iKC7ZhrWJJ0Z5xYcW/x+1fVMn1Qvw==} - engines: {node: '>=16', pnpm: '>=8'} - - node-releases@2.0.19: - resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} - - nodemon@3.1.10: - resolution: {integrity: sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==} - engines: {node: '>=10'} - hasBin: true - - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - - normalize-range@0.1.2: - resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} - engines: {node: '>=0.10.0'} - - normalize-url@8.0.1: - resolution: {integrity: sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==} - engines: {node: '>=14.16'} - - npm-run-path@4.0.1: - resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} - engines: {node: '>=8'} - - nth-check@2.1.1: - resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - - nullthrows@1.1.1: - resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==} - - nwsapi@2.2.20: - resolution: {integrity: sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==} - - object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - - object-hash@3.0.0: - resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} - engines: {node: '>= 6'} - - object-inspect@1.13.4: - resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} - engines: {node: '>= 0.4'} - - on-finished@2.4.1: - resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} - engines: {node: '>= 0.8'} - - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - - onetime@5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} - - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - - ora@5.4.1: - resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} - engines: {node: '>=10'} - - ordered-binary@1.5.3: - resolution: {integrity: sha512-oGFr3T+pYdTGJ+YFEILMpS3es+GiIbs9h/XQrclBXUtd44ey7XwfsMzM31f64I1SQOawDoDr/D823kNCADI8TA==} - - os-tmpdir@1.0.2: - resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} - engines: {node: '>=0.10.0'} - - ospath@1.2.2: - resolution: {integrity: sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==} - - p-cancelable@3.0.0: - resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} - engines: {node: '>=12.20'} - - p-cancelable@4.0.1: - resolution: {integrity: sha512-wBowNApzd45EIKdO1LaU+LrMBwAcjfPaYtVzV3lmfM3gf8Z4CHZsiIqlM8TZZ8okYvh5A1cP6gTfCRQtwUpaUg==} - engines: {node: '>=14.16'} - - p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - - p-map@4.0.0: - resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} - engines: {node: '>=10'} - - p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - - package-json@10.0.1: - resolution: {integrity: sha512-ua1L4OgXSBdsu1FPb7F3tYH0F48a6kxvod4pLUlGY9COeJAJQNX/sNH2IiEmsxw7lqYiAwrdHMjz1FctOsyDQg==} - engines: {node: '>=18'} - - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - - parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - - parse-node-version@1.0.1: - resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} - engines: {node: '>= 0.10'} - - parse-passwd@1.0.0: - resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} - engines: {node: '>=0.10.0'} - - parse5@7.3.0: - resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} - - parseurl@1.3.3: - resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} - engines: {node: '>= 0.8'} - - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - - path-to-regexp@0.1.12: - resolution: {integrity: sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==} - - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - - pend@1.2.0: - resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} - - performance-now@2.1.0: - resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} - - periscopic@3.1.0: - resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - - pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - - pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - - pirates@4.0.7: - resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} - engines: {node: '>= 6'} - - pkce-challenge@5.0.0: - resolution: {integrity: sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==} - engines: {node: '>=16.20.0'} - - pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} - - plasmo@0.90.3: - resolution: {integrity: sha512-m8OlsFZQRbce/CBfbhGr8UD5XrTJFvp8kGlSu/KYJpsJd19I8fLc4JW+Xxyo1ve3UJFgC88COCXKeecP1Z0EPQ==} - hasBin: true - - playwright-core@1.52.0: - resolution: {integrity: sha512-l2osTgLXSMeuLZOML9qYODUQoPPnUsKsb5/P6LJ2e6uPKXUdPK5WYhN4z03G+YNbWmGDY4YENauNu4ZKczreHg==} - engines: {node: '>=18'} - hasBin: true - - playwright@1.52.0: - resolution: {integrity: sha512-JAwMNMBlxJ2oD1kce4KPtMkDeKGHQstdpFPcPH3maElAXon/QZeTvtsfXmTMRyO9TslfoYOXkSsvao2nE1ilTw==} - engines: {node: '>=18'} - hasBin: true - - pnpm@10.10.0: - resolution: {integrity: sha512-1hXbJG/nDyXc/qbY1z3ueCziPiJF48T2+Igkn7VoFJMYY33Kc8LFyO8qTKDVZX+5VnGIv6tH9WbR7mzph4FcOQ==} - engines: {node: '>=18.12'} - hasBin: true - - postcss-import@15.1.0: - resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} - engines: {node: '>=14.0.0'} - peerDependencies: - postcss: ^8.0.0 - - postcss-js@4.0.1: - resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} - engines: {node: ^12 || ^14 || >= 16} - peerDependencies: - postcss: ^8.4.21 - - postcss-load-config@3.1.4: - resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} - engines: {node: '>= 10'} - peerDependencies: - postcss: '>=8.0.9' - ts-node: '>=9.0.0' - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - - postcss-load-config@4.0.2: - resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} - engines: {node: '>= 14'} - peerDependencies: - postcss: '>=8.0.9' - ts-node: '>=9.0.0' - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - - postcss-nested@6.2.0: - resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==} - engines: {node: '>=12.0'} - peerDependencies: - postcss: ^8.2.14 - - postcss-selector-parser@6.1.2: - resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} - engines: {node: '>=4'} - - postcss-value-parser@4.2.0: - resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - - postcss@8.5.3: - resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} - engines: {node: ^10 || ^12 || >=14} - - posthtml-parser@0.10.2: - resolution: {integrity: sha512-PId6zZ/2lyJi9LiKfe+i2xv57oEjJgWbsHGGANwos5AvdQp98i6AtamAl8gzSVFGfQ43Glb5D614cvZf012VKg==} - engines: {node: '>=12'} - - posthtml-parser@0.11.0: - resolution: {integrity: sha512-QecJtfLekJbWVo/dMAA+OSwY79wpRmbqS5TeXvXSX+f0c6pW4/SE6inzZ2qkU7oAMCPqIDkZDvd/bQsSFUnKyw==} - engines: {node: '>=12'} - - posthtml-render@3.0.0: - resolution: {integrity: sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==} - engines: {node: '>=12'} - - posthtml@0.16.6: - resolution: {integrity: sha512-JcEmHlyLK/o0uGAlj65vgg+7LIms0xKXe60lcDOTU7oVX/3LuEuLwrQpW3VJ7de5TaFKiW4kWkaIpJL42FEgxQ==} - engines: {node: '>=12.0.0'} - - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier@3.2.4: - resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==} - engines: {node: '>=14'} - hasBin: true - - prettier@3.5.3: - resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} - engines: {node: '>=14'} - hasBin: true - - pretty-bytes@5.6.0: - resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} - engines: {node: '>=6'} - - pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - process@0.11.10: - resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} - engines: {node: '>= 0.6.0'} - - prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - - proto-list@1.2.4: - resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} - - proxy-addr@2.0.7: - resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} - engines: {node: '>= 0.10'} - - proxy-from-env@1.0.0: - resolution: {integrity: sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==} - - prr@1.0.1: - resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} - - psl@1.15.0: - resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} - - pstree.remy@1.1.8: - resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} - - pump@3.0.2: - resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} - - punycode@2.3.1: - resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} - engines: {node: '>=6'} - - pure-rand@6.1.0: - resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} - - qs@6.13.0: - resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} - engines: {node: '>=0.6'} - - qs@6.14.0: - resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} - engines: {node: '>=0.6'} - - querystringify@2.2.0: - resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - - queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - - quick-lru@5.1.1: - resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} - engines: {node: '>=10'} - - range-parser@1.2.1: - resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} - engines: {node: '>= 0.6'} - - raw-body@2.5.2: - resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} - engines: {node: '>= 0.8'} - - rc@1.2.8: - resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} - hasBin: true - - react-dom@18.2.0: - resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} - peerDependencies: - react: ^18.2.0 - - react-error-overlay@6.0.9: - resolution: {integrity: sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==} - - react-is@18.3.1: - resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} - - react-refresh@0.14.0: - resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} - engines: {node: '>=0.10.0'} - - react-refresh@0.9.0: - resolution: {integrity: sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ==} - engines: {node: '>=0.10.0'} - - react@18.2.0: - resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} - engines: {node: '>=0.10.0'} - - read-cache@1.0.0: - resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} - - readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} - - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - - readdirp@4.1.2: - resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} - engines: {node: '>= 14.18.0'} - - regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} - - regenerator-runtime@0.14.1: - resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - - registry-auth-token@5.1.0: - resolution: {integrity: sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw==} - engines: {node: '>=14'} - - registry-url@6.0.1: - resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} - engines: {node: '>=12'} - - request-progress@3.0.0: - resolution: {integrity: sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - - requires-port@1.0.0: - resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - - resolve-alpn@1.2.1: - resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} - - resolve-cwd@3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} - - resolve-dir@1.0.1: - resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==} - engines: {node: '>=0.10.0'} - - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - - resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - - resolve.exports@2.0.3: - resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} - engines: {node: '>=10'} - - resolve@1.22.10: - resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} - engines: {node: '>= 0.4'} - hasBin: true - - responselike@3.0.0: - resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==} - engines: {node: '>=14.16'} - - restore-cursor@3.1.0: - resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} - engines: {node: '>=8'} - - reusify@1.1.0: - resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - - rfdc@1.4.1: - resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - - rollup@2.79.2: - resolution: {integrity: sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==} - engines: {node: '>=10.0.0'} - hasBin: true - - rollup@3.29.5: - resolution: {integrity: sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==} - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - hasBin: true - - rrweb-cssom@0.7.1: - resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==} - - rrweb-cssom@0.8.0: - resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} - - run-async@2.4.1: - resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} - engines: {node: '>=0.12.0'} - - run-async@3.0.0: - resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} - engines: {node: '>=0.12.0'} - - run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - - rxjs@7.8.2: - resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} - - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - - sass@1.87.0: - resolution: {integrity: sha512-d0NoFH4v6SjEK7BoX810Jsrhj7IQSYHAHLi/iSpgqKc7LaIDshFRlSg5LOymf9FqQhxEHs2W5ZQXlvy0KD45Uw==} - engines: {node: '>=14.0.0'} - hasBin: true - - sax@1.4.1: - resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} - - saxes@6.0.0: - resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} - engines: {node: '>=v12.22.7'} - - scheduler@0.23.2: - resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} - - semver@5.7.2: - resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} - hasBin: true - - semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true - - semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} - engines: {node: '>=10'} - hasBin: true - - semver@7.7.1: - resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} - engines: {node: '>=10'} - hasBin: true - - send@0.19.0: - resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} - engines: {node: '>= 0.8.0'} - - serve-static@1.16.2: - resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} - engines: {node: '>= 0.8.0'} - - setprototypeof@1.2.0: - resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - - sharp@0.33.5: - resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - side-channel-list@1.0.0: - resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} - engines: {node: '>= 0.4'} - - side-channel-map@1.0.1: - resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} - engines: {node: '>= 0.4'} - - side-channel-weakmap@1.0.2: - resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} - engines: {node: '>= 0.4'} - - side-channel@1.1.0: - resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} - engines: {node: '>= 0.4'} - - signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - - simple-swizzle@0.2.2: - resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} - - simple-update-notifier@2.0.0: - resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} - engines: {node: '>=10'} - - sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - - slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - - slice-ansi@3.0.0: - resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} - engines: {node: '>=8'} - - slice-ansi@4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} - - source-map-js@1.2.1: - resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} - engines: {node: '>=0.10.0'} - - source-map-support@0.5.13: - resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} - - source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - - source-map@0.8.0-beta.0: - resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} - engines: {node: '>= 8'} - - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - - srcset@4.0.0: - resolution: {integrity: sha512-wvLeHgcVHKO8Sc/H/5lkGreJQVeYMm9rlmt8PuR1xE31rIuXhuzznUUqAt8MqLhB3MqJdFzlNAfpcWnxiFUcPw==} - engines: {node: '>=12'} - - sshpk@1.18.0: - resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==} - engines: {node: '>=0.10.0'} - hasBin: true - - stable@0.1.8: - resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} - deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' - - stack-utils@2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} - - statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} - engines: {node: '>= 0.8'} - - string-length@4.0.2: - resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} - engines: {node: '>=10'} - - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - - string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} - engines: {node: '>=12'} - - strip-bom@4.0.0: - resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} - engines: {node: '>=8'} - - strip-final-newline@2.0.0: - resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} - engines: {node: '>=6'} - - strip-json-comments@2.0.1: - resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} - engines: {node: '>=0.10.0'} - - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - sucrase@3.35.0: - resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} - engines: {node: '>=16 || 14 >=14.17'} - hasBin: true - - supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - - supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - - svelte@4.2.2: - resolution: {integrity: sha512-My2tytF2e2NnHSpn2M7/3VdXT4JdTglYVUuSuK/mXL2XtulPYbeBfl8Dm1QiaKRn0zoULRnL+EtfZHHP0k4H3A==} - engines: {node: '>=16'} - - svg-parser@2.0.4: - resolution: {integrity: sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==} - - svgo@2.8.0: - resolution: {integrity: sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==} - engines: {node: '>=10.13.0'} - hasBin: true - - symbol-tree@3.2.4: - resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - - tailwindcss@3.4.17: - resolution: {integrity: sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==} - engines: {node: '>=14.0.0'} - hasBin: true - - temp-dir@3.0.0: - resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} - engines: {node: '>=14.16'} - - tempy@3.1.0: - resolution: {integrity: sha512-7jDLIdD2Zp0bDe5r3D2qtkd1QOCacylBuL7oa4udvN6v2pqr4+LcCr67C8DR1zkpaZ8XosF5m1yQSabKAW6f2g==} - engines: {node: '>=14.16'} - - test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} - - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - - thenify-all@1.6.0: - resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} - engines: {node: '>=0.8'} - - thenify@3.3.1: - resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - - throttleit@1.0.1: - resolution: {integrity: sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==} - - through@2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - - timsort@0.3.0: - resolution: {integrity: sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==} - - tldts-core@6.1.86: - resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} - - tldts@6.1.86: - resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} - hasBin: true - - tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} - - tmp@0.2.3: - resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} - engines: {node: '>=14.14'} - - tmpl@1.0.5: - resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} - - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - - toidentifier@1.0.1: - resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} - engines: {node: '>=0.6'} - - touch@3.1.1: - resolution: {integrity: sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==} - hasBin: true - - tough-cookie@4.1.4: - resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} - engines: {node: '>=6'} - - tough-cookie@5.1.2: - resolution: {integrity: sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==} - engines: {node: '>=16'} - - tr46@1.0.1: - resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} - - tr46@3.0.0: - resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} - engines: {node: '>=12'} - - tr46@5.1.1: - resolution: {integrity: sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==} - engines: {node: '>=18'} - - tree-kill@1.2.2: - resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} - hasBin: true - - ts-algebra@2.0.0: - resolution: {integrity: sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==} - - ts-api-utils@1.4.3: - resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - - ts-interface-checker@0.1.13: - resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - - ts-node@10.9.2: - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - - tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - - tsup@5.12.9: - resolution: {integrity: sha512-dUpuouWZYe40lLufo64qEhDpIDsWhRbr2expv5dHEMjwqeKJS2aXA/FPqs1dxO4T6mBojo7rvo3jP9NNzaKyDg==} - hasBin: true - peerDependencies: - '@swc/core': ^1 - postcss: ^8.4.12 - typescript: ^4.1.0 - peerDependenciesMeta: - '@swc/core': - optional: true - postcss: - optional: true - typescript: - optional: true - - tsup@7.2.0: - resolution: {integrity: sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==} - engines: {node: '>=16.14'} - hasBin: true - peerDependencies: - '@swc/core': ^1 - postcss: ^8.4.12 - typescript: '>=4.1.0' - peerDependenciesMeta: - '@swc/core': - optional: true - postcss: - optional: true - typescript: - optional: true - - tunnel-agent@0.6.0: - resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} - - tweetnacl@0.14.5: - resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} - - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - - type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - - type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} - - type-fest@1.4.0: - resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} - engines: {node: '>=10'} - - type-fest@2.19.0: - resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} - engines: {node: '>=12.20'} - - type-fest@4.40.1: - resolution: {integrity: sha512-9YvLNnORDpI+vghLU/Nf+zSv0kL47KbVJ1o3sKgoTefl6i+zebxbiDQWoe/oWWqPhIgQdRZRT1KA9sCPL810SA==} - engines: {node: '>=16'} - - type-is@1.6.18: - resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} - engines: {node: '>= 0.6'} - - typescript-eslint@7.18.0: - resolution: {integrity: sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - typescript@5.2.2: - resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} - engines: {node: '>=14.17'} - hasBin: true - - typescript@5.3.3: - resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} - engines: {node: '>=14.17'} - hasBin: true - - typescript@5.8.3: - resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} - engines: {node: '>=14.17'} - hasBin: true - - undefsafe@2.0.5: - resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} - - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - - unique-string@3.0.0: - resolution: {integrity: sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==} - engines: {node: '>=12'} - - universalify@0.2.0: - resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} - engines: {node: '>= 4.0.0'} - - universalify@2.0.1: - resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} - engines: {node: '>= 10.0.0'} - - unpipe@1.0.0: - resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} - engines: {node: '>= 0.8'} - - untildify@4.0.0: - resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} - engines: {node: '>=8'} - - update-browserslist-db@1.1.3: - resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - - url-parse@1.5.10: - resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} - - util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - - utility-types@3.11.0: - resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==} - engines: {node: '>= 4'} - - utils-merge@1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} - engines: {node: '>= 0.4.0'} - - uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - - v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - - v8-to-istanbul@9.3.0: - resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} - engines: {node: '>=10.12.0'} - - vary@1.1.2: - resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} - engines: {node: '>= 0.8'} - - verror@1.10.0: - resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} - engines: {'0': node >=0.6.0} - - vue@3.3.4: - resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==} - - w3c-xmlserializer@4.0.0: - resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} - engines: {node: '>=14'} - - w3c-xmlserializer@5.0.0: - resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} - engines: {node: '>=18'} - - walker@1.0.8: - resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} - - wcwidth@1.0.1: - resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} - - weak-lru-cache@1.2.2: - resolution: {integrity: sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==} - - webextension-polyfill@0.12.0: - resolution: {integrity: sha512-97TBmpoWJEE+3nFBQ4VocyCdLKfw54rFaJ6EVQYLBCXqCIpLSZkwGgASpv4oPt9gdKCJ80RJlcmNzNn008Ag6Q==} - - webidl-conversions@4.0.2: - resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} - - webidl-conversions@7.0.0: - resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} - engines: {node: '>=12'} - - whatwg-encoding@2.0.0: - resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} - engines: {node: '>=12'} - - whatwg-encoding@3.1.1: - resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} - engines: {node: '>=18'} - - whatwg-mimetype@3.0.0: - resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} - engines: {node: '>=12'} - - whatwg-mimetype@4.0.0: - resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} - engines: {node: '>=18'} - - whatwg-url@11.0.0: - resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} - engines: {node: '>=12'} - - whatwg-url@14.2.0: - resolution: {integrity: sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==} - engines: {node: '>=18'} - - whatwg-url@7.1.0: - resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - - which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - - wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - - write-file-atomic@4.0.2: - resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - - ws@8.18.1: - resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - - xml-name-validator@4.0.0: - resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} - engines: {node: '>=12'} - - xml-name-validator@5.0.0: - resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} - engines: {node: '>=18'} - - xmlchars@2.2.0: - resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - - xxhash-wasm@0.4.2: - resolution: {integrity: sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - - yaml@1.10.2: - resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} - engines: {node: '>= 6'} - - yaml@2.7.1: - resolution: {integrity: sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==} - engines: {node: '>= 14'} - hasBin: true - - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - - yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} - - yauzl@2.10.0: - resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} - - yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - - yoctocolors-cjs@2.1.2: - resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} - engines: {node: '>=18'} - -snapshots: - - '@alloc/quick-lru@5.2.0': {} - - '@ampproject/remapping@2.3.0': - dependencies: - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 - - '@asamuzakjp/css-color@3.1.5': - dependencies: - '@csstools/css-calc': 2.1.3(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-color-parser': 3.0.9(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) - '@csstools/css-tokenizer': 3.0.3 - lru-cache: 10.4.3 - - '@babel/code-frame@7.26.2': - dependencies: - '@babel/helper-validator-identifier': 7.25.9 - js-tokens: 4.0.0 - picocolors: 1.1.1 - - '@babel/compat-data@7.26.8': {} - - '@babel/core@7.26.10': - dependencies: - '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.27.0 - '@babel/helper-compilation-targets': 7.27.0 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) - '@babel/helpers': 7.27.0 - '@babel/parser': 7.27.0 - '@babel/template': 7.27.0 - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 - convert-source-map: 2.0.0 - debug: 4.4.0(supports-color@5.5.0) - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/generator@7.27.0': - dependencies: - '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.1.0 - - '@babel/helper-compilation-targets@7.27.0': - dependencies: - '@babel/compat-data': 7.26.8 - '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.4 - lru-cache: 5.1.1 - semver: 6.3.1 - - '@babel/helper-module-imports@7.25.9': - dependencies: - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.27.0 - transitivePeerDependencies: - - supports-color - - '@babel/helper-plugin-utils@7.26.5': {} - - '@babel/helper-string-parser@7.25.9': {} - - '@babel/helper-validator-identifier@7.25.9': {} - - '@babel/helper-validator-option@7.25.9': {} - - '@babel/helpers@7.27.0': - dependencies: - '@babel/template': 7.27.0 - '@babel/types': 7.27.0 - - '@babel/parser@7.27.0': - dependencies: - '@babel/types': 7.27.0 - - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/runtime@7.27.0': - dependencies: - regenerator-runtime: 0.14.1 - - '@babel/template@7.27.0': - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 - - '@babel/traverse@7.27.0': - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.27.0 - '@babel/parser': 7.27.0 - '@babel/template': 7.27.0 - '@babel/types': 7.27.0 - debug: 4.4.0(supports-color@5.5.0) - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - '@babel/types@7.27.0': - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - - '@bcoe/v8-coverage@0.2.3': {} - - '@colors/colors@1.5.0': - optional: true - - '@commitlint/config-validator@19.8.0': - dependencies: - '@commitlint/types': 19.8.0 - ajv: 8.17.1 - optional: true - - '@commitlint/execute-rule@19.8.0': - optional: true - - '@commitlint/load@19.8.0(@types/node@20.17.31)(typescript@5.8.3)': - dependencies: - '@commitlint/config-validator': 19.8.0 - '@commitlint/execute-rule': 19.8.0 - '@commitlint/resolve-extends': 19.8.0 - '@commitlint/types': 19.8.0 - chalk: 5.4.1 - cosmiconfig: 9.0.0(typescript@5.8.3) - cosmiconfig-typescript-loader: 6.1.0(@types/node@20.17.31)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3) - lodash.isplainobject: 4.0.6 - lodash.merge: 4.6.2 - lodash.uniq: 4.5.0 - transitivePeerDependencies: - - '@types/node' - - typescript - optional: true - - '@commitlint/resolve-extends@19.8.0': - dependencies: - '@commitlint/config-validator': 19.8.0 - '@commitlint/types': 19.8.0 - global-directory: 4.0.1 - import-meta-resolve: 4.1.0 - lodash.mergewith: 4.6.2 - resolve-from: 5.0.0 - optional: true - - '@commitlint/types@19.8.0': - dependencies: - '@types/conventional-commits-parser': 5.0.1 - chalk: 5.4.1 - optional: true - - '@cspotcode/source-map-support@0.8.1': - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - - '@csstools/color-helpers@5.0.2': {} - - '@csstools/css-calc@2.1.3(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': - dependencies: - '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) - '@csstools/css-tokenizer': 3.0.3 - - '@csstools/css-color-parser@3.0.9(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': - dependencies: - '@csstools/color-helpers': 5.0.2 - '@csstools/css-calc': 2.1.3(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) - '@csstools/css-tokenizer': 3.0.3 - - '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': - dependencies: - '@csstools/css-tokenizer': 3.0.3 - - '@csstools/css-tokenizer@3.0.3': {} - - '@cypress/request@3.0.8': - dependencies: - aws-sign2: 0.7.0 - aws4: 1.13.2 - caseless: 0.12.0 - combined-stream: 1.0.8 - extend: 3.0.2 - forever-agent: 0.6.1 - form-data: 4.0.2 - http-signature: 1.4.0 - is-typedarray: 1.0.0 - isstream: 0.1.2 - json-stringify-safe: 5.0.1 - mime-types: 2.1.35 - performance-now: 2.1.0 - qs: 6.14.0 - safe-buffer: 5.2.1 - tough-cookie: 5.1.2 - tunnel-agent: 0.6.0 - uuid: 8.3.2 - - '@cypress/xvfb@1.2.4(supports-color@8.1.1)': - dependencies: - debug: 3.2.7(supports-color@8.1.1) - lodash.once: 4.1.1 - transitivePeerDependencies: - - supports-color - - '@emnapi/runtime@1.4.3': - dependencies: - tslib: 2.8.1 - optional: true - - '@esbuild/aix-ppc64@0.21.5': - optional: true - - '@esbuild/android-arm64@0.18.20': - optional: true - - '@esbuild/android-arm64@0.21.5': - optional: true - - '@esbuild/android-arm@0.18.20': - optional: true - - '@esbuild/android-arm@0.21.5': - optional: true - - '@esbuild/android-x64@0.18.20': - optional: true - - '@esbuild/android-x64@0.21.5': - optional: true - - '@esbuild/darwin-arm64@0.18.20': - optional: true - - '@esbuild/darwin-arm64@0.21.5': - optional: true - - '@esbuild/darwin-x64@0.18.20': - optional: true - - '@esbuild/darwin-x64@0.21.5': - optional: true - - '@esbuild/freebsd-arm64@0.18.20': - optional: true - - '@esbuild/freebsd-arm64@0.21.5': - optional: true - - '@esbuild/freebsd-x64@0.18.20': - optional: true - - '@esbuild/freebsd-x64@0.21.5': - optional: true - - '@esbuild/linux-arm64@0.18.20': - optional: true - - '@esbuild/linux-arm64@0.21.5': - optional: true - - '@esbuild/linux-arm@0.18.20': - optional: true - - '@esbuild/linux-arm@0.21.5': - optional: true - - '@esbuild/linux-ia32@0.18.20': - optional: true - - '@esbuild/linux-ia32@0.21.5': - optional: true - - '@esbuild/linux-loong64@0.14.54': - optional: true - - '@esbuild/linux-loong64@0.18.20': - optional: true - - '@esbuild/linux-loong64@0.21.5': - optional: true - - '@esbuild/linux-mips64el@0.18.20': - optional: true - - '@esbuild/linux-mips64el@0.21.5': - optional: true - - '@esbuild/linux-ppc64@0.18.20': - optional: true - - '@esbuild/linux-ppc64@0.21.5': - optional: true - - '@esbuild/linux-riscv64@0.18.20': - optional: true - - '@esbuild/linux-riscv64@0.21.5': - optional: true - - '@esbuild/linux-s390x@0.18.20': - optional: true - - '@esbuild/linux-s390x@0.21.5': - optional: true - - '@esbuild/linux-x64@0.18.20': - optional: true - - '@esbuild/linux-x64@0.21.5': - optional: true - - '@esbuild/netbsd-x64@0.18.20': - optional: true - - '@esbuild/netbsd-x64@0.21.5': - optional: true - - '@esbuild/openbsd-x64@0.18.20': - optional: true - - '@esbuild/openbsd-x64@0.21.5': - optional: true - - '@esbuild/sunos-x64@0.18.20': - optional: true - - '@esbuild/sunos-x64@0.21.5': - optional: true - - '@esbuild/win32-arm64@0.18.20': - optional: true - - '@esbuild/win32-arm64@0.21.5': - optional: true - - '@esbuild/win32-ia32@0.18.20': - optional: true - - '@esbuild/win32-ia32@0.21.5': - optional: true - - '@esbuild/win32-x64@0.18.20': - optional: true - - '@esbuild/win32-x64@0.21.5': - optional: true - - '@eslint-community/eslint-utils@4.6.1(eslint@8.57.1)': - dependencies: - eslint: 8.57.1 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.12.1': {} - - '@eslint/eslintrc@2.1.4': - dependencies: - ajv: 6.12.6 - debug: 4.4.0(supports-color@5.5.0) - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@8.57.1': {} - - '@eslint/js@9.25.1': {} - - '@expo/spawn-async@1.7.2': - dependencies: - cross-spawn: 7.0.6 - - '@humanwhocodes/config-array@0.13.0': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.4.0(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/object-schema@2.0.3': {} - - '@ianvs/prettier-plugin-sort-imports@4.1.1(@vue/compiler-sfc@3.3.4)(prettier@3.2.4)': - dependencies: - '@babel/core': 7.26.10 - '@babel/generator': 7.27.0 - '@babel/parser': 7.27.0 - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 - prettier: 3.2.4 - semver: 7.7.1 - optionalDependencies: - '@vue/compiler-sfc': 3.3.4 - transitivePeerDependencies: - - supports-color - - '@img/sharp-darwin-arm64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.0.4 - optional: true - - '@img/sharp-darwin-x64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.0.4 - optional: true - - '@img/sharp-libvips-darwin-arm64@1.0.4': - optional: true - - '@img/sharp-libvips-darwin-x64@1.0.4': - optional: true - - '@img/sharp-libvips-linux-arm64@1.0.4': - optional: true - - '@img/sharp-libvips-linux-arm@1.0.5': - optional: true - - '@img/sharp-libvips-linux-s390x@1.0.4': - optional: true - - '@img/sharp-libvips-linux-x64@1.0.4': - optional: true - - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': - optional: true - - '@img/sharp-libvips-linuxmusl-x64@1.0.4': - optional: true - - '@img/sharp-linux-arm64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.0.4 - optional: true - - '@img/sharp-linux-arm@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.0.5 - optional: true - - '@img/sharp-linux-s390x@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.0.4 - optional: true - - '@img/sharp-linux-x64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.0.4 - optional: true - - '@img/sharp-linuxmusl-arm64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 - optional: true - - '@img/sharp-linuxmusl-x64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 - optional: true - - '@img/sharp-wasm32@0.33.5': - dependencies: - '@emnapi/runtime': 1.4.3 - optional: true - - '@img/sharp-win32-ia32@0.33.5': - optional: true - - '@img/sharp-win32-x64@0.33.5': - optional: true - - '@inquirer/checkbox@4.1.5(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@20.11.5) - ansi-escapes: 4.3.2 - yoctocolors-cjs: 2.1.2 - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/confirm@5.1.9(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/type': 3.0.6(@types/node@20.11.5) - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/core@10.1.10(@types/node@20.11.5)': - dependencies: - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@20.11.5) - ansi-escapes: 4.3.2 - cli-width: 4.1.0 - mute-stream: 2.0.0 - signal-exit: 4.1.0 - wrap-ansi: 6.2.0 - yoctocolors-cjs: 2.1.2 - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/editor@4.2.10(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/type': 3.0.6(@types/node@20.11.5) - external-editor: 3.1.0 - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/expand@4.0.12(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/type': 3.0.6(@types/node@20.11.5) - yoctocolors-cjs: 2.1.2 - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/figures@1.0.11': {} - - '@inquirer/input@4.1.9(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/type': 3.0.6(@types/node@20.11.5) - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/number@3.0.12(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/type': 3.0.6(@types/node@20.11.5) - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/password@4.0.12(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/type': 3.0.6(@types/node@20.11.5) - ansi-escapes: 4.3.2 - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/prompts@7.5.0(@types/node@20.11.5)': - dependencies: - '@inquirer/checkbox': 4.1.5(@types/node@20.11.5) - '@inquirer/confirm': 5.1.9(@types/node@20.11.5) - '@inquirer/editor': 4.2.10(@types/node@20.11.5) - '@inquirer/expand': 4.0.12(@types/node@20.11.5) - '@inquirer/input': 4.1.9(@types/node@20.11.5) - '@inquirer/number': 3.0.12(@types/node@20.11.5) - '@inquirer/password': 4.0.12(@types/node@20.11.5) - '@inquirer/rawlist': 4.1.0(@types/node@20.11.5) - '@inquirer/search': 3.0.12(@types/node@20.11.5) - '@inquirer/select': 4.2.0(@types/node@20.11.5) - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/rawlist@4.1.0(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/type': 3.0.6(@types/node@20.11.5) - yoctocolors-cjs: 2.1.2 - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/search@3.0.12(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@20.11.5) - yoctocolors-cjs: 2.1.2 - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/select@4.2.0(@types/node@20.11.5)': - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@20.11.5) - ansi-escapes: 4.3.2 - yoctocolors-cjs: 2.1.2 - optionalDependencies: - '@types/node': 20.11.5 - - '@inquirer/type@3.0.6(@types/node@20.11.5)': - optionalDependencies: - '@types/node': 20.11.5 - - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.1.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 - - '@istanbuljs/load-nyc-config@1.1.0': - dependencies: - camelcase: 5.3.1 - find-up: 4.1.0 - get-package-type: 0.1.0 - js-yaml: 3.14.1 - resolve-from: 5.0.0 - - '@istanbuljs/schema@0.1.3': {} - - '@jest/console@29.7.0': - dependencies: - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - chalk: 4.1.2 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - slash: 3.0.0 - - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3))': - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.9.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - - '@jest/environment@29.7.0': - dependencies: - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - jest-mock: 29.7.0 - - '@jest/expect-utils@29.7.0': - dependencies: - jest-get-type: 29.6.3 - - '@jest/expect@29.7.0': - dependencies: - expect: 29.7.0 - jest-snapshot: 29.7.0 - transitivePeerDependencies: - - supports-color - - '@jest/fake-timers@29.7.0': - dependencies: - '@jest/types': 29.6.3 - '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.17.31 - jest-message-util: 29.7.0 - jest-mock: 29.7.0 - jest-util: 29.7.0 - - '@jest/globals@29.7.0': - dependencies: - '@jest/environment': 29.7.0 - '@jest/expect': 29.7.0 - '@jest/types': 29.6.3 - jest-mock: 29.7.0 - transitivePeerDependencies: - - supports-color - - '@jest/reporters@29.7.0': - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.17.31 - chalk: 4.1.2 - collect-v8-coverage: 1.0.2 - exit: 0.1.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-instrument: 6.0.3 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.7 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - jest-worker: 29.7.0 - slash: 3.0.0 - string-length: 4.0.2 - strip-ansi: 6.0.1 - v8-to-istanbul: 9.3.0 - transitivePeerDependencies: - - supports-color - - '@jest/schemas@29.6.3': - dependencies: - '@sinclair/typebox': 0.27.8 - - '@jest/source-map@29.6.3': - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - callsites: 3.1.0 - graceful-fs: 4.2.11 - - '@jest/test-result@29.7.0': - dependencies: - '@jest/console': 29.7.0 - '@jest/types': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.6 - collect-v8-coverage: 1.0.2 - - '@jest/test-sequencer@29.7.0': - dependencies: - '@jest/test-result': 29.7.0 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - slash: 3.0.0 - - '@jest/transform@29.7.0': - dependencies: - '@babel/core': 7.26.10 - '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.25 - babel-plugin-istanbul: 6.1.1 - chalk: 4.1.2 - convert-source-map: 2.0.0 - fast-json-stable-stringify: 2.1.0 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - jest-regex-util: 29.6.3 - jest-util: 29.7.0 - micromatch: 4.0.8 - pirates: 4.0.7 - slash: 3.0.0 - write-file-atomic: 4.0.2 - transitivePeerDependencies: - - supports-color - - '@jest/types@29.6.3': - dependencies: - '@jest/schemas': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.6 - '@types/istanbul-reports': 3.0.4 - '@types/node': 20.17.31 - '@types/yargs': 17.0.33 - chalk: 4.1.2 - - '@jridgewell/gen-mapping@0.3.8': - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 - - '@jridgewell/resolve-uri@3.1.2': {} - - '@jridgewell/set-array@1.2.1': {} - - '@jridgewell/sourcemap-codec@1.5.0': {} - - '@jridgewell/trace-mapping@0.3.25': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 - - '@jridgewell/trace-mapping@0.3.9': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 - - '@lezer/common@0.15.12': {} - - '@lezer/common@1.2.3': {} - - '@lezer/lr@0.15.8': - dependencies: - '@lezer/common': 0.15.12 - - '@lezer/lr@1.4.2': - dependencies: - '@lezer/common': 1.2.3 - - '@lmdb/lmdb-darwin-arm64@2.5.2': - optional: true - - '@lmdb/lmdb-darwin-arm64@2.7.11': - optional: true - - '@lmdb/lmdb-darwin-x64@2.5.2': - optional: true - - '@lmdb/lmdb-darwin-x64@2.7.11': - optional: true - - '@lmdb/lmdb-linux-arm64@2.5.2': - optional: true - - '@lmdb/lmdb-linux-arm64@2.7.11': - optional: true - - '@lmdb/lmdb-linux-arm@2.5.2': - optional: true - - '@lmdb/lmdb-linux-arm@2.7.11': - optional: true - - '@lmdb/lmdb-linux-x64@2.5.2': - optional: true - - '@lmdb/lmdb-linux-x64@2.7.11': - optional: true - - '@lmdb/lmdb-win32-x64@2.5.2': - optional: true - - '@lmdb/lmdb-win32-x64@2.7.11': - optional: true - - '@mischnic/json-sourcemap@0.1.0': - dependencies: - '@lezer/common': 0.15.12 - '@lezer/lr': 0.15.8 - json5: 2.2.3 - - '@mischnic/json-sourcemap@0.1.1': - dependencies: - '@lezer/common': 1.2.3 - '@lezer/lr': 1.4.2 - json5: 2.2.3 - - '@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3': - optional: true - - '@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3': - optional: true - - '@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3': - optional: true - - '@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3': - optional: true - - '@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3': - optional: true - - '@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3': - optional: true - - '@nodelib/fs.scandir@2.1.5': - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - - '@nodelib/fs.stat@2.0.5': {} - - '@nodelib/fs.walk@1.2.8': - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.19.1 - - '@parcel/bundler-default@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/graph': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/cache@2.8.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/fs': 2.8.3(@parcel/core@2.9.3) - '@parcel/logger': 2.8.3 - '@parcel/utils': 2.8.3 - lmdb: 2.5.2 - - '@parcel/cache@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/fs': 2.9.3(@parcel/core@2.9.3) - '@parcel/logger': 2.9.3 - '@parcel/utils': 2.9.3 - lmdb: 2.7.11 - - '@parcel/codeframe@2.8.3': - dependencies: - chalk: 4.1.2 - - '@parcel/codeframe@2.9.3': - dependencies: - chalk: 4.1.2 - - '@parcel/compressor-raw@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/config-default@2.9.3(@parcel/core@2.9.3)(@swc/helpers@0.5.17)(postcss@8.5.3)(typescript@5.2.2)': - dependencies: - '@parcel/bundler-default': 2.9.3(@parcel/core@2.9.3) - '@parcel/compressor-raw': 2.9.3(@parcel/core@2.9.3) - '@parcel/core': 2.9.3 - '@parcel/namer-default': 2.9.3(@parcel/core@2.9.3) - '@parcel/optimizer-css': 2.9.3(@parcel/core@2.9.3) - '@parcel/optimizer-htmlnano': 2.9.3(@parcel/core@2.9.3)(postcss@8.5.3)(typescript@5.2.2) - '@parcel/optimizer-image': 2.9.3(@parcel/core@2.9.3) - '@parcel/optimizer-svgo': 2.9.3(@parcel/core@2.9.3) - '@parcel/optimizer-swc': 2.9.3(@parcel/core@2.9.3)(@swc/helpers@0.5.17) - '@parcel/packager-css': 2.9.3(@parcel/core@2.9.3) - '@parcel/packager-html': 2.9.3(@parcel/core@2.9.3) - '@parcel/packager-js': 2.9.3(@parcel/core@2.9.3) - '@parcel/packager-raw': 2.9.3(@parcel/core@2.9.3) - '@parcel/packager-svg': 2.9.3(@parcel/core@2.9.3) - '@parcel/reporter-dev-server': 2.9.3(@parcel/core@2.9.3) - '@parcel/resolver-default': 2.9.3(@parcel/core@2.9.3) - '@parcel/runtime-browser-hmr': 2.9.3(@parcel/core@2.9.3) - '@parcel/runtime-js': 2.9.3(@parcel/core@2.9.3) - '@parcel/runtime-react-refresh': 2.9.3(@parcel/core@2.9.3) - '@parcel/runtime-service-worker': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-babel': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-css': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-html': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-image': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-js': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-json': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-postcss': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-posthtml': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-raw': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-react-refresh-wrap': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-svg': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@swc/helpers' - - cssnano - - postcss - - purgecss - - relateurl - - srcset - - terser - - typescript - - uncss - - '@parcel/core@2.9.3': - dependencies: - '@mischnic/json-sourcemap': 0.1.1 - '@parcel/cache': 2.9.3(@parcel/core@2.9.3) - '@parcel/diagnostic': 2.9.3 - '@parcel/events': 2.9.3 - '@parcel/fs': 2.9.3(@parcel/core@2.9.3) - '@parcel/graph': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/logger': 2.9.3 - '@parcel/package-manager': 2.9.3(@parcel/core@2.9.3) - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/profiler': 2.9.3 - '@parcel/source-map': 2.1.1 - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - '@parcel/workers': 2.9.3(@parcel/core@2.9.3) - abortcontroller-polyfill: 1.7.8 - base-x: 3.0.11 - browserslist: 4.24.4 - clone: 2.1.2 - dotenv: 7.0.0 - dotenv-expand: 5.1.0 - json5: 2.2.3 - msgpackr: 1.11.2 - nullthrows: 1.1.1 - semver: 7.5.4 - - '@parcel/diagnostic@2.8.3': - dependencies: - '@mischnic/json-sourcemap': 0.1.1 - nullthrows: 1.1.1 - - '@parcel/diagnostic@2.9.3': - dependencies: - '@mischnic/json-sourcemap': 0.1.1 - nullthrows: 1.1.1 - - '@parcel/events@2.8.3': {} - - '@parcel/events@2.9.3': {} - - '@parcel/fs-search@2.8.3': - dependencies: - detect-libc: 1.0.3 - - '@parcel/fs-search@2.9.3': {} - - '@parcel/fs@2.8.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/fs-search': 2.8.3 - '@parcel/types': 2.8.3(@parcel/core@2.9.3) - '@parcel/utils': 2.8.3 - '@parcel/watcher': 2.2.0 - '@parcel/workers': 2.8.3(@parcel/core@2.9.3) - - '@parcel/fs@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/fs-search': 2.9.3 - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - '@parcel/watcher': 2.2.0 - '@parcel/workers': 2.9.3(@parcel/core@2.9.3) - - '@parcel/graph@2.9.3': - dependencies: - nullthrows: 1.1.1 - - '@parcel/hash@2.8.3': - dependencies: - detect-libc: 1.0.3 - xxhash-wasm: 0.4.2 - - '@parcel/hash@2.9.3': - dependencies: - xxhash-wasm: 0.4.2 - - '@parcel/logger@2.8.3': - dependencies: - '@parcel/diagnostic': 2.8.3 - '@parcel/events': 2.8.3 - - '@parcel/logger@2.9.3': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/events': 2.9.3 - - '@parcel/markdown-ansi@2.8.3': - dependencies: - chalk: 4.1.2 - - '@parcel/markdown-ansi@2.9.3': - dependencies: - chalk: 4.1.2 - - '@parcel/namer-default@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/node-resolver-core@3.0.3(@parcel/core@2.9.3)': - dependencies: - '@mischnic/json-sourcemap': 0.1.1 - '@parcel/diagnostic': 2.9.3 - '@parcel/fs': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - semver: 7.5.4 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/optimizer-css@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.9.3 - browserslist: 4.24.4 - lightningcss: 1.29.3 - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/optimizer-data-url@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - isbinaryfile: 4.0.10 - mime: 2.6.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/optimizer-htmlnano@2.9.3(@parcel/core@2.9.3)(postcss@8.5.3)(typescript@5.2.2)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - htmlnano: 2.1.1(postcss@8.5.3)(svgo@2.8.0)(typescript@5.2.2) - nullthrows: 1.1.1 - posthtml: 0.16.6 - svgo: 2.8.0 - transitivePeerDependencies: - - '@parcel/core' - - cssnano - - postcss - - purgecss - - relateurl - - srcset - - terser - - typescript - - uncss - - '@parcel/optimizer-image@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - '@parcel/workers': 2.9.3(@parcel/core@2.9.3) - - '@parcel/optimizer-svgo@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - svgo: 2.8.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/optimizer-swc@2.9.3(@parcel/core@2.9.3)(@swc/helpers@0.5.17)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.9.3 - '@swc/core': 1.11.22(@swc/helpers@0.5.17) - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@swc/helpers' - - '@parcel/package-manager@2.8.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.8.3 - '@parcel/fs': 2.8.3(@parcel/core@2.9.3) - '@parcel/logger': 2.8.3 - '@parcel/types': 2.8.3(@parcel/core@2.9.3) - '@parcel/utils': 2.8.3 - '@parcel/workers': 2.8.3(@parcel/core@2.9.3) - semver: 5.7.2 - - '@parcel/package-manager@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/fs': 2.9.3(@parcel/core@2.9.3) - '@parcel/logger': 2.9.3 - '@parcel/node-resolver-core': 3.0.3(@parcel/core@2.9.3) - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - '@parcel/workers': 2.9.3(@parcel/core@2.9.3) - semver: 7.5.4 - - '@parcel/packager-css@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/packager-html@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - posthtml: 0.16.6 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/packager-js@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.9.3 - globals: 13.24.0 - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/packager-raw@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/packager-svg@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - posthtml: 0.16.6 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/plugin@2.8.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/types': 2.8.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/plugin@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/profiler@2.9.3': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/events': 2.9.3 - chrome-trace-event: 1.0.4 - - '@parcel/reporter-bundle-buddy@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/reporter-dev-server@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/resolver-default@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/node-resolver-core': 3.0.3(@parcel/core@2.9.3) - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/runtime-browser-hmr@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/runtime-js@2.8.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.8.3(@parcel/core@2.9.3) - '@parcel/utils': 2.8.3 - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/runtime-js@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/runtime-react-refresh@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - react-error-overlay: 6.0.9 - react-refresh: 0.9.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/runtime-service-worker@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/source-map@2.1.1': - dependencies: - detect-libc: 1.0.3 - - '@parcel/transformer-babel@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.9.3 - browserslist: 4.24.4 - json5: 2.2.3 - nullthrows: 1.1.1 - semver: 7.5.4 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-css@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.9.3 - browserslist: 4.24.4 - lightningcss: 1.29.3 - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-graphql@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - graphql: 15.10.1 - graphql-import-macro: 1.0.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-html@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - nullthrows: 1.1.1 - posthtml: 0.16.6 - posthtml-parser: 0.10.2 - posthtml-render: 3.0.0 - semver: 7.5.4 - srcset: 4.0.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-image@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - '@parcel/workers': 2.9.3(@parcel/core@2.9.3) - nullthrows: 1.1.1 - - '@parcel/transformer-inline-string@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-js@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.9.3 - '@parcel/workers': 2.9.3(@parcel/core@2.9.3) - '@swc/helpers': 0.5.17 - browserslist: 4.24.4 - nullthrows: 1.1.1 - regenerator-runtime: 0.13.11 - semver: 7.5.4 - - '@parcel/transformer-json@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - json5: 2.2.3 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-less@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - less: 4.3.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-postcss@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - clone: 2.1.2 - nullthrows: 1.1.1 - postcss-value-parser: 4.2.0 - semver: 7.5.4 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-posthtml@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - posthtml: 0.16.6 - posthtml-parser: 0.10.2 - posthtml-render: 3.0.0 - semver: 7.5.4 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-raw@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-react-refresh-wrap@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - react-refresh: 0.9.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-sass@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - sass: 1.87.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-svg-react@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@svgr/core': 6.5.1 - '@svgr/plugin-jsx': 6.5.1(@svgr/core@6.5.1) - '@svgr/plugin-svgo': 6.5.1(@svgr/core@6.5.1) - transitivePeerDependencies: - - '@parcel/core' - - supports-color - - '@parcel/transformer-svg@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/diagnostic': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - nullthrows: 1.1.1 - posthtml: 0.16.6 - posthtml-parser: 0.10.2 - posthtml-render: 3.0.0 - semver: 7.5.4 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/transformer-worklet@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/types@2.8.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/cache': 2.8.3(@parcel/core@2.9.3) - '@parcel/diagnostic': 2.8.3 - '@parcel/fs': 2.8.3(@parcel/core@2.9.3) - '@parcel/package-manager': 2.8.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/workers': 2.8.3(@parcel/core@2.9.3) - utility-types: 3.11.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/types@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/cache': 2.9.3(@parcel/core@2.9.3) - '@parcel/diagnostic': 2.9.3 - '@parcel/fs': 2.9.3(@parcel/core@2.9.3) - '@parcel/package-manager': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/workers': 2.9.3(@parcel/core@2.9.3) - utility-types: 3.11.0 - transitivePeerDependencies: - - '@parcel/core' - - '@parcel/utils@2.8.3': - dependencies: - '@parcel/codeframe': 2.8.3 - '@parcel/diagnostic': 2.8.3 - '@parcel/hash': 2.8.3 - '@parcel/logger': 2.8.3 - '@parcel/markdown-ansi': 2.8.3 - '@parcel/source-map': 2.1.1 - chalk: 4.1.2 - - '@parcel/utils@2.9.3': - dependencies: - '@parcel/codeframe': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/logger': 2.9.3 - '@parcel/markdown-ansi': 2.9.3 - '@parcel/source-map': 2.1.1 - chalk: 4.1.2 - nullthrows: 1.1.1 - - '@parcel/watcher-android-arm64@2.2.0': - optional: true - - '@parcel/watcher-android-arm64@2.5.1': - optional: true - - '@parcel/watcher-darwin-arm64@2.2.0': - optional: true - - '@parcel/watcher-darwin-arm64@2.5.1': - optional: true - - '@parcel/watcher-darwin-x64@2.2.0': - optional: true - - '@parcel/watcher-darwin-x64@2.5.1': - optional: true - - '@parcel/watcher-freebsd-x64@2.5.1': - optional: true - - '@parcel/watcher-linux-arm-glibc@2.2.0': - optional: true - - '@parcel/watcher-linux-arm-glibc@2.5.1': - optional: true - - '@parcel/watcher-linux-arm-musl@2.5.1': - optional: true - - '@parcel/watcher-linux-arm64-glibc@2.2.0': - optional: true - - '@parcel/watcher-linux-arm64-glibc@2.5.1': - optional: true - - '@parcel/watcher-linux-arm64-musl@2.2.0': - optional: true - - '@parcel/watcher-linux-arm64-musl@2.5.1': - optional: true - - '@parcel/watcher-linux-x64-glibc@2.2.0': - optional: true - - '@parcel/watcher-linux-x64-glibc@2.5.1': - optional: true - - '@parcel/watcher-linux-x64-musl@2.2.0': - optional: true - - '@parcel/watcher-linux-x64-musl@2.5.1': - optional: true - - '@parcel/watcher-win32-arm64@2.2.0': - optional: true - - '@parcel/watcher-win32-arm64@2.5.1': - optional: true - - '@parcel/watcher-win32-ia32@2.5.1': - optional: true - - '@parcel/watcher-win32-x64@2.2.0': - optional: true - - '@parcel/watcher-win32-x64@2.5.1': - optional: true - - '@parcel/watcher@2.2.0': - dependencies: - detect-libc: 1.0.3 - is-glob: 4.0.3 - micromatch: 4.0.8 - node-addon-api: 7.1.1 - optionalDependencies: - '@parcel/watcher-android-arm64': 2.2.0 - '@parcel/watcher-darwin-arm64': 2.2.0 - '@parcel/watcher-darwin-x64': 2.2.0 - '@parcel/watcher-linux-arm-glibc': 2.2.0 - '@parcel/watcher-linux-arm64-glibc': 2.2.0 - '@parcel/watcher-linux-arm64-musl': 2.2.0 - '@parcel/watcher-linux-x64-glibc': 2.2.0 - '@parcel/watcher-linux-x64-musl': 2.2.0 - '@parcel/watcher-win32-arm64': 2.2.0 - '@parcel/watcher-win32-x64': 2.2.0 - - '@parcel/watcher@2.5.1': - dependencies: - detect-libc: 1.0.3 - is-glob: 4.0.3 - micromatch: 4.0.8 - node-addon-api: 7.1.1 - optionalDependencies: - '@parcel/watcher-android-arm64': 2.5.1 - '@parcel/watcher-darwin-arm64': 2.5.1 - '@parcel/watcher-darwin-x64': 2.5.1 - '@parcel/watcher-freebsd-x64': 2.5.1 - '@parcel/watcher-linux-arm-glibc': 2.5.1 - '@parcel/watcher-linux-arm-musl': 2.5.1 - '@parcel/watcher-linux-arm64-glibc': 2.5.1 - '@parcel/watcher-linux-arm64-musl': 2.5.1 - '@parcel/watcher-linux-x64-glibc': 2.5.1 - '@parcel/watcher-linux-x64-musl': 2.5.1 - '@parcel/watcher-win32-arm64': 2.5.1 - '@parcel/watcher-win32-ia32': 2.5.1 - '@parcel/watcher-win32-x64': 2.5.1 - optional: true - - '@parcel/workers@2.8.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.8.3 - '@parcel/logger': 2.8.3 - '@parcel/types': 2.8.3(@parcel/core@2.9.3) - '@parcel/utils': 2.8.3 - chrome-trace-event: 1.0.4 - nullthrows: 1.1.1 - - '@parcel/workers@2.9.3(@parcel/core@2.9.3)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/logger': 2.9.3 - '@parcel/profiler': 2.9.3 - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - - '@pkgjs/parseargs@0.11.0': - optional: true - - '@plasmohq/consolidate@0.17.0(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': - dependencies: - bluebird: 3.7.2 - optionalDependencies: - lodash: 4.17.21 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - - '@plasmohq/init@0.7.0': {} - - '@plasmohq/messaging@0.7.1(react@18.2.0)': - dependencies: - nanoid: 5.0.3 - optionalDependencies: - react: 18.2.0 - - '@plasmohq/parcel-bundler@0.5.6': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/graph': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - - '@plasmohq/parcel-compressor-utf8@0.1.1(@parcel/core@2.9.3)': - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - transitivePeerDependencies: - - '@parcel/core' - - '@plasmohq/parcel-config@0.42.0(@swc/core@1.11.22(@swc/helpers@0.5.17))(@swc/helpers@0.5.17)(lodash@4.17.21)(postcss@8.5.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3))(typescript@5.2.2)': - dependencies: - '@parcel/compressor-raw': 2.9.3(@parcel/core@2.9.3) - '@parcel/config-default': 2.9.3(@parcel/core@2.9.3)(@swc/helpers@0.5.17)(postcss@8.5.3)(typescript@5.2.2) - '@parcel/core': 2.9.3 - '@parcel/optimizer-data-url': 2.9.3(@parcel/core@2.9.3) - '@parcel/reporter-bundle-buddy': 2.9.3(@parcel/core@2.9.3) - '@parcel/resolver-default': 2.9.3(@parcel/core@2.9.3) - '@parcel/runtime-js': 2.8.3(@parcel/core@2.9.3) - '@parcel/runtime-service-worker': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/transformer-babel': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-css': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-graphql': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-inline-string': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-js': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-less': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-postcss': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-raw': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-react-refresh-wrap': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-sass': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-svg-react': 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-worklet': 2.9.3(@parcel/core@2.9.3) - '@plasmohq/parcel-bundler': 0.5.6 - '@plasmohq/parcel-compressor-utf8': 0.1.1(@parcel/core@2.9.3) - '@plasmohq/parcel-namer-manifest': 0.3.12 - '@plasmohq/parcel-optimizer-encapsulate': 0.0.8 - '@plasmohq/parcel-optimizer-es': 0.4.1(@swc/helpers@0.5.17) - '@plasmohq/parcel-packager': 0.6.15 - '@plasmohq/parcel-resolver': 0.14.1 - '@plasmohq/parcel-resolver-post': 0.4.5(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3)) - '@plasmohq/parcel-runtime': 0.25.2 - '@plasmohq/parcel-transformer-inject-env': 0.2.12 - '@plasmohq/parcel-transformer-inline-css': 0.3.11 - '@plasmohq/parcel-transformer-manifest': 0.21.0 - '@plasmohq/parcel-transformer-svelte': 0.6.0 - '@plasmohq/parcel-transformer-vue': 0.5.0(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - transitivePeerDependencies: - - '@swc/core' - - '@swc/helpers' - - arc-templates - - atpl - - babel-core - - bracket-template - - coffeescript - - cssnano - - dot - - eco - - ect - - ejs - - haml-coffee - - hamlet - - hamljs - - handlebars - - hogan.js - - htmling - - jazz - - jqtpl - - just - - liquid - - liquor - - lodash - - marko - - mote - - mustache - - nunjucks - - plates - - postcss - - pug - - purgecss - - qejs - - ractive - - razor-tmpl - - react - - react-dom - - relateurl - - slm - - squirrelly - - srcset - - supports-color - - teacup - - templayed - - terser - - then-pug - - tinyliquid - - toffee - - ts-node - - twig - - twing - - typescript - - uncss - - underscore - - vash - - velocityjs - - walrus - - whiskers - - '@plasmohq/parcel-core@0.1.10': - dependencies: - '@parcel/cache': 2.9.3(@parcel/core@2.9.3) - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/events': 2.9.3 - '@parcel/fs': 2.9.3(@parcel/core@2.9.3) - '@parcel/graph': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/logger': 2.9.3 - '@parcel/package-manager': 2.9.3(@parcel/core@2.9.3) - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - '@parcel/watcher': 2.2.0 - '@parcel/workers': 2.9.3(@parcel/core@2.9.3) - abortcontroller-polyfill: 1.7.5 - nullthrows: 1.1.1 - - '@plasmohq/parcel-namer-manifest@0.3.12': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - - '@plasmohq/parcel-optimizer-encapsulate@0.0.8': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - - '@plasmohq/parcel-optimizer-es@0.4.1(@swc/helpers@0.5.17)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.9.3 - '@swc/core': 1.3.96(@swc/helpers@0.5.17) - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@swc/helpers' - - '@plasmohq/parcel-packager@0.6.15': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - nullthrows: 1.1.1 - - '@plasmohq/parcel-resolver-post@0.4.5(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3))': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - tsup: 7.2.0(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3))(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - '@swc/core' - - postcss - - supports-color - - ts-node - - '@plasmohq/parcel-resolver@0.14.1': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/hash': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - fast-glob: 3.3.2 - fs-extra: 11.1.1 - got: 13.0.0 - - '@plasmohq/parcel-runtime@0.25.2': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@types/trusted-types': 2.0.7 - react-refresh: 0.14.0 - - '@plasmohq/parcel-transformer-inject-env@0.2.12': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - - '@plasmohq/parcel-transformer-inline-css@0.3.11': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - browserslist: 4.22.1 - lightningcss: 1.21.8 - - '@plasmohq/parcel-transformer-manifest@0.21.0': - dependencies: - '@mischnic/json-sourcemap': 0.1.0 - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/fs': 2.9.3(@parcel/core@2.9.3) - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - content-security-policy-parser: 0.4.1 - json-schema-to-ts: 3.1.1 - nullthrows: 1.1.1 - - '@plasmohq/parcel-transformer-svelte@0.6.0': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.9.3 - svelte: 4.2.2 - - '@plasmohq/parcel-transformer-vue@0.5.0(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': - dependencies: - '@parcel/core': 2.9.3 - '@parcel/diagnostic': 2.9.3 - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/types': 2.9.3(@parcel/core@2.9.3) - '@parcel/utils': 2.9.3 - '@plasmohq/consolidate': 0.17.0(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@vue/compiler-sfc': 3.3.4 - nullthrows: 1.1.1 - semver: 7.5.4 - vue: 3.3.4 - transitivePeerDependencies: - - arc-templates - - atpl - - babel-core - - bracket-template - - coffeescript - - dot - - eco - - ect - - ejs - - haml-coffee - - hamlet - - hamljs - - handlebars - - hogan.js - - htmling - - jazz - - jqtpl - - just - - liquid - - liquor - - lodash - - marko - - mote - - mustache - - nunjucks - - plates - - pug - - qejs - - ractive - - razor-tmpl - - react - - react-dom - - slm - - squirrelly - - teacup - - templayed - - then-pug - - tinyliquid - - toffee - - twig - - twing - - underscore - - vash - - velocityjs - - walrus - - whiskers - - '@playwright/test@1.52.0': - dependencies: - playwright: 1.52.0 - - '@pnpm/config.env-replace@1.1.0': {} - - '@pnpm/network.ca-file@1.0.2': - dependencies: - graceful-fs: 4.2.10 - - '@pnpm/npm-conf@2.3.1': - dependencies: - '@pnpm/config.env-replace': 1.1.0 - '@pnpm/network.ca-file': 1.0.2 - config-chain: 1.1.13 - - '@sec-ant/readable-stream@0.4.1': {} - - '@sinclair/typebox@0.27.8': {} - - '@sindresorhus/is@5.6.0': {} - - '@sindresorhus/is@7.0.1': {} - - '@sinonjs/commons@3.0.1': - dependencies: - type-detect: 4.0.8 - - '@sinonjs/fake-timers@10.3.0': - dependencies: - '@sinonjs/commons': 3.0.1 - - '@svgr/babel-plugin-add-jsx-attribute@6.5.1(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - - '@svgr/babel-plugin-remove-jsx-attribute@8.0.0(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - - '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - - '@svgr/babel-plugin-replace-jsx-attribute-value@6.5.1(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - - '@svgr/babel-plugin-svg-dynamic-title@6.5.1(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - - '@svgr/babel-plugin-svg-em-dimensions@6.5.1(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - - '@svgr/babel-plugin-transform-react-native-svg@6.5.1(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - - '@svgr/babel-plugin-transform-svg-component@6.5.1(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - - '@svgr/babel-preset@6.5.1(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@svgr/babel-plugin-add-jsx-attribute': 6.5.1(@babel/core@7.26.10) - '@svgr/babel-plugin-remove-jsx-attribute': 8.0.0(@babel/core@7.26.10) - '@svgr/babel-plugin-remove-jsx-empty-expression': 8.0.0(@babel/core@7.26.10) - '@svgr/babel-plugin-replace-jsx-attribute-value': 6.5.1(@babel/core@7.26.10) - '@svgr/babel-plugin-svg-dynamic-title': 6.5.1(@babel/core@7.26.10) - '@svgr/babel-plugin-svg-em-dimensions': 6.5.1(@babel/core@7.26.10) - '@svgr/babel-plugin-transform-react-native-svg': 6.5.1(@babel/core@7.26.10) - '@svgr/babel-plugin-transform-svg-component': 6.5.1(@babel/core@7.26.10) - - '@svgr/core@6.5.1': - dependencies: - '@babel/core': 7.26.10 - '@svgr/babel-preset': 6.5.1(@babel/core@7.26.10) - '@svgr/plugin-jsx': 6.5.1(@svgr/core@6.5.1) - camelcase: 6.3.0 - cosmiconfig: 7.1.0 - transitivePeerDependencies: - - supports-color - - '@svgr/hast-util-to-babel-ast@6.5.1': - dependencies: - '@babel/types': 7.27.0 - entities: 4.5.0 - - '@svgr/plugin-jsx@6.5.1(@svgr/core@6.5.1)': - dependencies: - '@babel/core': 7.26.10 - '@svgr/babel-preset': 6.5.1(@babel/core@7.26.10) - '@svgr/core': 6.5.1 - '@svgr/hast-util-to-babel-ast': 6.5.1 - svg-parser: 2.0.4 - transitivePeerDependencies: - - supports-color - - '@svgr/plugin-svgo@6.5.1(@svgr/core@6.5.1)': - dependencies: - '@svgr/core': 6.5.1 - cosmiconfig: 7.1.0 - deepmerge: 4.3.1 - svgo: 2.8.0 - - '@swc/core-darwin-arm64@1.11.22': - optional: true - - '@swc/core-darwin-arm64@1.3.96': - optional: true - - '@swc/core-darwin-x64@1.11.22': - optional: true - - '@swc/core-darwin-x64@1.3.96': - optional: true - - '@swc/core-linux-arm-gnueabihf@1.11.22': - optional: true - - '@swc/core-linux-arm-gnueabihf@1.3.96': - optional: true - - '@swc/core-linux-arm64-gnu@1.11.22': - optional: true - - '@swc/core-linux-arm64-gnu@1.3.96': - optional: true - - '@swc/core-linux-arm64-musl@1.11.22': - optional: true - - '@swc/core-linux-arm64-musl@1.3.96': - optional: true - - '@swc/core-linux-x64-gnu@1.11.22': - optional: true - - '@swc/core-linux-x64-gnu@1.3.96': - optional: true - - '@swc/core-linux-x64-musl@1.11.22': - optional: true - - '@swc/core-linux-x64-musl@1.3.96': - optional: true - - '@swc/core-win32-arm64-msvc@1.11.22': - optional: true - - '@swc/core-win32-arm64-msvc@1.3.96': - optional: true - - '@swc/core-win32-ia32-msvc@1.11.22': - optional: true - - '@swc/core-win32-ia32-msvc@1.3.96': - optional: true - - '@swc/core-win32-x64-msvc@1.11.22': - optional: true - - '@swc/core-win32-x64-msvc@1.3.96': - optional: true - - '@swc/core@1.11.22(@swc/helpers@0.5.17)': - dependencies: - '@swc/counter': 0.1.3 - '@swc/types': 0.1.21 - optionalDependencies: - '@swc/core-darwin-arm64': 1.11.22 - '@swc/core-darwin-x64': 1.11.22 - '@swc/core-linux-arm-gnueabihf': 1.11.22 - '@swc/core-linux-arm64-gnu': 1.11.22 - '@swc/core-linux-arm64-musl': 1.11.22 - '@swc/core-linux-x64-gnu': 1.11.22 - '@swc/core-linux-x64-musl': 1.11.22 - '@swc/core-win32-arm64-msvc': 1.11.22 - '@swc/core-win32-ia32-msvc': 1.11.22 - '@swc/core-win32-x64-msvc': 1.11.22 - '@swc/helpers': 0.5.17 - - '@swc/core@1.3.96(@swc/helpers@0.5.17)': - dependencies: - '@swc/counter': 0.1.3 - '@swc/types': 0.1.21 - optionalDependencies: - '@swc/core-darwin-arm64': 1.3.96 - '@swc/core-darwin-x64': 1.3.96 - '@swc/core-linux-arm-gnueabihf': 1.3.96 - '@swc/core-linux-arm64-gnu': 1.3.96 - '@swc/core-linux-arm64-musl': 1.3.96 - '@swc/core-linux-x64-gnu': 1.3.96 - '@swc/core-linux-x64-musl': 1.3.96 - '@swc/core-win32-arm64-msvc': 1.3.96 - '@swc/core-win32-ia32-msvc': 1.3.96 - '@swc/core-win32-x64-msvc': 1.3.96 - '@swc/helpers': 0.5.17 - - '@swc/counter@0.1.3': {} - - '@swc/helpers@0.5.17': - dependencies: - tslib: 2.8.1 - - '@swc/types@0.1.21': - dependencies: - '@swc/counter': 0.1.3 - - '@szmarczak/http-timer@5.0.1': - dependencies: - defer-to-connect: 2.0.1 - - '@tootallnate/once@2.0.0': {} - - '@trysound/sax@0.2.0': {} - - '@tsconfig/node10@1.0.11': {} - - '@tsconfig/node12@1.0.11': {} - - '@tsconfig/node14@1.0.3': {} - - '@tsconfig/node16@1.0.4': {} - - '@types/babel__core@7.20.5': - dependencies: - '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 - '@types/babel__generator': 7.27.0 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.7 - - '@types/babel__generator@7.27.0': - dependencies: - '@babel/types': 7.27.0 - - '@types/babel__template@7.4.4': - dependencies: - '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 - - '@types/babel__traverse@7.20.7': - dependencies: - '@babel/types': 7.27.0 - - '@types/chrome@0.0.258': - dependencies: - '@types/filesystem': 0.0.36 - '@types/har-format': 1.2.16 - - '@types/conventional-commits-parser@5.0.1': - dependencies: - '@types/node': 20.17.31 - optional: true - - '@types/estree@1.0.7': {} - - '@types/filesystem@0.0.36': - dependencies: - '@types/filewriter': 0.0.33 - - '@types/filewriter@0.0.33': {} - - '@types/graceful-fs@4.1.9': - dependencies: - '@types/node': 20.17.31 - - '@types/har-format@1.2.16': {} - - '@types/http-cache-semantics@4.0.4': {} - - '@types/istanbul-lib-coverage@2.0.6': {} - - '@types/istanbul-lib-report@3.0.3': - dependencies: - '@types/istanbul-lib-coverage': 2.0.6 - - '@types/istanbul-reports@3.0.4': - dependencies: - '@types/istanbul-lib-report': 3.0.3 - - '@types/jest@29.5.14': - dependencies: - expect: 29.7.0 - pretty-format: 29.7.0 - - '@types/jsdom@20.0.1': - dependencies: - '@types/node': 20.17.31 - '@types/tough-cookie': 4.0.5 - parse5: 7.3.0 - - '@types/jsdom@21.1.7': - dependencies: - '@types/node': 20.17.31 - '@types/tough-cookie': 4.0.5 - parse5: 7.3.0 - - '@types/node@20.11.5': - dependencies: - undici-types: 5.26.5 - - '@types/node@20.17.31': - dependencies: - undici-types: 6.19.8 - - '@types/parse-json@4.0.2': {} - - '@types/prop-types@15.7.14': {} - - '@types/react-dom@18.2.18': - dependencies: - '@types/react': 18.2.48 - - '@types/react@18.2.48': - dependencies: - '@types/prop-types': 15.7.14 - '@types/scheduler': 0.26.0 - csstype: 3.1.3 - - '@types/scheduler@0.26.0': {} - - '@types/sinonjs__fake-timers@8.1.1': {} - - '@types/sizzle@2.3.9': {} - - '@types/stack-utils@2.0.3': {} - - '@types/tough-cookie@4.0.5': {} - - '@types/trusted-types@2.0.7': {} - - '@types/web@0.0.144': {} - - '@types/webextension-polyfill@0.12.3': {} - - '@types/ws@8.18.1': - dependencies: - '@types/node': 20.17.31 - - '@types/yargs-parser@21.0.3': {} - - '@types/yargs@17.0.33': - dependencies: - '@types/yargs-parser': 21.0.3 - - '@types/yauzl@2.10.3': - dependencies: - '@types/node': 20.17.31 - optional: true - - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 8.57.1 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3)': - dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.0(supports-color@5.5.0) - eslint: 8.57.1 - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@7.18.0': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.8.3)': - dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - debug: 4.4.0(supports-color@5.5.0) - eslint: 8.57.1 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/types@7.18.0': {} - - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.8.3)': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.0(supports-color@5.5.0) - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.7.1 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.8.3)': - dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/visitor-keys@7.18.0': - dependencies: - '@typescript-eslint/types': 7.18.0 - eslint-visitor-keys: 3.4.3 - - '@ungap/structured-clone@1.3.0': {} - - '@vue/compiler-core@3.3.4': - dependencies: - '@babel/parser': 7.27.0 - '@vue/shared': 3.3.4 - estree-walker: 2.0.2 - source-map-js: 1.2.1 - - '@vue/compiler-dom@3.3.4': - dependencies: - '@vue/compiler-core': 3.3.4 - '@vue/shared': 3.3.4 - - '@vue/compiler-sfc@3.3.4': - dependencies: - '@babel/parser': 7.27.0 - '@vue/compiler-core': 3.3.4 - '@vue/compiler-dom': 3.3.4 - '@vue/compiler-ssr': 3.3.4 - '@vue/reactivity-transform': 3.3.4 - '@vue/shared': 3.3.4 - estree-walker: 2.0.2 - magic-string: 0.30.17 - postcss: 8.5.3 - source-map-js: 1.2.1 - - '@vue/compiler-ssr@3.3.4': - dependencies: - '@vue/compiler-dom': 3.3.4 - '@vue/shared': 3.3.4 - - '@vue/reactivity-transform@3.3.4': - dependencies: - '@babel/parser': 7.27.0 - '@vue/compiler-core': 3.3.4 - '@vue/shared': 3.3.4 - estree-walker: 2.0.2 - magic-string: 0.30.17 - - '@vue/reactivity@3.3.4': - dependencies: - '@vue/shared': 3.3.4 - - '@vue/runtime-core@3.3.4': - dependencies: - '@vue/reactivity': 3.3.4 - '@vue/shared': 3.3.4 - - '@vue/runtime-dom@3.3.4': - dependencies: - '@vue/runtime-core': 3.3.4 - '@vue/shared': 3.3.4 - csstype: 3.1.3 - - '@vue/server-renderer@3.3.4(vue@3.3.4)': - dependencies: - '@vue/compiler-ssr': 3.3.4 - '@vue/shared': 3.3.4 - vue: 3.3.4 - - '@vue/shared@3.3.4': {} - - abab@2.0.6: {} - - abortcontroller-polyfill@1.7.5: {} - - abortcontroller-polyfill@1.7.8: {} - - accepts@1.3.8: - dependencies: - mime-types: 2.1.35 - negotiator: 0.6.3 - - acorn-globals@7.0.1: - dependencies: - acorn: 8.14.1 - acorn-walk: 8.3.4 - - acorn-jsx@5.3.2(acorn@8.14.1): - dependencies: - acorn: 8.14.1 - - acorn-walk@8.3.4: - dependencies: - acorn: 8.14.1 - - acorn@8.14.1: {} - - agent-base@6.0.2: - dependencies: - debug: 4.4.0(supports-color@5.5.0) - transitivePeerDependencies: - - supports-color - - agent-base@7.1.3: {} - - aggregate-error@3.1.0: - dependencies: - clean-stack: 2.2.0 - indent-string: 4.0.0 - - ajv@6.12.6: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - - ajv@8.17.1: - dependencies: - fast-deep-equal: 3.1.3 - fast-uri: 3.0.6 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - optional: true - - ansi-colors@4.1.3: {} - - ansi-escapes@4.3.2: - dependencies: - type-fest: 0.21.3 - - ansi-regex@5.0.1: {} - - ansi-regex@6.1.0: {} - - ansi-styles@3.2.1: - dependencies: - color-convert: 1.9.3 - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - ansi-styles@5.2.0: {} - - ansi-styles@6.2.1: {} - - any-promise@1.3.0: {} - - anymatch@3.1.3: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - - arch@2.2.0: {} - - arg@4.1.3: {} - - arg@5.0.2: {} - - argparse@1.0.10: - dependencies: - sprintf-js: 1.0.3 - - argparse@2.0.1: {} - - aria-query@5.3.2: {} - - array-flatten@1.1.1: {} - - array-union@2.1.0: {} - - asn1@0.2.6: - dependencies: - safer-buffer: 2.1.2 - - assert-plus@1.0.0: {} - - astral-regex@2.0.0: {} - - async@3.2.6: {} - - asynckit@0.4.0: {} - - at-least-node@1.0.0: {} - - autoprefixer@10.4.21(postcss@8.5.3): - dependencies: - browserslist: 4.24.4 - caniuse-lite: 1.0.30001715 - fraction.js: 4.3.7 - normalize-range: 0.1.2 - picocolors: 1.1.1 - postcss: 8.5.3 - postcss-value-parser: 4.2.0 - - aws-sign2@0.7.0: {} - - aws4@1.13.2: {} - - axobject-query@3.2.4: {} - - babel-jest@29.7.0(@babel/core@7.26.10): - dependencies: - '@babel/core': 7.26.10 - '@jest/transform': 29.7.0 - '@types/babel__core': 7.20.5 - babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.26.10) - chalk: 4.1.2 - graceful-fs: 4.2.11 - slash: 3.0.0 - transitivePeerDependencies: - - supports-color - - babel-plugin-istanbul@6.1.1: - dependencies: - '@babel/helper-plugin-utils': 7.26.5 - '@istanbuljs/load-nyc-config': 1.1.0 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-instrument: 5.2.1 - test-exclude: 6.0.0 - transitivePeerDependencies: - - supports-color - - babel-plugin-jest-hoist@29.6.3: - dependencies: - '@babel/template': 7.27.0 - '@babel/types': 7.27.0 - '@types/babel__core': 7.20.5 - '@types/babel__traverse': 7.20.7 - - babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.10): - dependencies: - '@babel/core': 7.26.10 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.10) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.10) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.10) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.10) - '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.10) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.10) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.10) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.10) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.10) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.10) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.10) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.10) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.10) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.10) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.10) - - babel-preset-jest@29.6.3(@babel/core@7.26.10): - dependencies: - '@babel/core': 7.26.10 - babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.10) - - balanced-match@1.0.2: {} - - base-x@3.0.11: - dependencies: - safe-buffer: 5.2.1 - - base64-js@1.5.1: {} - - bcrypt-pbkdf@1.0.2: - dependencies: - tweetnacl: 0.14.5 - - binary-extensions@2.3.0: {} - - bl@4.1.0: - dependencies: - buffer: 5.7.1 - inherits: 2.0.4 - readable-stream: 3.6.2 - - blob-util@2.0.2: {} - - bluebird@3.7.2: {} - - body-parser@1.20.3: - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.13.0 - raw-body: 2.5.2 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - - boolbase@1.0.0: {} - - brace-expansion@1.1.11: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - - brace-expansion@2.0.1: - dependencies: - balanced-match: 1.0.2 - - braces@3.0.3: - dependencies: - fill-range: 7.1.1 - - browserslist@4.22.1: - dependencies: - caniuse-lite: 1.0.30001715 - electron-to-chromium: 1.5.143 - node-releases: 2.0.19 - update-browserslist-db: 1.1.3(browserslist@4.22.1) - - browserslist@4.24.4: - dependencies: - caniuse-lite: 1.0.30001715 - electron-to-chromium: 1.5.143 - node-releases: 2.0.19 - update-browserslist-db: 1.1.3(browserslist@4.24.4) - - bser@2.1.1: - dependencies: - node-int64: 0.4.0 - - buffer-crc32@0.2.13: {} - - buffer-from@1.1.2: {} - - buffer@5.7.1: - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - - buffer@6.0.3: - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - - bundle-require@3.1.2(esbuild@0.14.54): - dependencies: - esbuild: 0.14.54 - load-tsconfig: 0.2.5 - - bundle-require@4.2.1(esbuild@0.18.20): - dependencies: - esbuild: 0.18.20 - load-tsconfig: 0.2.5 - - bytes@3.1.2: {} - - cac@6.7.14: {} - - cacheable-lookup@7.0.0: {} - - cacheable-request@10.2.14: - dependencies: - '@types/http-cache-semantics': 4.0.4 - get-stream: 6.0.1 - http-cache-semantics: 4.1.1 - keyv: 4.5.4 - mimic-response: 4.0.0 - normalize-url: 8.0.1 - responselike: 3.0.0 - - cacheable-request@12.0.1: - dependencies: - '@types/http-cache-semantics': 4.0.4 - get-stream: 9.0.1 - http-cache-semantics: 4.1.1 - keyv: 4.5.4 - mimic-response: 4.0.0 - normalize-url: 8.0.1 - responselike: 3.0.0 - - cachedir@2.3.0: {} - - cachedir@2.4.0: {} - - call-bind-apply-helpers@1.0.2: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - - call-bound@1.0.4: - dependencies: - call-bind-apply-helpers: 1.0.2 - get-intrinsic: 1.3.0 - - callsites@3.1.0: {} - - camelcase-css@2.0.1: {} - - camelcase@5.3.1: {} - - camelcase@6.3.0: {} - - caniuse-lite@1.0.30001715: {} - - caseless@0.12.0: {} - - chalk@2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - chalk@5.3.0: {} - - chalk@5.4.1: - optional: true - - change-case@5.1.2: {} - - char-regex@1.0.2: {} - - chardet@0.7.0: {} - - check-more-types@2.24.0: {} - - chokidar@3.6.0: - dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - - chokidar@4.0.3: - dependencies: - readdirp: 4.1.2 - - chrome-trace-event@1.0.4: {} - - ci-info@3.9.0: {} - - ci-info@4.2.0: {} - - cjs-module-lexer@1.4.3: {} - - clean-stack@2.2.0: {} - - cli-cursor@3.1.0: - dependencies: - restore-cursor: 3.1.0 - - cli-spinners@2.9.2: {} - - cli-table3@0.6.5: - dependencies: - string-width: 4.2.3 - optionalDependencies: - '@colors/colors': 1.5.0 - - cli-truncate@2.1.0: - dependencies: - slice-ansi: 3.0.0 - string-width: 4.2.3 - - cli-width@3.0.0: {} - - cli-width@4.1.0: {} - - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - clone@1.0.4: {} - - clone@2.1.2: {} - - co@4.6.0: {} - - code-red@1.0.4: - dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.7 - acorn: 8.14.1 - estree-walker: 3.0.3 - periscopic: 3.1.0 - - collect-v8-coverage@1.0.2: {} - - color-convert@1.9.3: - dependencies: - color-name: 1.1.3 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.3: {} - - color-name@1.1.4: {} - - color-string@1.9.1: - dependencies: - color-name: 1.1.4 - simple-swizzle: 0.2.2 - - color@4.2.3: - dependencies: - color-convert: 2.0.1 - color-string: 1.9.1 - - colorette@2.0.20: {} - - combined-stream@1.0.8: - dependencies: - delayed-stream: 1.0.0 - - commander@12.1.0: {} - - commander@4.1.1: {} - - commander@6.2.1: {} - - commander@7.2.0: {} - - commitizen@4.3.1(@types/node@20.17.31)(typescript@5.8.3): - dependencies: - cachedir: 2.3.0 - cz-conventional-changelog: 3.3.0(@types/node@20.17.31)(typescript@5.8.3) - dedent: 0.7.0 - detect-indent: 6.1.0 - find-node-modules: 2.1.3 - find-root: 1.1.0 - fs-extra: 9.1.0 - glob: 7.2.3 - inquirer: 8.2.5 - is-utf8: 0.2.1 - lodash: 4.17.21 - minimist: 1.2.7 - strip-bom: 4.0.0 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - '@types/node' - - typescript - - common-tags@1.8.2: {} - - concat-map@0.0.1: {} - - config-chain@1.1.13: - dependencies: - ini: 1.3.8 - proto-list: 1.2.4 - - content-disposition@0.5.4: - dependencies: - safe-buffer: 5.2.1 - - content-security-policy-parser@0.4.1: {} - - content-type@1.0.5: {} - - conventional-commit-types@3.0.0: {} - - convert-source-map@2.0.0: {} - - cookie-signature@1.0.6: {} - - cookie@0.7.1: {} - - copy-anything@2.0.6: - dependencies: - is-what: 3.14.1 - - core-util-is@1.0.2: {} - - cosmiconfig-typescript-loader@6.1.0(@types/node@20.17.31)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3): - dependencies: - '@types/node': 20.17.31 - cosmiconfig: 9.0.0(typescript@5.8.3) - jiti: 2.4.2 - typescript: 5.8.3 - optional: true - - cosmiconfig@7.1.0: - dependencies: - '@types/parse-json': 4.0.2 - import-fresh: 3.3.1 - parse-json: 5.2.0 - path-type: 4.0.0 - yaml: 1.10.2 - - cosmiconfig@9.0.0(typescript@5.2.2): - dependencies: - env-paths: 2.2.1 - import-fresh: 3.3.1 - js-yaml: 4.1.0 - parse-json: 5.2.0 - optionalDependencies: - typescript: 5.2.2 - - cosmiconfig@9.0.0(typescript@5.8.3): - dependencies: - env-paths: 2.2.1 - import-fresh: 3.3.1 - js-yaml: 4.1.0 - parse-json: 5.2.0 - optionalDependencies: - typescript: 5.8.3 - optional: true - - create-jest@29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - - create-require@1.1.1: {} - - cross-spawn@7.0.6: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - crypto-random-string@4.0.0: - dependencies: - type-fest: 1.4.0 - - css-select@4.3.0: - dependencies: - boolbase: 1.0.0 - css-what: 6.1.0 - domhandler: 4.3.1 - domutils: 2.8.0 - nth-check: 2.1.1 - - css-tree@1.1.3: - dependencies: - mdn-data: 2.0.14 - source-map: 0.6.1 - - css-tree@2.3.1: - dependencies: - mdn-data: 2.0.30 - source-map-js: 1.2.1 - - css-what@6.1.0: {} - - cssesc@3.0.0: {} - - csso@4.2.0: - dependencies: - css-tree: 1.1.3 - - cssom@0.3.8: {} - - cssom@0.5.0: {} - - cssstyle@2.3.0: - dependencies: - cssom: 0.3.8 - - cssstyle@4.3.1: - dependencies: - '@asamuzakjp/css-color': 3.1.5 - rrweb-cssom: 0.8.0 - - csstype@3.1.3: {} - - cypress@13.17.0: - dependencies: - '@cypress/request': 3.0.8 - '@cypress/xvfb': 1.2.4(supports-color@8.1.1) - '@types/sinonjs__fake-timers': 8.1.1 - '@types/sizzle': 2.3.9 - arch: 2.2.0 - blob-util: 2.0.2 - bluebird: 3.7.2 - buffer: 5.7.1 - cachedir: 2.4.0 - chalk: 4.1.2 - check-more-types: 2.24.0 - ci-info: 4.2.0 - cli-cursor: 3.1.0 - cli-table3: 0.6.5 - commander: 6.2.1 - common-tags: 1.8.2 - dayjs: 1.11.13 - debug: 4.4.0(supports-color@8.1.1) - enquirer: 2.4.1 - eventemitter2: 6.4.7 - execa: 4.1.0 - executable: 4.1.1 - extract-zip: 2.0.1(supports-color@8.1.1) - figures: 3.2.0 - fs-extra: 9.1.0 - getos: 3.2.1 - is-installed-globally: 0.4.0 - lazy-ass: 1.6.0 - listr2: 3.14.0(enquirer@2.4.1) - lodash: 4.17.21 - log-symbols: 4.1.0 - minimist: 1.2.8 - ospath: 1.2.2 - pretty-bytes: 5.6.0 - process: 0.11.10 - proxy-from-env: 1.0.0 - request-progress: 3.0.0 - semver: 7.7.1 - supports-color: 8.1.1 - tmp: 0.2.3 - tree-kill: 1.2.2 - untildify: 4.0.0 - yauzl: 2.10.0 - - cz-conventional-changelog@3.3.0(@types/node@20.17.31)(typescript@5.8.3): - dependencies: - chalk: 2.4.2 - commitizen: 4.3.1(@types/node@20.17.31)(typescript@5.8.3) - conventional-commit-types: 3.0.0 - lodash.map: 4.6.0 - longest: 2.0.1 - word-wrap: 1.2.5 - optionalDependencies: - '@commitlint/load': 19.8.0(@types/node@20.17.31)(typescript@5.8.3) - transitivePeerDependencies: - - '@types/node' - - typescript - - dashdash@1.14.1: - dependencies: - assert-plus: 1.0.0 - - data-urls@3.0.2: - dependencies: - abab: 2.0.6 - whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 - - data-urls@5.0.0: - dependencies: - whatwg-mimetype: 4.0.0 - whatwg-url: 14.2.0 - - dayjs@1.11.13: {} - - debug@2.6.9: - dependencies: - ms: 2.0.0 - - debug@3.2.7(supports-color@8.1.1): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - debug@4.4.0(supports-color@5.5.0): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 5.5.0 - - debug@4.4.0(supports-color@8.1.1): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - decimal.js@10.5.0: {} - - decompress-response@6.0.0: - dependencies: - mimic-response: 3.1.0 - - dedent@0.7.0: {} - - dedent@1.5.3: {} - - deep-extend@0.6.0: {} - - deep-is@0.1.4: {} - - deepmerge@4.3.1: {} - - defaults@1.0.4: - dependencies: - clone: 1.0.4 - - defer-to-connect@2.0.1: {} - - delayed-stream@1.0.0: {} - - depd@2.0.0: {} - - destroy@1.2.0: {} - - detect-browser@5.3.0: {} - - detect-file@1.0.0: {} - - detect-indent@6.1.0: {} - - detect-libc@1.0.3: {} - - detect-libc@2.0.4: {} - - detect-newline@3.1.0: {} - - didyoumean@1.2.2: {} - - diff-sequences@29.6.3: {} - - diff@4.0.2: {} - - dir-glob@3.0.1: - dependencies: - path-type: 4.0.0 - - dlv@1.1.3: {} - - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - - dom-serializer@1.4.1: - dependencies: - domelementtype: 2.3.0 - domhandler: 4.3.1 - entities: 2.2.0 - - dom-storage@2.1.0: {} - - domelementtype@2.3.0: {} - - domexception@4.0.0: - dependencies: - webidl-conversions: 7.0.0 - - domhandler@4.3.1: - dependencies: - domelementtype: 2.3.0 - - domutils@2.8.0: - dependencies: - dom-serializer: 1.4.1 - domelementtype: 2.3.0 - domhandler: 4.3.1 - - dotenv-expand@12.0.1: - dependencies: - dotenv: 16.5.0 - - dotenv-expand@5.1.0: {} - - dotenv@16.3.1: {} - - dotenv@16.5.0: {} - - dotenv@7.0.0: {} - - dunder-proto@1.0.1: - dependencies: - call-bind-apply-helpers: 1.0.2 - es-errors: 1.3.0 - gopd: 1.2.0 - - eastasianwidth@0.2.0: {} - - ecc-jsbn@0.1.2: - dependencies: - jsbn: 0.1.1 - safer-buffer: 2.1.2 - - ee-first@1.1.1: {} - - electron-to-chromium@1.5.143: {} - - emittery@0.13.1: {} - - emoji-regex@8.0.0: {} - - emoji-regex@9.2.2: {} - - encodeurl@1.0.2: {} - - encodeurl@2.0.0: {} - - end-of-stream@1.4.4: - dependencies: - once: 1.4.0 - - enquirer@2.4.1: - dependencies: - ansi-colors: 4.1.3 - strip-ansi: 6.0.1 - - entities@2.2.0: {} - - entities@3.0.1: {} - - entities@4.5.0: {} - - entities@6.0.0: {} - - env-paths@2.2.1: {} - - errno@0.1.8: - dependencies: - prr: 1.0.1 - optional: true - - error-ex@1.3.2: - dependencies: - is-arrayish: 0.2.1 - - es-define-property@1.0.1: {} - - es-errors@1.3.0: {} - - es-object-atoms@1.1.1: - dependencies: - es-errors: 1.3.0 - - es-set-tostringtag@2.1.0: - dependencies: - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - - esbuild-android-64@0.14.54: - optional: true - - esbuild-android-arm64@0.14.54: - optional: true - - esbuild-darwin-64@0.14.54: - optional: true - - esbuild-darwin-arm64@0.14.54: - optional: true - - esbuild-freebsd-64@0.14.54: - optional: true - - esbuild-freebsd-arm64@0.14.54: - optional: true - - esbuild-linux-32@0.14.54: - optional: true - - esbuild-linux-64@0.14.54: - optional: true - - esbuild-linux-arm64@0.14.54: - optional: true - - esbuild-linux-arm@0.14.54: - optional: true - - esbuild-linux-mips64le@0.14.54: - optional: true - - esbuild-linux-ppc64le@0.14.54: - optional: true - - esbuild-linux-riscv64@0.14.54: - optional: true - - esbuild-linux-s390x@0.14.54: - optional: true - - esbuild-netbsd-64@0.14.54: - optional: true - - esbuild-openbsd-64@0.14.54: - optional: true - - esbuild-sunos-64@0.14.54: - optional: true - - esbuild-windows-32@0.14.54: - optional: true - - esbuild-windows-64@0.14.54: - optional: true - - esbuild-windows-arm64@0.14.54: - optional: true - - esbuild@0.14.54: - optionalDependencies: - '@esbuild/linux-loong64': 0.14.54 - esbuild-android-64: 0.14.54 - esbuild-android-arm64: 0.14.54 - esbuild-darwin-64: 0.14.54 - esbuild-darwin-arm64: 0.14.54 - esbuild-freebsd-64: 0.14.54 - esbuild-freebsd-arm64: 0.14.54 - esbuild-linux-32: 0.14.54 - esbuild-linux-64: 0.14.54 - esbuild-linux-arm: 0.14.54 - esbuild-linux-arm64: 0.14.54 - esbuild-linux-mips64le: 0.14.54 - esbuild-linux-ppc64le: 0.14.54 - esbuild-linux-riscv64: 0.14.54 - esbuild-linux-s390x: 0.14.54 - esbuild-netbsd-64: 0.14.54 - esbuild-openbsd-64: 0.14.54 - esbuild-sunos-64: 0.14.54 - esbuild-windows-32: 0.14.54 - esbuild-windows-64: 0.14.54 - esbuild-windows-arm64: 0.14.54 - - esbuild@0.18.20: - optionalDependencies: - '@esbuild/android-arm': 0.18.20 - '@esbuild/android-arm64': 0.18.20 - '@esbuild/android-x64': 0.18.20 - '@esbuild/darwin-arm64': 0.18.20 - '@esbuild/darwin-x64': 0.18.20 - '@esbuild/freebsd-arm64': 0.18.20 - '@esbuild/freebsd-x64': 0.18.20 - '@esbuild/linux-arm': 0.18.20 - '@esbuild/linux-arm64': 0.18.20 - '@esbuild/linux-ia32': 0.18.20 - '@esbuild/linux-loong64': 0.18.20 - '@esbuild/linux-mips64el': 0.18.20 - '@esbuild/linux-ppc64': 0.18.20 - '@esbuild/linux-riscv64': 0.18.20 - '@esbuild/linux-s390x': 0.18.20 - '@esbuild/linux-x64': 0.18.20 - '@esbuild/netbsd-x64': 0.18.20 - '@esbuild/openbsd-x64': 0.18.20 - '@esbuild/sunos-x64': 0.18.20 - '@esbuild/win32-arm64': 0.18.20 - '@esbuild/win32-ia32': 0.18.20 - '@esbuild/win32-x64': 0.18.20 - - esbuild@0.21.5: - optionalDependencies: - '@esbuild/aix-ppc64': 0.21.5 - '@esbuild/android-arm': 0.21.5 - '@esbuild/android-arm64': 0.21.5 - '@esbuild/android-x64': 0.21.5 - '@esbuild/darwin-arm64': 0.21.5 - '@esbuild/darwin-x64': 0.21.5 - '@esbuild/freebsd-arm64': 0.21.5 - '@esbuild/freebsd-x64': 0.21.5 - '@esbuild/linux-arm': 0.21.5 - '@esbuild/linux-arm64': 0.21.5 - '@esbuild/linux-ia32': 0.21.5 - '@esbuild/linux-loong64': 0.21.5 - '@esbuild/linux-mips64el': 0.21.5 - '@esbuild/linux-ppc64': 0.21.5 - '@esbuild/linux-riscv64': 0.21.5 - '@esbuild/linux-s390x': 0.21.5 - '@esbuild/linux-x64': 0.21.5 - '@esbuild/netbsd-x64': 0.21.5 - '@esbuild/openbsd-x64': 0.21.5 - '@esbuild/sunos-x64': 0.21.5 - '@esbuild/win32-arm64': 0.21.5 - '@esbuild/win32-ia32': 0.21.5 - '@esbuild/win32-x64': 0.21.5 - - escalade@3.2.0: {} - - escape-html@1.0.3: {} - - escape-string-regexp@1.0.5: {} - - escape-string-regexp@2.0.0: {} - - escape-string-regexp@4.0.0: {} - - escodegen@2.1.0: - dependencies: - esprima: 4.0.1 - estraverse: 5.3.0 - esutils: 2.0.3 - optionalDependencies: - source-map: 0.6.1 - - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint@8.57.1: - dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) - '@eslint-community/regexpp': 4.12.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.3.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.0(supports-color@5.5.0) - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - espree@9.6.1: - dependencies: - acorn: 8.14.1 - acorn-jsx: 5.3.2(acorn@8.14.1) - eslint-visitor-keys: 3.4.3 - - esprima@4.0.1: {} - - esquery@1.6.0: - dependencies: - estraverse: 5.3.0 - - esrecurse@4.3.0: - dependencies: - estraverse: 5.3.0 - - estraverse@5.3.0: {} - - estree-walker@2.0.2: {} - - estree-walker@3.0.3: - dependencies: - '@types/estree': 1.0.7 - - esutils@2.0.3: {} - - etag@1.8.1: {} - - eventemitter2@6.4.7: {} - - events@3.3.0: {} - - execa@4.1.0: - dependencies: - cross-spawn: 7.0.6 - get-stream: 5.2.0 - human-signals: 1.1.1 - is-stream: 2.0.1 - merge-stream: 2.0.0 - npm-run-path: 4.0.1 - onetime: 5.1.2 - signal-exit: 3.0.7 - strip-final-newline: 2.0.0 - - execa@5.1.1: - dependencies: - cross-spawn: 7.0.6 - get-stream: 6.0.1 - human-signals: 2.1.0 - is-stream: 2.0.1 - merge-stream: 2.0.0 - npm-run-path: 4.0.1 - onetime: 5.1.2 - signal-exit: 3.0.7 - strip-final-newline: 2.0.0 - - executable@4.1.1: - dependencies: - pify: 2.3.0 - - exit@0.1.2: {} - - expand-tilde@2.0.2: - dependencies: - homedir-polyfill: 1.0.3 - - expect@29.7.0: - dependencies: - '@jest/expect-utils': 29.7.0 - jest-get-type: 29.6.3 - jest-matcher-utils: 29.7.0 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - - express@4.21.2: - dependencies: - accepts: 1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.3 - content-disposition: 0.5.4 - content-type: 1.0.5 - cookie: 0.7.1 - cookie-signature: 1.0.6 - debug: 2.6.9 - depd: 2.0.0 - encodeurl: 2.0.0 - escape-html: 1.0.3 - etag: 1.8.1 - finalhandler: 1.3.1 - fresh: 0.5.2 - http-errors: 2.0.0 - merge-descriptors: 1.0.3 - methods: 1.1.2 - on-finished: 2.4.1 - parseurl: 1.3.3 - path-to-regexp: 0.1.12 - proxy-addr: 2.0.7 - qs: 6.13.0 - range-parser: 1.2.1 - safe-buffer: 5.2.1 - send: 0.19.0 - serve-static: 1.16.2 - setprototypeof: 1.2.0 - statuses: 2.0.1 - type-is: 1.6.18 - utils-merge: 1.0.1 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - - extend@3.0.2: {} - - external-editor@3.1.0: - dependencies: - chardet: 0.7.0 - iconv-lite: 0.4.24 - tmp: 0.0.33 - - extract-zip@2.0.1(supports-color@8.1.1): - dependencies: - debug: 4.4.0(supports-color@8.1.1) - get-stream: 5.2.0 - yauzl: 2.10.0 - optionalDependencies: - '@types/yauzl': 2.10.3 - transitivePeerDependencies: - - supports-color - - extsprintf@1.3.0: {} - - fast-deep-equal@3.1.3: {} - - fast-glob@3.3.2: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.8 - - fast-glob@3.3.3: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.8 - - fast-json-stable-stringify@2.1.0: {} - - fast-levenshtein@2.0.6: {} - - fast-uri@3.0.6: - optional: true - - fastq@1.19.1: - dependencies: - reusify: 1.1.0 - - fb-watchman@2.0.2: - dependencies: - bser: 2.1.1 - - fd-slicer@1.1.0: - dependencies: - pend: 1.2.0 - - fflate@0.8.1: {} - - figures@3.2.0: - dependencies: - escape-string-regexp: 1.0.5 - - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 - - fill-range@7.1.1: - dependencies: - to-regex-range: 5.0.1 - - finalhandler@1.3.1: - dependencies: - debug: 2.6.9 - encodeurl: 2.0.0 - escape-html: 1.0.3 - on-finished: 2.4.1 - parseurl: 1.3.3 - statuses: 2.0.1 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - - find-node-modules@2.1.3: - dependencies: - findup-sync: 4.0.0 - merge: 2.1.1 - - find-root@1.1.0: {} - - find-up@4.1.0: - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - findup-sync@4.0.0: - dependencies: - detect-file: 1.0.0 - is-glob: 4.0.3 - micromatch: 4.0.8 - resolve-dir: 1.0.1 - - flat-cache@3.2.0: - dependencies: - flatted: 3.3.3 - keyv: 4.5.4 - rimraf: 3.0.2 - - flatted@3.3.3: {} - - foreground-child@3.3.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - - forever-agent@0.6.1: {} - - form-data-encoder@2.1.4: {} - - form-data-encoder@4.0.2: {} - - form-data@4.0.2: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - mime-types: 2.1.35 - - forwarded@0.2.0: {} - - fraction.js@4.3.7: {} - - fresh@0.5.2: {} - - fs-extra@11.1.1: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.1 - - fs-extra@9.1.0: - dependencies: - at-least-node: 1.0.0 - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.1 - - fs.realpath@1.0.0: {} - - fsevents@2.3.2: - optional: true - - fsevents@2.3.3: - optional: true - - function-bind@1.1.2: {} - - gensync@1.0.0-beta.2: {} - - get-caller-file@2.0.5: {} - - get-intrinsic@1.3.0: - dependencies: - call-bind-apply-helpers: 1.0.2 - es-define-property: 1.0.1 - es-errors: 1.3.0 - es-object-atoms: 1.1.1 - function-bind: 1.1.2 - get-proto: 1.0.1 - gopd: 1.2.0 - has-symbols: 1.1.0 - hasown: 2.0.2 - math-intrinsics: 1.1.0 - - get-package-type@0.1.0: {} - - get-port@7.0.0: {} - - get-proto@1.0.1: - dependencies: - dunder-proto: 1.0.1 - es-object-atoms: 1.1.1 - - get-stream@5.2.0: - dependencies: - pump: 3.0.2 - - get-stream@6.0.1: {} - - get-stream@9.0.1: - dependencies: - '@sec-ant/readable-stream': 0.4.1 - is-stream: 4.0.1 - - getos@3.2.1: - dependencies: - async: 3.2.6 - - getpass@0.1.7: - dependencies: - assert-plus: 1.0.0 - - glob-parent@5.1.2: - dependencies: - is-glob: 4.0.3 - - glob-parent@6.0.2: - dependencies: - is-glob: 4.0.3 - - glob@10.4.5: - dependencies: - foreground-child: 3.3.1 - jackspeak: 3.4.3 - minimatch: 9.0.5 - minipass: 7.1.2 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - global-directory@4.0.1: - dependencies: - ini: 4.1.1 - optional: true - - global-dirs@3.0.1: - dependencies: - ini: 2.0.0 - - global-jsdom@24.0.0(jsdom@24.1.3): - dependencies: - jsdom: 24.1.3 - - global-modules@1.0.0: - dependencies: - global-prefix: 1.0.2 - is-windows: 1.0.2 - resolve-dir: 1.0.1 - - global-prefix@1.0.2: - dependencies: - expand-tilde: 2.0.2 - homedir-polyfill: 1.0.3 - ini: 1.3.8 - is-windows: 1.0.2 - which: 1.3.1 - - globals@11.12.0: {} - - globals@13.24.0: - dependencies: - type-fest: 0.20.2 - - globals@15.15.0: {} - - globby@11.1.0: - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.3 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 3.0.0 - - gopd@1.2.0: {} - - got@13.0.0: - dependencies: - '@sindresorhus/is': 5.6.0 - '@szmarczak/http-timer': 5.0.1 - cacheable-lookup: 7.0.0 - cacheable-request: 10.2.14 - decompress-response: 6.0.0 - form-data-encoder: 2.1.4 - get-stream: 6.0.1 - http2-wrapper: 2.2.1 - lowercase-keys: 3.0.0 - p-cancelable: 3.0.0 - responselike: 3.0.0 - - got@14.4.5: - dependencies: - '@sindresorhus/is': 7.0.1 - '@szmarczak/http-timer': 5.0.1 - cacheable-lookup: 7.0.0 - cacheable-request: 12.0.1 - decompress-response: 6.0.0 - form-data-encoder: 4.0.2 - http2-wrapper: 2.2.1 - lowercase-keys: 3.0.0 - p-cancelable: 4.0.1 - responselike: 3.0.0 - type-fest: 4.40.1 - - graceful-fs@4.2.10: {} - - graceful-fs@4.2.11: {} - - graphemer@1.4.0: {} - - graphql-import-macro@1.0.0: - dependencies: - graphql: 15.10.1 - - graphql@15.10.1: {} - - has-flag@3.0.0: {} - - has-flag@4.0.0: {} - - has-symbols@1.1.0: {} - - has-tostringtag@1.0.2: - dependencies: - has-symbols: 1.1.0 - - hasown@2.0.2: - dependencies: - function-bind: 1.1.2 - - homedir-polyfill@1.0.3: - dependencies: - parse-passwd: 1.0.0 - - html-encoding-sniffer@3.0.0: - dependencies: - whatwg-encoding: 2.0.0 - - html-encoding-sniffer@4.0.0: - dependencies: - whatwg-encoding: 3.1.1 - - html-escaper@2.0.2: {} - - htmlnano@2.1.1(postcss@8.5.3)(svgo@2.8.0)(typescript@5.2.2): - dependencies: - cosmiconfig: 9.0.0(typescript@5.2.2) - posthtml: 0.16.6 - timsort: 0.3.0 - optionalDependencies: - postcss: 8.5.3 - svgo: 2.8.0 - transitivePeerDependencies: - - typescript - - htmlparser2@7.2.0: - dependencies: - domelementtype: 2.3.0 - domhandler: 4.3.1 - domutils: 2.8.0 - entities: 3.0.1 - - http-cache-semantics@4.1.1: {} - - http-errors@2.0.0: - dependencies: - depd: 2.0.0 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 2.0.1 - toidentifier: 1.0.1 - - http-proxy-agent@5.0.0: - dependencies: - '@tootallnate/once': 2.0.0 - agent-base: 6.0.2 - debug: 4.4.0(supports-color@5.5.0) - transitivePeerDependencies: - - supports-color - - http-proxy-agent@7.0.2: - dependencies: - agent-base: 7.1.3 - debug: 4.4.0(supports-color@5.5.0) - transitivePeerDependencies: - - supports-color - - http-signature@1.4.0: - dependencies: - assert-plus: 1.0.0 - jsprim: 2.0.2 - sshpk: 1.18.0 - - http2-wrapper@2.2.1: - dependencies: - quick-lru: 5.1.1 - resolve-alpn: 1.2.1 - - https-proxy-agent@5.0.1: - dependencies: - agent-base: 6.0.2 - debug: 4.4.0(supports-color@5.5.0) - transitivePeerDependencies: - - supports-color - - https-proxy-agent@7.0.6: - dependencies: - agent-base: 7.1.3 - debug: 4.4.0(supports-color@5.5.0) - transitivePeerDependencies: - - supports-color - - human-signals@1.1.1: {} - - human-signals@2.1.0: {} - - husky@9.1.7: {} - - iconv-lite@0.4.24: - dependencies: - safer-buffer: 2.1.2 - - iconv-lite@0.6.3: - dependencies: - safer-buffer: 2.1.2 - - ieee754@1.2.1: {} - - ignore-by-default@1.0.1: {} - - ignore@5.3.2: {} - - ignore@7.0.3: {} - - image-size@0.5.5: - optional: true - - immutable@5.1.1: {} - - import-fresh@3.3.1: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - - import-local@3.2.0: - dependencies: - pkg-dir: 4.2.0 - resolve-cwd: 3.0.0 - - import-meta-resolve@4.1.0: - optional: true - - imurmurhash@0.1.4: {} - - indent-string@4.0.0: {} - - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - - ini@1.3.8: {} - - ini@2.0.0: {} - - ini@4.1.1: - optional: true - - inquirer@12.4.1(@types/node@20.11.5): - dependencies: - '@inquirer/core': 10.1.10(@types/node@20.11.5) - '@inquirer/prompts': 7.5.0(@types/node@20.11.5) - '@inquirer/type': 3.0.6(@types/node@20.11.5) - ansi-escapes: 4.3.2 - mute-stream: 2.0.0 - run-async: 3.0.0 - rxjs: 7.8.2 - optionalDependencies: - '@types/node': 20.11.5 - - inquirer@8.2.5: - dependencies: - ansi-escapes: 4.3.2 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-width: 3.0.0 - external-editor: 3.1.0 - figures: 3.2.0 - lodash: 4.17.21 - mute-stream: 0.0.8 - ora: 5.4.1 - run-async: 2.4.1 - rxjs: 7.8.2 - string-width: 4.2.3 - strip-ansi: 6.0.1 - through: 2.3.8 - wrap-ansi: 7.0.0 - - ipaddr.js@1.9.1: {} - - is-arrayish@0.2.1: {} - - is-arrayish@0.3.2: {} - - is-binary-path@2.1.0: - dependencies: - binary-extensions: 2.3.0 - - is-core-module@2.16.1: - dependencies: - hasown: 2.0.2 - - is-extglob@2.1.1: {} - - is-fullwidth-code-point@3.0.0: {} - - is-generator-fn@2.1.0: {} - - is-glob@4.0.3: - dependencies: - is-extglob: 2.1.1 - - is-installed-globally@0.4.0: - dependencies: - global-dirs: 3.0.1 - is-path-inside: 3.0.3 - - is-interactive@1.0.0: {} - - is-json@2.0.1: {} - - is-number@7.0.0: {} - - is-path-inside@3.0.3: {} - - is-path-inside@4.0.0: {} - - is-potential-custom-element-name@1.0.1: {} - - is-reference@3.0.3: - dependencies: - '@types/estree': 1.0.7 - - is-stream@2.0.1: {} - - is-stream@3.0.0: {} - - is-stream@4.0.1: {} - - is-typedarray@1.0.0: {} - - is-unicode-supported@0.1.0: {} - - is-utf8@0.2.1: {} - - is-what@3.14.1: {} - - is-windows@1.0.2: {} - - isbinaryfile@4.0.10: {} - - isexe@2.0.0: {} - - isstream@0.1.2: {} - - istanbul-lib-coverage@3.2.2: {} - - istanbul-lib-instrument@5.2.1: - dependencies: - '@babel/core': 7.26.10 - '@babel/parser': 7.27.0 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.2 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - istanbul-lib-instrument@6.0.3: - dependencies: - '@babel/core': 7.26.10 - '@babel/parser': 7.27.0 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.2 - semver: 7.7.1 - transitivePeerDependencies: - - supports-color - - istanbul-lib-report@3.0.1: - dependencies: - istanbul-lib-coverage: 3.2.2 - make-dir: 4.0.0 - supports-color: 7.2.0 - - istanbul-lib-source-maps@4.0.1: - dependencies: - debug: 4.4.0(supports-color@5.5.0) - istanbul-lib-coverage: 3.2.2 - source-map: 0.6.1 - transitivePeerDependencies: - - supports-color - - istanbul-reports@3.1.7: - dependencies: - html-escaper: 2.0.2 - istanbul-lib-report: 3.0.1 - - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - - jest-changed-files@29.7.0: - dependencies: - execa: 5.1.1 - jest-util: 29.7.0 - p-limit: 3.1.0 - - jest-circus@29.7.0: - dependencies: - '@jest/environment': 29.7.0 - '@jest/expect': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - chalk: 4.1.2 - co: 4.6.0 - dedent: 1.5.3 - is-generator-fn: 2.1.0 - jest-each: 29.7.0 - jest-matcher-utils: 29.7.0 - jest-message-util: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - p-limit: 3.1.0 - pretty-format: 29.7.0 - pure-rand: 6.1.0 - slash: 3.0.0 - stack-utils: 2.0.6 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - jest-cli@29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) - exit: 0.1.2 - import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.7.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - - jest-config@29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): - dependencies: - '@babel/core': 7.26.10 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.10) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.17.31 - ts-node: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - jest-diff@29.7.0: - dependencies: - chalk: 4.1.2 - diff-sequences: 29.6.3 - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - - jest-docblock@29.7.0: - dependencies: - detect-newline: 3.1.0 - - jest-each@29.7.0: - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - jest-get-type: 29.6.3 - jest-util: 29.7.0 - pretty-format: 29.7.0 - - jest-environment-jsdom@29.7.0: - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/jsdom': 20.0.1 - '@types/node': 20.17.31 - jest-mock: 29.7.0 - jest-util: 29.7.0 - jsdom: 20.0.3 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - jest-environment-node@29.7.0: - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - jest-mock: 29.7.0 - jest-util: 29.7.0 - - jest-get-type@29.6.3: {} - - jest-haste-map@29.7.0: - dependencies: - '@jest/types': 29.6.3 - '@types/graceful-fs': 4.1.9 - '@types/node': 20.17.31 - anymatch: 3.1.3 - fb-watchman: 2.0.2 - graceful-fs: 4.2.11 - jest-regex-util: 29.6.3 - jest-util: 29.7.0 - jest-worker: 29.7.0 - micromatch: 4.0.8 - walker: 1.0.8 - optionalDependencies: - fsevents: 2.3.3 - - jest-leak-detector@29.7.0: - dependencies: - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - - jest-matcher-utils@29.7.0: - dependencies: - chalk: 4.1.2 - jest-diff: 29.7.0 - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - - jest-message-util@29.7.0: - dependencies: - '@babel/code-frame': 7.26.2 - '@jest/types': 29.6.3 - '@types/stack-utils': 2.0.3 - chalk: 4.1.2 - graceful-fs: 4.2.11 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - stack-utils: 2.0.6 - - jest-mock@29.7.0: - dependencies: - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - jest-util: 29.7.0 - - jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): - optionalDependencies: - jest-resolve: 29.7.0 - - jest-regex-util@29.6.3: {} - - jest-resolve-dependencies@29.7.0: - dependencies: - jest-regex-util: 29.6.3 - jest-snapshot: 29.7.0 - transitivePeerDependencies: - - supports-color - - jest-resolve@29.7.0: - dependencies: - chalk: 4.1.2 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - jest-pnp-resolver: 1.2.3(jest-resolve@29.7.0) - jest-util: 29.7.0 - jest-validate: 29.7.0 - resolve: 1.22.10 - resolve.exports: 2.0.3 - slash: 3.0.0 - - jest-runner@29.7.0: - dependencies: - '@jest/console': 29.7.0 - '@jest/environment': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - chalk: 4.1.2 - emittery: 0.13.1 - graceful-fs: 4.2.11 - jest-docblock: 29.7.0 - jest-environment-node: 29.7.0 - jest-haste-map: 29.7.0 - jest-leak-detector: 29.7.0 - jest-message-util: 29.7.0 - jest-resolve: 29.7.0 - jest-runtime: 29.7.0 - jest-util: 29.7.0 - jest-watcher: 29.7.0 - jest-worker: 29.7.0 - p-limit: 3.1.0 - source-map-support: 0.5.13 - transitivePeerDependencies: - - supports-color - - jest-runtime@29.7.0: - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/globals': 29.7.0 - '@jest/source-map': 29.6.3 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - chalk: 4.1.2 - cjs-module-lexer: 1.4.3 - collect-v8-coverage: 1.0.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-mock: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - slash: 3.0.0 - strip-bom: 4.0.0 - transitivePeerDependencies: - - supports-color - - jest-snapshot@29.7.0: - dependencies: - '@babel/core': 7.26.10 - '@babel/generator': 7.27.0 - '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.10) - '@babel/types': 7.27.0 - '@jest/expect-utils': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.10) - chalk: 4.1.2 - expect: 29.7.0 - graceful-fs: 4.2.11 - jest-diff: 29.7.0 - jest-get-type: 29.6.3 - jest-matcher-utils: 29.7.0 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - natural-compare: 1.4.0 - pretty-format: 29.7.0 - semver: 7.7.1 - transitivePeerDependencies: - - supports-color - - jest-util@29.7.0: - dependencies: - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - chalk: 4.1.2 - ci-info: 3.9.0 - graceful-fs: 4.2.11 - picomatch: 2.3.1 - - jest-validate@29.7.0: - dependencies: - '@jest/types': 29.6.3 - camelcase: 6.3.0 - chalk: 4.1.2 - jest-get-type: 29.6.3 - leven: 3.1.0 - pretty-format: 29.7.0 - - jest-watcher@29.7.0: - dependencies: - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.31 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - emittery: 0.13.1 - jest-util: 29.7.0 - string-length: 4.0.2 - - jest-worker@29.7.0: - dependencies: - '@types/node': 20.17.31 - jest-util: 29.7.0 - merge-stream: 2.0.0 - supports-color: 8.1.1 - - jest@29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) - '@jest/types': 29.6.3 - import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.17.31)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - - jiti@1.21.7: {} - - jiti@2.4.2: - optional: true - - joycon@3.1.1: {} - - js-tokens@4.0.0: {} - - js-yaml@3.14.1: - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - - js-yaml@4.1.0: - dependencies: - argparse: 2.0.1 - - jsbn@0.1.1: {} - - jsdom@20.0.3: - dependencies: - abab: 2.0.6 - acorn: 8.14.1 - acorn-globals: 7.0.1 - cssom: 0.5.0 - cssstyle: 2.3.0 - data-urls: 3.0.2 - decimal.js: 10.5.0 - domexception: 4.0.0 - escodegen: 2.1.0 - form-data: 4.0.2 - html-encoding-sniffer: 3.0.0 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 - is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.20 - parse5: 7.3.0 - saxes: 6.0.0 - symbol-tree: 3.2.4 - tough-cookie: 4.1.4 - w3c-xmlserializer: 4.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 2.0.0 - whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 - ws: 8.18.1 - xml-name-validator: 4.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - jsdom@24.1.3: - dependencies: - cssstyle: 4.3.1 - data-urls: 5.0.0 - decimal.js: 10.5.0 - form-data: 4.0.2 - html-encoding-sniffer: 4.0.0 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.6 - is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.20 - parse5: 7.3.0 - rrweb-cssom: 0.7.1 - saxes: 6.0.0 - symbol-tree: 3.2.4 - tough-cookie: 4.1.4 - w3c-xmlserializer: 5.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 3.1.1 - whatwg-mimetype: 4.0.0 - whatwg-url: 14.2.0 - ws: 8.18.1 - xml-name-validator: 5.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - jsesc@3.1.0: {} - - json-buffer@3.0.1: {} - - json-parse-even-better-errors@2.3.1: {} - - json-schema-to-ts@3.1.1: - dependencies: - '@babel/runtime': 7.27.0 - ts-algebra: 2.0.0 - - json-schema-traverse@0.4.1: {} - - json-schema-traverse@1.0.0: - optional: true - - json-schema@0.4.0: {} - - json-stable-stringify-without-jsonify@1.0.1: {} - - json-stringify-safe@5.0.1: {} - - json5@2.2.3: {} - - jsonfile@6.1.0: - dependencies: - universalify: 2.0.1 - optionalDependencies: - graceful-fs: 4.2.11 - - jsonschema@1.5.0: {} - - jsprim@2.0.2: - dependencies: - assert-plus: 1.0.0 - extsprintf: 1.3.0 - json-schema: 0.4.0 - verror: 1.10.0 - - keyv@4.5.4: - dependencies: - json-buffer: 3.0.1 - - kleur@3.0.3: {} - - ky@1.8.1: {} - - lazy-ass@1.6.0: {} - - less@4.3.0: - dependencies: - copy-anything: 2.0.6 - parse-node-version: 1.0.1 - tslib: 2.8.1 - optionalDependencies: - errno: 0.1.8 - graceful-fs: 4.2.11 - image-size: 0.5.5 - make-dir: 2.1.0 - mime: 1.6.0 - needle: 3.3.1 - source-map: 0.6.1 - - leven@3.1.0: {} - - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - - lightningcss-darwin-arm64@1.21.8: - optional: true - - lightningcss-darwin-arm64@1.29.3: - optional: true - - lightningcss-darwin-x64@1.21.8: - optional: true - - lightningcss-darwin-x64@1.29.3: - optional: true - - lightningcss-freebsd-x64@1.21.8: - optional: true - - lightningcss-freebsd-x64@1.29.3: - optional: true - - lightningcss-linux-arm-gnueabihf@1.21.8: - optional: true - - lightningcss-linux-arm-gnueabihf@1.29.3: - optional: true - - lightningcss-linux-arm64-gnu@1.21.8: - optional: true - - lightningcss-linux-arm64-gnu@1.29.3: - optional: true - - lightningcss-linux-arm64-musl@1.21.8: - optional: true - - lightningcss-linux-arm64-musl@1.29.3: - optional: true - - lightningcss-linux-x64-gnu@1.21.8: - optional: true - - lightningcss-linux-x64-gnu@1.29.3: - optional: true - - lightningcss-linux-x64-musl@1.21.8: - optional: true - - lightningcss-linux-x64-musl@1.29.3: - optional: true - - lightningcss-win32-arm64-msvc@1.29.3: - optional: true - - lightningcss-win32-x64-msvc@1.21.8: - optional: true - - lightningcss-win32-x64-msvc@1.29.3: - optional: true - - lightningcss@1.21.8: - dependencies: - detect-libc: 1.0.3 - optionalDependencies: - lightningcss-darwin-arm64: 1.21.8 - lightningcss-darwin-x64: 1.21.8 - lightningcss-freebsd-x64: 1.21.8 - lightningcss-linux-arm-gnueabihf: 1.21.8 - lightningcss-linux-arm64-gnu: 1.21.8 - lightningcss-linux-arm64-musl: 1.21.8 - lightningcss-linux-x64-gnu: 1.21.8 - lightningcss-linux-x64-musl: 1.21.8 - lightningcss-win32-x64-msvc: 1.21.8 - - lightningcss@1.29.3: - dependencies: - detect-libc: 2.0.4 - optionalDependencies: - lightningcss-darwin-arm64: 1.29.3 - lightningcss-darwin-x64: 1.29.3 - lightningcss-freebsd-x64: 1.29.3 - lightningcss-linux-arm-gnueabihf: 1.29.3 - lightningcss-linux-arm64-gnu: 1.29.3 - lightningcss-linux-arm64-musl: 1.29.3 - lightningcss-linux-x64-gnu: 1.29.3 - lightningcss-linux-x64-musl: 1.29.3 - lightningcss-win32-arm64-msvc: 1.29.3 - lightningcss-win32-x64-msvc: 1.29.3 - - lilconfig@2.1.0: {} - - lilconfig@3.1.3: {} - - lines-and-columns@1.2.4: {} - - listr2@3.14.0(enquirer@2.4.1): - dependencies: - cli-truncate: 2.1.0 - colorette: 2.0.20 - log-update: 4.0.0 - p-map: 4.0.0 - rfdc: 1.4.1 - rxjs: 7.8.2 - through: 2.3.8 - wrap-ansi: 7.0.0 - optionalDependencies: - enquirer: 2.4.1 - - lmdb@2.5.2: - dependencies: - msgpackr: 1.11.2 - node-addon-api: 4.3.0 - node-gyp-build-optional-packages: 5.0.3 - ordered-binary: 1.5.3 - weak-lru-cache: 1.2.2 - optionalDependencies: - '@lmdb/lmdb-darwin-arm64': 2.5.2 - '@lmdb/lmdb-darwin-x64': 2.5.2 - '@lmdb/lmdb-linux-arm': 2.5.2 - '@lmdb/lmdb-linux-arm64': 2.5.2 - '@lmdb/lmdb-linux-x64': 2.5.2 - '@lmdb/lmdb-win32-x64': 2.5.2 - - lmdb@2.7.11: - dependencies: - msgpackr: 1.8.5 - node-addon-api: 4.3.0 - node-gyp-build-optional-packages: 5.0.6 - ordered-binary: 1.5.3 - weak-lru-cache: 1.2.2 - optionalDependencies: - '@lmdb/lmdb-darwin-arm64': 2.7.11 - '@lmdb/lmdb-darwin-x64': 2.7.11 - '@lmdb/lmdb-linux-arm': 2.7.11 - '@lmdb/lmdb-linux-arm64': 2.7.11 - '@lmdb/lmdb-linux-x64': 2.7.11 - '@lmdb/lmdb-win32-x64': 2.7.11 - - load-tsconfig@0.2.5: {} - - locate-character@3.0.0: {} - - locate-path@5.0.0: - dependencies: - p-locate: 4.1.0 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - lodash.isplainobject@4.0.6: - optional: true - - lodash.map@4.6.0: {} - - lodash.merge@4.6.2: {} - - lodash.mergewith@4.6.2: - optional: true - - lodash.once@4.1.1: {} - - lodash.sortby@4.7.0: {} - - lodash.uniq@4.5.0: - optional: true - - lodash@4.17.21: {} - - log-symbols@4.1.0: - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - - log-update@4.0.0: - dependencies: - ansi-escapes: 4.3.2 - cli-cursor: 3.1.0 - slice-ansi: 4.0.0 - wrap-ansi: 6.2.0 - - longest@2.0.1: {} - - loose-envify@1.4.0: - dependencies: - js-tokens: 4.0.0 - - lowercase-keys@3.0.0: {} - - lru-cache@10.4.3: {} - - lru-cache@5.1.1: - dependencies: - yallist: 3.1.1 - - lru-cache@6.0.0: - dependencies: - yallist: 4.0.0 - - magic-string@0.30.17: - dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 - - make-dir@2.1.0: - dependencies: - pify: 4.0.1 - semver: 5.7.2 - optional: true - - make-dir@4.0.0: - dependencies: - semver: 7.7.1 - - make-error@1.3.6: {} - - makeerror@1.0.12: - dependencies: - tmpl: 1.0.5 - - math-intrinsics@1.1.0: {} - - mdn-data@2.0.14: {} - - mdn-data@2.0.30: {} - - media-typer@0.3.0: {} - - merge-descriptors@1.0.3: {} - - merge-stream@2.0.0: {} - - merge2@1.4.1: {} - - merge@2.1.1: {} - - methods@1.1.2: {} - - micromatch@4.0.8: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - - mime-db@1.52.0: {} - - mime-types@2.1.35: - dependencies: - mime-db: 1.52.0 - - mime@1.6.0: {} - - mime@2.6.0: {} - - mimic-fn@2.1.0: {} - - mimic-response@3.1.0: {} - - mimic-response@4.0.0: {} - - minimatch@3.1.2: - dependencies: - brace-expansion: 1.1.11 - - minimatch@9.0.5: - dependencies: - brace-expansion: 2.0.1 - - minimist@1.2.7: {} - - minimist@1.2.8: {} - - minipass@7.1.2: {} - - mnemonic-id@3.2.7: {} - - ms@2.0.0: {} - - ms@2.1.3: {} - - msgpackr-extract@3.0.3: - dependencies: - node-gyp-build-optional-packages: 5.2.2 - optionalDependencies: - '@msgpackr-extract/msgpackr-extract-darwin-arm64': 3.0.3 - '@msgpackr-extract/msgpackr-extract-darwin-x64': 3.0.3 - '@msgpackr-extract/msgpackr-extract-linux-arm': 3.0.3 - '@msgpackr-extract/msgpackr-extract-linux-arm64': 3.0.3 - '@msgpackr-extract/msgpackr-extract-linux-x64': 3.0.3 - '@msgpackr-extract/msgpackr-extract-win32-x64': 3.0.3 - optional: true - - msgpackr@1.11.2: - optionalDependencies: - msgpackr-extract: 3.0.3 - - msgpackr@1.8.5: - optionalDependencies: - msgpackr-extract: 3.0.3 - - mute-stream@0.0.8: {} - - mute-stream@2.0.0: {} - - mz@2.7.0: - dependencies: - any-promise: 1.3.0 - object-assign: 4.1.1 - thenify-all: 1.6.0 - - nanoid@3.3.11: {} - - nanoid@5.0.3: {} - - natural-compare@1.4.0: {} - - needle@3.3.1: - dependencies: - iconv-lite: 0.6.3 - sax: 1.4.1 - optional: true - - negotiator@0.6.3: {} - - node-addon-api@4.3.0: {} - - node-addon-api@7.1.1: {} - - node-gyp-build-optional-packages@5.0.3: {} - - node-gyp-build-optional-packages@5.0.6: {} - - node-gyp-build-optional-packages@5.2.2: - dependencies: - detect-libc: 2.0.4 - optional: true - - node-int64@0.4.0: {} - - node-object-hash@3.0.0: {} - - node-releases@2.0.19: {} - - nodemon@3.1.10: - dependencies: - chokidar: 3.6.0 - debug: 4.4.0(supports-color@5.5.0) - ignore-by-default: 1.0.1 - minimatch: 3.1.2 - pstree.remy: 1.1.8 - semver: 7.7.1 - simple-update-notifier: 2.0.0 - supports-color: 5.5.0 - touch: 3.1.1 - undefsafe: 2.0.5 - - normalize-path@3.0.0: {} - - normalize-range@0.1.2: {} - - normalize-url@8.0.1: {} - - npm-run-path@4.0.1: - dependencies: - path-key: 3.1.1 - - nth-check@2.1.1: - dependencies: - boolbase: 1.0.0 - - nullthrows@1.1.1: {} - - nwsapi@2.2.20: {} - - object-assign@4.1.1: {} - - object-hash@3.0.0: {} - - object-inspect@1.13.4: {} - - on-finished@2.4.1: - dependencies: - ee-first: 1.1.1 - - once@1.4.0: - dependencies: - wrappy: 1.0.2 - - onetime@5.1.2: - dependencies: - mimic-fn: 2.1.0 - - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - - ora@5.4.1: - dependencies: - bl: 4.1.0 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-spinners: 2.9.2 - is-interactive: 1.0.0 - is-unicode-supported: 0.1.0 - log-symbols: 4.1.0 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - - ordered-binary@1.5.3: {} - - os-tmpdir@1.0.2: {} - - ospath@1.2.2: {} - - p-cancelable@3.0.0: {} - - p-cancelable@4.0.1: {} - - p-limit@2.3.0: - dependencies: - p-try: 2.2.0 - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@4.1.0: - dependencies: - p-limit: 2.3.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - p-map@4.0.0: - dependencies: - aggregate-error: 3.1.0 - - p-try@2.2.0: {} - - package-json-from-dist@1.0.1: {} - - package-json@10.0.1: - dependencies: - ky: 1.8.1 - registry-auth-token: 5.1.0 - registry-url: 6.0.1 - semver: 7.7.1 - - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - - parse-json@5.2.0: - dependencies: - '@babel/code-frame': 7.26.2 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - - parse-node-version@1.0.1: {} - - parse-passwd@1.0.0: {} - - parse5@7.3.0: - dependencies: - entities: 6.0.0 - - parseurl@1.3.3: {} - - path-exists@4.0.0: {} - - path-is-absolute@1.0.1: {} - - path-key@3.1.1: {} - - path-parse@1.0.7: {} - - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.2 - - path-to-regexp@0.1.12: {} - - path-type@4.0.0: {} - - pend@1.2.0: {} - - performance-now@2.1.0: {} - - periscopic@3.1.0: - dependencies: - '@types/estree': 1.0.7 - estree-walker: 3.0.3 - is-reference: 3.0.3 - - picocolors@1.1.1: {} - - picomatch@2.3.1: {} - - pify@2.3.0: {} - - pify@4.0.1: - optional: true - - pirates@4.0.7: {} - - pkce-challenge@5.0.0: {} - - pkg-dir@4.2.0: - dependencies: - find-up: 4.1.0 - - plasmo@0.90.3(@swc/core@1.11.22(@swc/helpers@0.5.17))(@swc/helpers@0.5.17)(@types/node@20.11.5)(lodash@4.17.21)(postcss@8.5.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3)): - dependencies: - '@expo/spawn-async': 1.7.2 - '@parcel/core': 2.9.3 - '@parcel/fs': 2.9.3(@parcel/core@2.9.3) - '@parcel/package-manager': 2.9.3(@parcel/core@2.9.3) - '@parcel/watcher': 2.2.0 - '@plasmohq/init': 0.7.0 - '@plasmohq/parcel-config': 0.42.0(@swc/core@1.11.22(@swc/helpers@0.5.17))(@swc/helpers@0.5.17)(lodash@4.17.21)(postcss@8.5.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3))(typescript@5.2.2) - '@plasmohq/parcel-core': 0.1.10 - buffer: 6.0.3 - chalk: 5.3.0 - change-case: 5.1.2 - dotenv: 16.3.1 - dotenv-expand: 12.0.1 - events: 3.3.0 - fast-glob: 3.3.2 - fflate: 0.8.1 - get-port: 7.0.0 - got: 14.4.5 - ignore: 7.0.3 - inquirer: 12.4.1(@types/node@20.11.5) - is-path-inside: 4.0.0 - json5: 2.2.3 - mnemonic-id: 3.2.7 - node-object-hash: 3.0.0 - package-json: 10.0.1 - process: 0.11.10 - semver: 7.5.4 - sharp: 0.33.5 - tempy: 3.1.0 - typescript: 5.2.2 - transitivePeerDependencies: - - '@swc/core' - - '@swc/helpers' - - '@types/node' - - arc-templates - - atpl - - babel-core - - bracket-template - - coffeescript - - cssnano - - dot - - eco - - ect - - ejs - - haml-coffee - - hamlet - - hamljs - - handlebars - - hogan.js - - htmling - - jazz - - jqtpl - - just - - liquid - - liquor - - lodash - - marko - - mote - - mustache - - nunjucks - - plates - - postcss - - pug - - purgecss - - qejs - - ractive - - razor-tmpl - - react - - react-dom - - relateurl - - slm - - squirrelly - - srcset - - supports-color - - teacup - - templayed - - terser - - then-pug - - tinyliquid - - toffee - - ts-node - - twig - - twing - - uncss - - underscore - - vash - - velocityjs - - walrus - - whiskers - - playwright-core@1.52.0: {} - - playwright@1.52.0: - dependencies: - playwright-core: 1.52.0 - optionalDependencies: - fsevents: 2.3.2 - - pnpm@10.10.0: {} - - postcss-import@15.1.0(postcss@8.5.3): - dependencies: - postcss: 8.5.3 - postcss-value-parser: 4.2.0 - read-cache: 1.0.0 - resolve: 1.22.10 - - postcss-js@4.0.1(postcss@8.5.3): - dependencies: - camelcase-css: 2.0.1 - postcss: 8.5.3 - - postcss-load-config@3.1.4(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)): - dependencies: - lilconfig: 2.1.0 - yaml: 1.10.2 - optionalDependencies: - postcss: 8.5.3 - ts-node: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3) - - postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3)): - dependencies: - lilconfig: 3.1.3 - yaml: 2.7.1 - optionalDependencies: - postcss: 8.5.3 - ts-node: 10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3) - - postcss-nested@6.2.0(postcss@8.5.3): - dependencies: - postcss: 8.5.3 - postcss-selector-parser: 6.1.2 - - postcss-selector-parser@6.1.2: - dependencies: - cssesc: 3.0.0 - util-deprecate: 1.0.2 - - postcss-value-parser@4.2.0: {} - - postcss@8.5.3: - dependencies: - nanoid: 3.3.11 - picocolors: 1.1.1 - source-map-js: 1.2.1 - - posthtml-parser@0.10.2: - dependencies: - htmlparser2: 7.2.0 - - posthtml-parser@0.11.0: - dependencies: - htmlparser2: 7.2.0 - - posthtml-render@3.0.0: - dependencies: - is-json: 2.0.1 - - posthtml@0.16.6: - dependencies: - posthtml-parser: 0.11.0 - posthtml-render: 3.0.0 - - prelude-ls@1.2.1: {} - - prettier@3.2.4: {} - - prettier@3.5.3: {} - - pretty-bytes@5.6.0: {} - - pretty-format@29.7.0: - dependencies: - '@jest/schemas': 29.6.3 - ansi-styles: 5.2.0 - react-is: 18.3.1 - - process@0.11.10: {} - - prompts@2.4.2: - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - - proto-list@1.2.4: {} - - proxy-addr@2.0.7: - dependencies: - forwarded: 0.2.0 - ipaddr.js: 1.9.1 - - proxy-from-env@1.0.0: {} - - prr@1.0.1: - optional: true - - psl@1.15.0: - dependencies: - punycode: 2.3.1 - - pstree.remy@1.1.8: {} - - pump@3.0.2: - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - - punycode@2.3.1: {} - - pure-rand@6.1.0: {} - - qs@6.13.0: - dependencies: - side-channel: 1.1.0 - - qs@6.14.0: - dependencies: - side-channel: 1.1.0 - - querystringify@2.2.0: {} - - queue-microtask@1.2.3: {} - - quick-lru@5.1.1: {} - - range-parser@1.2.1: {} - - raw-body@2.5.2: - dependencies: - bytes: 3.1.2 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - - rc@1.2.8: - dependencies: - deep-extend: 0.6.0 - ini: 1.3.8 - minimist: 1.2.8 - strip-json-comments: 2.0.1 - - react-dom@18.2.0(react@18.2.0): - dependencies: - loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.2 - - react-error-overlay@6.0.9: {} - - react-is@18.3.1: {} - - react-refresh@0.14.0: {} - - react-refresh@0.9.0: {} - - react@18.2.0: - dependencies: - loose-envify: 1.4.0 - - read-cache@1.0.0: - dependencies: - pify: 2.3.0 - - readable-stream@3.6.2: - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - - readdirp@3.6.0: - dependencies: - picomatch: 2.3.1 - - readdirp@4.1.2: {} - - regenerator-runtime@0.13.11: {} - - regenerator-runtime@0.14.1: {} - - registry-auth-token@5.1.0: - dependencies: - '@pnpm/npm-conf': 2.3.1 - - registry-url@6.0.1: - dependencies: - rc: 1.2.8 - - request-progress@3.0.0: - dependencies: - throttleit: 1.0.1 - - require-directory@2.1.1: {} - - require-from-string@2.0.2: - optional: true - - requires-port@1.0.0: {} - - resolve-alpn@1.2.1: {} - - resolve-cwd@3.0.0: - dependencies: - resolve-from: 5.0.0 - - resolve-dir@1.0.1: - dependencies: - expand-tilde: 2.0.2 - global-modules: 1.0.0 - - resolve-from@4.0.0: {} - - resolve-from@5.0.0: {} - - resolve.exports@2.0.3: {} - - resolve@1.22.10: - dependencies: - is-core-module: 2.16.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - - responselike@3.0.0: - dependencies: - lowercase-keys: 3.0.0 - - restore-cursor@3.1.0: - dependencies: - onetime: 5.1.2 - signal-exit: 3.0.7 - - reusify@1.1.0: {} - - rfdc@1.4.1: {} - - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - - rollup@2.79.2: - optionalDependencies: - fsevents: 2.3.3 - - rollup@3.29.5: - optionalDependencies: - fsevents: 2.3.3 - - rrweb-cssom@0.7.1: {} - - rrweb-cssom@0.8.0: {} - - run-async@2.4.1: {} - - run-async@3.0.0: {} - - run-parallel@1.2.0: - dependencies: - queue-microtask: 1.2.3 - - rxjs@7.8.2: - dependencies: - tslib: 2.8.1 - - safe-buffer@5.2.1: {} - - safer-buffer@2.1.2: {} - - sass@1.87.0: - dependencies: - chokidar: 4.0.3 - immutable: 5.1.1 - source-map-js: 1.2.1 - optionalDependencies: - '@parcel/watcher': 2.5.1 - - sax@1.4.1: - optional: true - - saxes@6.0.0: - dependencies: - xmlchars: 2.2.0 - - scheduler@0.23.2: - dependencies: - loose-envify: 1.4.0 - - semver@5.7.2: {} - - semver@6.3.1: {} - - semver@7.5.4: - dependencies: - lru-cache: 6.0.0 - - semver@7.7.1: {} - - send@0.19.0: - dependencies: - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: 1.0.2 - escape-html: 1.0.3 - etag: 1.8.1 - fresh: 0.5.2 - http-errors: 2.0.0 - mime: 1.6.0 - ms: 2.1.3 - on-finished: 2.4.1 - range-parser: 1.2.1 - statuses: 2.0.1 - transitivePeerDependencies: - - supports-color - - serve-static@1.16.2: - dependencies: - encodeurl: 2.0.0 - escape-html: 1.0.3 - parseurl: 1.3.3 - send: 0.19.0 - transitivePeerDependencies: - - supports-color - - setprototypeof@1.2.0: {} - - sharp@0.33.5: - dependencies: - color: 4.2.3 - detect-libc: 2.0.4 - semver: 7.7.1 - optionalDependencies: - '@img/sharp-darwin-arm64': 0.33.5 - '@img/sharp-darwin-x64': 0.33.5 - '@img/sharp-libvips-darwin-arm64': 1.0.4 - '@img/sharp-libvips-darwin-x64': 1.0.4 - '@img/sharp-libvips-linux-arm': 1.0.5 - '@img/sharp-libvips-linux-arm64': 1.0.4 - '@img/sharp-libvips-linux-s390x': 1.0.4 - '@img/sharp-libvips-linux-x64': 1.0.4 - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 - '@img/sharp-linux-arm': 0.33.5 - '@img/sharp-linux-arm64': 0.33.5 - '@img/sharp-linux-s390x': 0.33.5 - '@img/sharp-linux-x64': 0.33.5 - '@img/sharp-linuxmusl-arm64': 0.33.5 - '@img/sharp-linuxmusl-x64': 0.33.5 - '@img/sharp-wasm32': 0.33.5 - '@img/sharp-win32-ia32': 0.33.5 - '@img/sharp-win32-x64': 0.33.5 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@3.0.0: {} - - side-channel-list@1.0.0: - dependencies: - es-errors: 1.3.0 - object-inspect: 1.13.4 - - side-channel-map@1.0.1: - dependencies: - call-bound: 1.0.4 - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - object-inspect: 1.13.4 - - side-channel-weakmap@1.0.2: - dependencies: - call-bound: 1.0.4 - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - object-inspect: 1.13.4 - side-channel-map: 1.0.1 - - side-channel@1.1.0: - dependencies: - es-errors: 1.3.0 - object-inspect: 1.13.4 - side-channel-list: 1.0.0 - side-channel-map: 1.0.1 - side-channel-weakmap: 1.0.2 - - signal-exit@3.0.7: {} - - signal-exit@4.1.0: {} - - simple-swizzle@0.2.2: - dependencies: - is-arrayish: 0.3.2 - - simple-update-notifier@2.0.0: - dependencies: - semver: 7.7.1 - - sisteransi@1.0.5: {} - - slash@3.0.0: {} - - slice-ansi@3.0.0: - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - - slice-ansi@4.0.0: - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - - source-map-js@1.2.1: {} - - source-map-support@0.5.13: - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - - source-map@0.6.1: {} - - source-map@0.8.0-beta.0: - dependencies: - whatwg-url: 7.1.0 - - sprintf-js@1.0.3: {} - - srcset@4.0.0: {} - - sshpk@1.18.0: - dependencies: - asn1: 0.2.6 - assert-plus: 1.0.0 - bcrypt-pbkdf: 1.0.2 - dashdash: 1.14.1 - ecc-jsbn: 0.1.2 - getpass: 0.1.7 - jsbn: 0.1.1 - safer-buffer: 2.1.2 - tweetnacl: 0.14.5 - - stable@0.1.8: {} - - stack-utils@2.0.6: - dependencies: - escape-string-regexp: 2.0.0 - - statuses@2.0.1: {} - - string-length@4.0.2: - dependencies: - char-regex: 1.0.2 - strip-ansi: 6.0.1 - - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.1.0 - - string_decoder@1.3.0: - dependencies: - safe-buffer: 5.2.1 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-ansi@7.1.0: - dependencies: - ansi-regex: 6.1.0 - - strip-bom@4.0.0: {} - - strip-final-newline@2.0.0: {} - - strip-json-comments@2.0.1: {} - - strip-json-comments@3.1.1: {} - - sucrase@3.35.0: - dependencies: - '@jridgewell/gen-mapping': 0.3.8 - commander: 4.1.1 - glob: 10.4.5 - lines-and-columns: 1.2.4 - mz: 2.7.0 - pirates: 4.0.7 - ts-interface-checker: 0.1.13 - - supports-color@5.5.0: - dependencies: - has-flag: 3.0.0 - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - - supports-preserve-symlinks-flag@1.0.0: {} - - svelte@4.2.2: - dependencies: - '@ampproject/remapping': 2.3.0 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 - acorn: 8.14.1 - aria-query: 5.3.2 - axobject-query: 3.2.4 - code-red: 1.0.4 - css-tree: 2.3.1 - estree-walker: 3.0.3 - is-reference: 3.0.3 - locate-character: 3.0.0 - magic-string: 0.30.17 - periscopic: 3.1.0 - - svg-parser@2.0.4: {} - - svgo@2.8.0: - dependencies: - '@trysound/sax': 0.2.0 - commander: 7.2.0 - css-select: 4.3.0 - css-tree: 1.1.3 - csso: 4.2.0 - picocolors: 1.1.1 - stable: 0.1.8 - - symbol-tree@3.2.4: {} - - tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3)): - dependencies: - '@alloc/quick-lru': 5.2.0 - arg: 5.0.2 - chokidar: 3.6.0 - didyoumean: 1.2.2 - dlv: 1.1.3 - fast-glob: 3.3.3 - glob-parent: 6.0.2 - is-glob: 4.0.3 - jiti: 1.21.7 - lilconfig: 3.1.3 - micromatch: 4.0.8 - normalize-path: 3.0.0 - object-hash: 3.0.0 - picocolors: 1.1.1 - postcss: 8.5.3 - postcss-import: 15.1.0(postcss@8.5.3) - postcss-js: 4.0.1(postcss@8.5.3) - postcss-load-config: 4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3)) - postcss-nested: 6.2.0(postcss@8.5.3) - postcss-selector-parser: 6.1.2 - resolve: 1.22.10 - sucrase: 3.35.0 - transitivePeerDependencies: - - ts-node - - temp-dir@3.0.0: {} - - tempy@3.1.0: - dependencies: - is-stream: 3.0.0 - temp-dir: 3.0.0 - type-fest: 2.19.0 - unique-string: 3.0.0 - - test-exclude@6.0.0: - dependencies: - '@istanbuljs/schema': 0.1.3 - glob: 7.2.3 - minimatch: 3.1.2 - - text-table@0.2.0: {} - - thenify-all@1.6.0: - dependencies: - thenify: 3.3.1 - - thenify@3.3.1: - dependencies: - any-promise: 1.3.0 - - throttleit@1.0.1: {} - - through@2.3.8: {} - - timsort@0.3.0: {} - - tldts-core@6.1.86: {} - - tldts@6.1.86: - dependencies: - tldts-core: 6.1.86 - - tmp@0.0.33: - dependencies: - os-tmpdir: 1.0.2 - - tmp@0.2.3: {} - - tmpl@1.0.5: {} - - to-regex-range@5.0.1: - dependencies: - is-number: 7.0.0 - - toidentifier@1.0.1: {} - - touch@3.1.1: {} - - tough-cookie@4.1.4: - dependencies: - psl: 1.15.0 - punycode: 2.3.1 - universalify: 0.2.0 - url-parse: 1.5.10 - - tough-cookie@5.1.2: - dependencies: - tldts: 6.1.86 - - tr46@1.0.1: - dependencies: - punycode: 2.3.1 - - tr46@3.0.0: - dependencies: - punycode: 2.3.1 - - tr46@5.1.1: - dependencies: - punycode: 2.3.1 - - tree-kill@1.2.2: {} - - ts-algebra@2.0.0: {} - - ts-api-utils@1.4.3(typescript@5.8.3): - dependencies: - typescript: 5.8.3 - - ts-interface-checker@0.1.13: {} - - ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.11.5 - acorn: 8.14.1 - acorn-walk: 8.3.4 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.3.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optionalDependencies: - '@swc/core': 1.11.22(@swc/helpers@0.5.17) - optional: true - - ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.17.31 - acorn: 8.14.1 - acorn-walk: 8.3.4 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.8.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optionalDependencies: - '@swc/core': 1.11.22(@swc/helpers@0.5.17) - - tslib@2.8.1: {} - - tsup@5.12.9(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3))(typescript@5.8.3): - dependencies: - bundle-require: 3.1.2(esbuild@0.14.54) - cac: 6.7.14 - chokidar: 3.6.0 - debug: 4.4.0(supports-color@5.5.0) - esbuild: 0.14.54 - execa: 5.1.1 - globby: 11.1.0 - joycon: 3.1.1 - postcss-load-config: 3.1.4(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.17.31)(typescript@5.8.3)) - resolve-from: 5.0.0 - rollup: 2.79.2 - source-map: 0.8.0-beta.0 - sucrase: 3.35.0 - tree-kill: 1.2.2 - optionalDependencies: - '@swc/core': 1.11.22(@swc/helpers@0.5.17) - postcss: 8.5.3 - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - ts-node - - tsup@7.2.0(@swc/core@1.11.22(@swc/helpers@0.5.17))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3))(typescript@5.2.2): - dependencies: - bundle-require: 4.2.1(esbuild@0.18.20) - cac: 6.7.14 - chokidar: 3.6.0 - debug: 4.4.0(supports-color@5.5.0) - esbuild: 0.18.20 - execa: 5.1.1 - globby: 11.1.0 - joycon: 3.1.1 - postcss-load-config: 4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.11.22(@swc/helpers@0.5.17))(@types/node@20.11.5)(typescript@5.3.3)) - resolve-from: 5.0.0 - rollup: 3.29.5 - source-map: 0.8.0-beta.0 - sucrase: 3.35.0 - tree-kill: 1.2.2 - optionalDependencies: - '@swc/core': 1.11.22(@swc/helpers@0.5.17) - postcss: 8.5.3 - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - - ts-node - - tunnel-agent@0.6.0: - dependencies: - safe-buffer: 5.2.1 - - tweetnacl@0.14.5: {} - - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - - type-detect@4.0.8: {} - - type-fest@0.20.2: {} - - type-fest@0.21.3: {} - - type-fest@1.4.0: {} - - type-fest@2.19.0: {} - - type-fest@4.40.1: {} - - type-is@1.6.18: - dependencies: - media-typer: 0.3.0 - mime-types: 2.1.35 - - typescript-eslint@7.18.0(eslint@8.57.1)(typescript@5.8.3): - dependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - eslint: 8.57.1 - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - typescript@5.2.2: {} - - typescript@5.3.3: {} - - typescript@5.8.3: {} - - undefsafe@2.0.5: {} - - undici-types@5.26.5: {} - - undici-types@6.19.8: {} - - unique-string@3.0.0: - dependencies: - crypto-random-string: 4.0.0 - - universalify@0.2.0: {} - - universalify@2.0.1: {} - - unpipe@1.0.0: {} - - untildify@4.0.0: {} - - update-browserslist-db@1.1.3(browserslist@4.22.1): - dependencies: - browserslist: 4.22.1 - escalade: 3.2.0 - picocolors: 1.1.1 - - update-browserslist-db@1.1.3(browserslist@4.24.4): - dependencies: - browserslist: 4.24.4 - escalade: 3.2.0 - picocolors: 1.1.1 - - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - - url-parse@1.5.10: - dependencies: - querystringify: 2.2.0 - requires-port: 1.0.0 - - util-deprecate@1.0.2: {} - - utility-types@3.11.0: {} - - utils-merge@1.0.1: {} - - uuid@8.3.2: {} - - v8-compile-cache-lib@3.0.1: {} - - v8-to-istanbul@9.3.0: - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - '@types/istanbul-lib-coverage': 2.0.6 - convert-source-map: 2.0.0 - - vary@1.1.2: {} - - verror@1.10.0: - dependencies: - assert-plus: 1.0.0 - core-util-is: 1.0.2 - extsprintf: 1.3.0 - - vue@3.3.4: - dependencies: - '@vue/compiler-dom': 3.3.4 - '@vue/compiler-sfc': 3.3.4 - '@vue/runtime-dom': 3.3.4 - '@vue/server-renderer': 3.3.4(vue@3.3.4) - '@vue/shared': 3.3.4 - - w3c-xmlserializer@4.0.0: - dependencies: - xml-name-validator: 4.0.0 - - w3c-xmlserializer@5.0.0: - dependencies: - xml-name-validator: 5.0.0 - - walker@1.0.8: - dependencies: - makeerror: 1.0.12 - - wcwidth@1.0.1: - dependencies: - defaults: 1.0.4 - - weak-lru-cache@1.2.2: {} - - webextension-polyfill@0.12.0: {} - - webidl-conversions@4.0.2: {} - - webidl-conversions@7.0.0: {} - - whatwg-encoding@2.0.0: - dependencies: - iconv-lite: 0.6.3 - - whatwg-encoding@3.1.1: - dependencies: - iconv-lite: 0.6.3 - - whatwg-mimetype@3.0.0: {} - - whatwg-mimetype@4.0.0: {} - - whatwg-url@11.0.0: - dependencies: - tr46: 3.0.0 - webidl-conversions: 7.0.0 - - whatwg-url@14.2.0: - dependencies: - tr46: 5.1.1 - webidl-conversions: 7.0.0 - - whatwg-url@7.1.0: - dependencies: - lodash.sortby: 4.7.0 - tr46: 1.0.1 - webidl-conversions: 4.0.2 - - which@1.3.1: - dependencies: - isexe: 2.0.0 - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - word-wrap@1.2.5: {} - - wrap-ansi@6.2.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.1 - string-width: 5.1.2 - strip-ansi: 7.1.0 - - wrappy@1.0.2: {} - - write-file-atomic@4.0.2: - dependencies: - imurmurhash: 0.1.4 - signal-exit: 3.0.7 - - ws@8.18.1: {} - - xml-name-validator@4.0.0: {} - - xml-name-validator@5.0.0: {} - - xmlchars@2.2.0: {} - - xxhash-wasm@0.4.2: {} - - y18n@5.0.8: {} - - yallist@3.1.1: {} - - yallist@4.0.0: {} - - yaml@1.10.2: {} - - yaml@2.7.1: {} - - yargs-parser@21.1.1: {} - - yargs@17.7.2: - dependencies: - cliui: 8.0.1 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - - yauzl@2.10.0: - dependencies: - buffer-crc32: 0.2.13 - fd-slicer: 1.1.0 - - yn@3.1.1: {} - - yocto-queue@0.1.0: {} - - yoctocolors-cjs@2.1.2: {} From f53b0890cd13521ff8e0f76989eadc2179dd68d6 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 23 May 2025 15:48:21 -0700 Subject: [PATCH 07/20] tab event logs and major mv3 migration changes --- .../src/background/index.ts | 86 +- .../src/background/messages/config_change.ts | 21 +- .../src/background/messages/http_session.ts | 3 - .../src/background/messages/issue_report.ts | 0 .../src/background/ports/log.ts | 31 +- .../flagon-userale-ext/src/content.ts | 25 +- .../packages/flagon-userale-ext/src/popup.tsx | 25 +- .../flagon-userale-ext/src/utils/messaging.ts | 12 + .../flagon-userale-ext/src/utils/storage.ts | 8 +- .../flagon-userale/build/esm/main.d.ts | 235 ---- .../flagon-userale/build/esm/main.mjs | 1083 ----------------- .../flagon-userale/build/esm/main.mjs.map | 1 - .../packages/flagon-userale/build/main.d.ts | 60 +- .../packages/flagon-userale/build/main.mjs | 402 +++--- .../flagon-userale/build/main.mjs.map | 2 +- .../flagon-userale/src/attachHandlers.ts | 8 +- .../flagon-userale/src/getInitialSettings.ts | 57 +- .../packages/flagon-userale/src/main.ts | 32 +- .../flagon-userale/src/packageLogs.ts | 27 +- .../packages/flagon-userale/src/sendLogs.ts | 89 +- .../packages/flagon-userale/tsconfig.json | 6 +- .../packages/flagon-userale/tsup.config.js | 2 +- 22 files changed, 436 insertions(+), 1779 deletions(-) delete mode 100644 products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts delete mode 100644 products/userale/packages/flagon-userale-ext/src/background/messages/issue_report.ts create mode 100644 products/userale/packages/flagon-userale-ext/src/utils/messaging.ts delete mode 100644 products/userale/packages/flagon-userale/build/esm/main.d.ts delete mode 100644 products/userale/packages/flagon-userale/build/esm/main.mjs delete mode 100644 products/userale/packages/flagon-userale/build/esm/main.mjs.map diff --git a/products/userale/packages/flagon-userale-ext/src/background/index.ts b/products/userale/packages/flagon-userale-ext/src/background/index.ts index ee5cda3..6e8df51 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/index.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/index.ts @@ -1,12 +1,84 @@ -import * as userale from "flagon-userale"; -import { getStoredOptions,} from "~/utils/storage"; +import { getStoredOptions } from "~/utils/storage"; +import { setOptions } from "./messages/config_change"; +import { sendToContent } from "~utils/messaging"; -console.log("Service worker loaded!"); +// Top level await is not supported so immediately execute this async function to set options from storage +(async () => { + const options = await getStoredOptions(); + setOptions(options); +})(); -//TODO apply logging url from getstoredoptions to userale.setup +// Takes a tabId and event data, gets the tab, and sends it +function sendTabEvent(tabId: number, data: Record, type: string) { + chrome.tabs.get(tabId, (tab) => { + if (!tab) return + sendTabEventFromTab(tab, data, type) + }); +} -userale.setup(); +// Sends an event directly from a tab object +function sendTabEventFromTab(tab: chrome.tabs.Tab, data: Record, type: string) { + const payload = { + type, + tab, + data + }; -//TODO Create browser session id similar to how http session id is created and export it be used in background/ports/log.ts + sendToContent(tab.id!, { type: "tab-event", payload }).catch((err) => + console.warn(`Failed to send ${type} to tab ${tab.id}:`, err.message) + ); +} -//TODO attach tab event listeners and add log them to userale. This can mostly be copied from the old code, but use .log() instead of .packagecustomlog() \ No newline at end of file +// Tab event handlers +// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs + +// TODO handle events that are sent when the tab isn't active. +// For example: +// onCreated events are sent before the content script listener is ready. +// onDeleted events are sent afeter the content script listener is shut down. + +chrome.tabs.onActivated.addListener((activeInfo) => + sendTabEvent(activeInfo.tabId, activeInfo, "tabs.onActivated") +); + +chrome.tabs.onAttached.addListener((tabId, attachInfo) => + sendTabEvent(tabId, attachInfo, "tabs.onAttached") +); + +chrome.tabs.onCreated.addListener((tab) => + sendTabEventFromTab(tab, {}, "tabs.onCreated") +); + +chrome.tabs.onDetached.addListener((tabId, detachInfo) => + sendTabEvent(tabId, detachInfo, "tabs.onDetached") +); + +chrome.tabs.onMoved.addListener((tabId, moveInfo) => + sendTabEvent(tabId, moveInfo, "tabs.onMoved") +); + +chrome.tabs.onRemoved.addListener((tabId, removeInfo) => + sendTabEvent(tabId, removeInfo, "tabs.onRemoved") +); + +chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => + sendTabEventFromTab(tab, changeInfo, "tabs.onUpdated") +); + +chrome.tabs.onZoomChange.addListener((zoomChangeInfo) => + sendTabEvent(zoomChangeInfo.tabId, zoomChangeInfo, "tabs.onZoomChange") +); + +chrome.tabs.onHighlighted.addListener((highlightInfo) => { + // Note: No tabId is available, so send with windowId and tabIds + const data = { ...highlightInfo } + // Loop over highlightInfo.tabIds and call sendTabEvent on each + for (const tabId of highlightInfo.tabIds) { + sendTabEvent(tabId, data, "tabs.onHighlighted") + } +}); + +chrome.tabs.onReplaced.addListener((addedTabId, removedTabId) => { + const data = { addedTabId, removedTabId } + sendTabEvent(addedTabId, data, "tabs.onReplaced") +}); \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts index a4e71a9..8ee0bf4 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts @@ -1,10 +1,23 @@ import type { PlasmoMessaging } from "@plasmohq/messaging"; import * as userale from "flagon-userale"; -import { getStoredOptions } from "~/utils/storage"; +import type { StoredOptions } from "~utils/storage"; +let allowListRegExp: RegExp; + const handler: PlasmoMessaging.MessageHandler = async (req, res) => { - // call - userale.options(req); + setOptions(req.body); } - + +export function setOptions(options: StoredOptions) { + console.log(options); + userale.options({url: options.loggingUrl}); + allowListRegExp = new RegExp(options.allowList); +} + +export function getAllowListRegExp() { + console.log("getAllowListRegExp"); + console.log(allowListRegExp); + return allowListRegExp; +} + export default handler \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts deleted file mode 100644 index 1bb712b..0000000 --- a/products/userale/packages/flagon-userale-ext/src/background/messages/http_session.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This is a bit complicated, but once tab logs are added in main. You can create a mapping of tab ids (a browser construct) to http session ids (a userale construct). -// The content script should send a message containing its http session id, and it should be added to the mapping here, then use the mapping in background/index.ts to set the http session field of tab logs. -// This is also the least import part, so save it for last. \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/issue_report.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/issue_report.ts deleted file mode 100644 index e69de29..0000000 diff --git a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts index 3a08910..6e0fe6f 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts @@ -1,17 +1,28 @@ import type { PlasmoMessaging } from "@plasmohq/messaging"; import * as userale from "flagon-userale"; - +import { getAllowListRegExp } from "~/background/messages/config_change"; + const handler: PlasmoMessaging.PortHandler = async (req, res) => { - console.log(req); - // todo apply browser session id to logs - // // log.browserSessionId = browserSessionId; - // todo filter logs based off filter url in getstorageoptions - // // req = filterUrl(req); - if (req) { - console.log(req); - userale.log(req); + let log = req.body + log.browserSessionId = browserSessionId; + let allowListRegExp = getAllowListRegExp(); + console.log(allowListRegExp); + if (allowListRegExp.test(log.pageUrl)) { + userale.log(log); } - +} + +let browserSessionId = generateSessionId(); + +// TODO move this to a shared utils workspace (this is from packages/flagon-userale/src/, but shouldn't be publicly exported) +function generateSessionId(): string { + // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison + const len = 32; + const arr = new Uint8Array(len / 2); + self.crypto.getRandomValues(arr); + return Array.from(arr, (dec) => { + return dec.toString(16).padStart(2, "0"); + }).join(""); } export default handler; \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/content.ts b/products/userale/packages/flagon-userale-ext/src/content.ts index 967507d..e2e5551 100644 --- a/products/userale/packages/flagon-userale-ext/src/content.ts +++ b/products/userale/packages/flagon-userale-ext/src/content.ts @@ -11,10 +11,29 @@ const logPort = getPort("log"); userale.addCallbacks({ rerouteLog(log) { - console.log(log) - logPort.postMessage(log); + console.log(log); + logPort.postMessage({body: log}); return false; } }); -userale.start(); \ No newline at end of file +chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { + if( message.type == "tab-event") { + const { type, tab, data } = message.payload; + userale.packageCustomLog( + {type}, + () => { return data; }, + true, + ); + sendResponse({ status: "received" }); + } else if (message.type === "issue-report") { + userale.packageCustomLog( + {type: message.type}, + () => { return message.payload; }, + true, + ); + sendResponse({ status: "received" }); + } + + return true +}) \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/popup.tsx b/products/userale/packages/flagon-userale-ext/src/popup.tsx index 2c88894..43a8ee4 100644 --- a/products/userale/packages/flagon-userale-ext/src/popup.tsx +++ b/products/userale/packages/flagon-userale-ext/src/popup.tsx @@ -1,15 +1,32 @@ import { useState } from "react"; import Options from "~/options"; +import { sendToContent } from "~utils/messaging" function IndexPopup() { const [issueType, setIssueType] = useState("Bug"); const [issueDescription, setIssueDescription] = useState(""); - const handleSubmit = (e: React.FormEvent) => { - e.preventDefault(); - // TODO add messaging - }; + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault() + try { + const [tab] = await chrome.tabs.query({ active: true, currentWindow: true }); + if (!tab?.id) throw new Error("No active tab found"); + const response = await sendToContent(tab.id, { + type: "issue-report", + payload: { + issueType, + issueDescription + } + }); + console.log("Content script response:", response) + alert("Issue report sent!") + setIssueDescription("") // clear after send + } catch (error) { + console.error("Failed to send message", error) + alert("Failed to send issue report.") + } + } return (
diff --git a/products/userale/packages/flagon-userale-ext/src/utils/messaging.ts b/products/userale/packages/flagon-userale-ext/src/utils/messaging.ts new file mode 100644 index 0000000..b53f411 --- /dev/null +++ b/products/userale/packages/flagon-userale-ext/src/utils/messaging.ts @@ -0,0 +1,12 @@ +/** + * Sends a message to the content script from the popup, options, or background page + */ +export async function sendToContent (tabId: number, message: any): Promise { + return new Promise((resolve, reject) => { + chrome.tabs.sendMessage(tabId, message, (response) => { + const err = chrome.runtime.lastError + if (err) reject(err) + else resolve(response) + }) + }) +} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/utils/storage.ts b/products/userale/packages/flagon-userale-ext/src/utils/storage.ts index f95a274..4e1e261 100644 --- a/products/userale/packages/flagon-userale-ext/src/utils/storage.ts +++ b/products/userale/packages/flagon-userale-ext/src/utils/storage.ts @@ -35,6 +35,7 @@ export async function getStoredOptions(): Promise { // Only to be used in ~/options export async function setStoredOptions(values: Partial) { + // Validate the new options try { new RegExp(values.allowList); new URL(values.loggingUrl); @@ -42,9 +43,12 @@ export async function setStoredOptions(values: Partial) { return error; } + // Store the options for after the browser is closed await browser.storage.local.set(values); + + // Notify the background script of the change return await sendToBackground({ name: "config_change", - body: { values } + body: values }) -} +} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/esm/main.d.ts b/products/userale/packages/flagon-userale/build/esm/main.d.ts deleted file mode 100644 index 5e56576..0000000 --- a/products/userale/packages/flagon-userale/build/esm/main.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -declare namespace Settings { - type Version = string | null; - type UserId = string | null; - type SessionId = string | null; - type UserFromParams = string | null; - type ToolName = string | null; - type AuthHeader = CallableFunction | string | null; - type CustomIndex = string | null; - type HeaderObject = { [key: string]: string }; - type Headers = HeaderObject | null; - type ConfigValueTypes = - | string - | number - | boolean - | null - | Version - | UserId - | SessionId - | UserFromParams - | ToolName - | AuthHeader - | CustomIndex - | Headers; - - type TimeFunction = (() => number) | ((ts: number) => number); - - export interface DefaultConfig { - [key: string]: ConfigValueTypes; - } - - export interface Config extends DefaultConfig { - autostart: boolean; - authHeader: AuthHeader; - browserSessionId: SessionId; - custIndex: CustomIndex; - headers: Headers; - httpSessionId: SessionId; - logCountThreshold: number; - logDetails: boolean; - on?: boolean; - resolution: number; - sessionId: SessionId; - time: TimeFunction; - toolName: ToolName; - toolVersion?: Version; - transmitInterval: number; - url: string; - userFromParams: UserFromParams; - useraleVersion: Version; - userId: UserId; - version?: Version; - websocketsEnabled?: boolean; - } - - export interface IConfiguration extends Config { - getInstance(): Configuration; - configure(newConfig: Config): void; - } -} - -// TODO: Switch to protobuf for managing log types -declare namespace Logging { - type JSONObject = { - [key: string]: - | string - | number - | boolean - | null - | undefined - | JSONObject - | Array; - }; - export type Log = JSONObject; // TODO: Intersect this with the default log objects (raw & interval) - export type CustomLog = JSONObject; - - export type DynamicDetailFunction = ( - e: E, - ) => JSONObject; - export type StaticDetailFunction = () => JSONObject; -} - -declare namespace Events { - type FormElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement; - type ChangeEvent = Event; - export type RawEvents = - | "dblclick" - | "mouseup" - | "mousedown" - | "dragstart" - | "dragend" - | "drag" - | "drop" - | "keydown"; - export type IntervalEvents = - | "click" - | "focus" - | "blur" - | "input" - | "change" - | "mouseover" - | "submit"; - export type WindowEvents = "load" | "blur" | "focus"; - export type BufferedEvents = "wheel" | "scroll" | "resize"; - export type RefreshEvents = "submit"; - export type AllowedEvents = - | RawEvents - | IntervalEvents - | WindowEvents - | BufferedEvents - | RefreshEvents; - - export type EventDetailsMap = Partial<{ - [key in T]: - | Logging.DynamicDetailFunction< - | MouseEvent - | KeyboardEvent - | InputEvent - | Events.ChangeEvent - | WheelEvent - > - | Logging.StaticDetailFunction - | null; - }>; - - export type EventBoolMap = Partial<{ - [key in T]: boolean; - }>; -} - -declare namespace Callbacks { - export type AuthCallback = () => string; - export type HeadersCallback = () => Settings.HeaderObject; - - export type CallbackMap = { - [key in string]: CallableFunction; - }; -} - -/** - * Defines the way information is extracted from various events. - * Also defines which events we will listen to. - * @param {Settings.Config} options UserALE Configuration object to read from. - * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods. - */ -declare function defineCustomDetails(options: Settings.DefaultConfig, type: Events.AllowedEvents): Logging.DynamicDetailFunction | null | undefined; - -/** - * Registers the provided callback to be used when updating the auth header. - * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string. - * @returns {boolean} Whether the operation succeeded. - */ -declare function registerAuthCallback(callback: Callbacks.AuthCallback): boolean; - -/** - * Adds named callbacks to be executed when logging. - * @param {Object } newCallbacks An object containing named callback functions. - */ -declare function addCallbacks(...newCallbacks: Record[]): Callbacks.CallbackMap; -/** - * Removes callbacks by name. - * @param {String[]} targetKeys A list of names of functions to remove. - */ -declare function removeCallbacks(targetKeys: string[]): void; -/** - * Transforms the provided HTML event into a log and appends it to the log queue. - * @param {Event} e The event to be logged. - * @param {Function} detailFcn The function to extract additional log parameters from the event. - * @return {boolean} Whether the event was logged. - */ -declare function packageLog(e: Event, detailFcn?: Logging.DynamicDetailFunction | null): boolean; -/** - * Packages the provided customLog to include standard meta data and appends it to the log queue. - * @param {Logging.CustomLog} customLog The behavior to be logged. - * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. - * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) - * @return {boolean} Whether the event was logged. - */ -declare function packageCustomLog(customLog: Logging.CustomLog, detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction, userAction: boolean): boolean; -/** - * Builds a string CSS selector from the provided element - * @param {EventTarget} ele The element from which the selector is built. - * @return {string} The CSS selector for the element, or Unknown if it can't be determined. - */ -declare function getSelector(ele: EventTarget): string; -/** - * Builds an array of elements from the provided event target, to the root element. - * @param {Event} e Event from which the path should be built. - * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. - */ -declare function buildPath(e: Event): string[]; - -declare let started: boolean; -declare let wsock: WebSocket; - -declare const version: string; -/** - * Used to start the logging process if the - * autostart configuration option is set to false. - */ -declare function start(): void; -/** - * Halts the logging process. Logs will no longer be sent. - */ -declare function stop(): void; -/** - * Updates the current configuration - * object with the provided values. - * @param {Partial} newConfig The configuration options to use. - * @return {Settings.Config} Returns the updated configuration. - */ -declare function options(newConfig: Partial | undefined): Settings.Config; -/** - * Appends a log to the log queue. - * @param {Logging.CustomLog} customLog The log to append. - * @return {boolean} Whether the operation succeeded. - */ -declare function log(customLog: Logging.CustomLog | undefined): boolean; - -export { addCallbacks, buildPath, defineCustomDetails as details, getSelector, log, options, packageCustomLog, packageLog, registerAuthCallback, removeCallbacks, start, started, stop, version, wsock }; diff --git a/products/userale/packages/flagon-userale/build/esm/main.mjs b/products/userale/packages/flagon-userale/build/esm/main.mjs deleted file mode 100644 index 40bdfcc..0000000 --- a/products/userale/packages/flagon-userale/build/esm/main.mjs +++ /dev/null @@ -1,1083 +0,0 @@ -/* Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to you under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License.*/ -// package.json -var version = "2.4.0"; - -// src/getInitialSettings.ts -var sessionId = null; -var httpSessionId = null; -function getInitialSettings() { - if (sessionId === null) { - sessionId = getsessionId( - "userAlesessionId", - "session_" + String(Date.now()) - ); - } - if (httpSessionId === null) { - httpSessionId = getsessionId( - "userAleHttpSessionId", - generatehttpSessionId() - ); - } - const script = document.currentScript || function() { - const scripts = document.getElementsByTagName("script"); - return scripts[scripts.length - 1]; - }(); - const get = script ? script.getAttribute.bind(script) : function() { - return null; - }; - const headers = get("data-headers"); - const settings = { - authHeader: get("data-auth") || null, - autostart: get("data-autostart") === "false" ? false : true, - browserSessionId: null, - custIndex: get("data-index") || null, - headers: headers ? JSON.parse(headers) : null, - httpSessionId, - logCountThreshold: +(get("data-threshold") || 5), - logDetails: get("data-log-details") === "true" ? true : false, - resolution: +(get("data-resolution") || 500), - sessionId: get("data-session") || sessionId, - time: timeStampScale(document.createEvent("CustomEvent")), - toolName: get("data-tool") || null, - toolVersion: get("data-version") || null, - transmitInterval: +(get("data-interval") || 5e3), - url: get("data-url") || "http://localhost:8000", - useraleVersion: get("data-userale-version") || null, - userFromParams: get("data-user-from-params") || null, - userId: get("data-user") || null - }; - return settings; -} -function getsessionId(sessionKey, value) { - if (window.sessionStorage.getItem(sessionKey) === null) { - window.sessionStorage.setItem(sessionKey, JSON.stringify(value)); - return value; - } - return JSON.parse(window.sessionStorage.getItem(sessionKey) || ""); -} -function timeStampScale(e) { - let tsScaler; - if (e.timeStamp && e.timeStamp > 0) { - const delta = Date.now() - e.timeStamp; - if (delta < 0) { - tsScaler = function() { - return e.timeStamp / 1e3; - }; - } else if (delta > e.timeStamp) { - const navStart = performance.timeOrigin; - tsScaler = function(ts) { - return ts + navStart; - }; - } else { - tsScaler = function(ts) { - return ts; - }; - } - } else { - tsScaler = function() { - return Date.now(); - }; - } - return tsScaler; -} -function generatehttpSessionId() { - const len = 32; - const arr = new Uint8Array(len / 2); - window.crypto.getRandomValues(arr); - return Array.from(arr, (dec) => { - return dec.toString(16).padStart(2, "0"); - }).join(""); -} - -// src/configure.ts -var _Configuration = class { - constructor() { - this.autostart = false; - this.authHeader = null; - this.browserSessionId = null; - this.custIndex = null; - this.headers = null; - this.httpSessionId = null; - this.logCountThreshold = 0; - this.logDetails = false; - this.on = false; - this.resolution = 0; - this.sessionId = null; - this.time = () => Date.now(); - this.toolName = null; - this.toolVersion = null; - this.transmitInterval = 0; - this.url = ""; - this.userFromParams = null; - this.useraleVersion = null; - this.userId = null; - this.version = null; - this.websocketsEnabled = false; - if (_Configuration.instance === null) { - this.initialize(); - } - } - static getInstance() { - if (_Configuration.instance === null) { - _Configuration.instance = new _Configuration(); - } - return _Configuration.instance; - } - initialize() { - const settings = getInitialSettings(); - this.update(settings); - } - reset() { - this.initialize(); - } - update(newConfig) { - Object.keys(newConfig).forEach((option) => { - if (option === "userFromParams") { - const userParamString = newConfig[option]; - const userId = userParamString ? _Configuration.getUserIdFromParams(userParamString) : null; - if (userId) { - this["userId"] = userId; - } - } - const hasNewUserFromParams = newConfig["userFromParams"]; - const willNullifyUserId = option === "userId" && newConfig[option] === null; - if (willNullifyUserId && hasNewUserFromParams) { - return; - } - const newOption = newConfig[option]; - if (newOption !== void 0) { - this[option] = newOption; - } - }); - } - static getUserIdFromParams(param) { - const userField = param; - const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); - const results = window.location.href.match(regex); - if (results && results[2]) { - return decodeURIComponent(results[2].replace(/\+/g, " ")); - } - return null; - } -}; -var Configuration = _Configuration; -Configuration.instance = null; - -// ../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js -var __spreadArray = function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var BrowserInfo = function() { - function BrowserInfo2(name, version3, os) { - this.name = name; - this.version = version3; - this.os = os; - this.type = "browser"; - } - return BrowserInfo2; -}(); -var NodeInfo = function() { - function NodeInfo2(version3) { - this.version = version3; - this.type = "node"; - this.name = "node"; - this.os = process.platform; - } - return NodeInfo2; -}(); -var SearchBotDeviceInfo = function() { - function SearchBotDeviceInfo2(name, version3, os, bot) { - this.name = name; - this.version = version3; - this.os = os; - this.bot = bot; - this.type = "bot-device"; - } - return SearchBotDeviceInfo2; -}(); -var BotInfo = function() { - function BotInfo2() { - this.type = "bot"; - this.bot = true; - this.name = "bot"; - this.version = null; - this.os = null; - } - return BotInfo2; -}(); -var ReactNativeInfo = function() { - function ReactNativeInfo2() { - this.type = "react-native"; - this.name = "react-native"; - this.version = null; - this.os = null; - } - return ReactNativeInfo2; -}(); -var SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/; -var SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/; -var REQUIRED_VERSION_PARTS = 3; -var userAgentRules = [ - ["aol", /AOLShield\/([0-9\._]+)/], - ["edge", /Edge\/([0-9\._]+)/], - ["edge-ios", /EdgiOS\/([0-9\._]+)/], - ["yandexbrowser", /YaBrowser\/([0-9\._]+)/], - ["kakaotalk", /KAKAOTALK\s([0-9\.]+)/], - ["samsung", /SamsungBrowser\/([0-9\.]+)/], - ["silk", /\bSilk\/([0-9._-]+)\b/], - ["miui", /MiuiBrowser\/([0-9\.]+)$/], - ["beaker", /BeakerBrowser\/([0-9\.]+)/], - ["edge-chromium", /EdgA?\/([0-9\.]+)/], - [ - "chromium-webview", - /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/ - ], - ["chrome", /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], - ["phantomjs", /PhantomJS\/([0-9\.]+)(:?\s|$)/], - ["crios", /CriOS\/([0-9\.]+)(:?\s|$)/], - ["firefox", /Firefox\/([0-9\.]+)(?:\s|$)/], - ["fxios", /FxiOS\/([0-9\.]+)/], - ["opera-mini", /Opera Mini.*Version\/([0-9\.]+)/], - ["opera", /Opera\/([0-9\.]+)(?:\s|$)/], - ["opera", /OPR\/([0-9\.]+)(:?\s|$)/], - ["pie", /^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/], - ["pie", /^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/], - ["netfront", /^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/], - ["ie", /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/], - ["ie", /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/], - ["ie", /MSIE\s(7\.0)/], - ["bb10", /BB10;\sTouch.*Version\/([0-9\.]+)/], - ["android", /Android\s([0-9\.]+)/], - ["ios", /Version\/([0-9\._]+).*Mobile.*Safari.*/], - ["safari", /Version\/([0-9\._]+).*Safari/], - ["facebook", /FB[AS]V\/([0-9\.]+)/], - ["instagram", /Instagram\s([0-9\.]+)/], - ["ios-webview", /AppleWebKit\/([0-9\.]+).*Mobile/], - ["ios-webview", /AppleWebKit\/([0-9\.]+).*Gecko\)$/], - ["curl", /^curl\/([0-9\.]+)$/], - ["searchbot", SEARCHBOX_UA_REGEX] -]; -var operatingSystemRules = [ - ["iOS", /iP(hone|od|ad)/], - ["Android OS", /Android/], - ["BlackBerry OS", /BlackBerry|BB10/], - ["Windows Mobile", /IEMobile/], - ["Amazon OS", /Kindle/], - ["Windows 3.11", /Win16/], - ["Windows 95", /(Windows 95)|(Win95)|(Windows_95)/], - ["Windows 98", /(Windows 98)|(Win98)/], - ["Windows 2000", /(Windows NT 5.0)|(Windows 2000)/], - ["Windows XP", /(Windows NT 5.1)|(Windows XP)/], - ["Windows Server 2003", /(Windows NT 5.2)/], - ["Windows Vista", /(Windows NT 6.0)/], - ["Windows 7", /(Windows NT 6.1)/], - ["Windows 8", /(Windows NT 6.2)/], - ["Windows 8.1", /(Windows NT 6.3)/], - ["Windows 10", /(Windows NT 10.0)/], - ["Windows ME", /Windows ME/], - ["Windows CE", /Windows CE|WinCE|Microsoft Pocket Internet Explorer/], - ["Open BSD", /OpenBSD/], - ["Sun OS", /SunOS/], - ["Chrome OS", /CrOS/], - ["Linux", /(Linux)|(X11)/], - ["Mac OS", /(Mac_PowerPC)|(Macintosh)/], - ["QNX", /QNX/], - ["BeOS", /BeOS/], - ["OS/2", /OS\/2/] -]; -function detect(userAgent) { - if (!!userAgent) { - return parseUserAgent(userAgent); - } - if (typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative") { - return new ReactNativeInfo(); - } - if (typeof navigator !== "undefined") { - return parseUserAgent(navigator.userAgent); - } - return getNodeVersion(); -} -function matchUserAgent(ua) { - return ua !== "" && userAgentRules.reduce(function(matched, _a) { - var browser = _a[0], regex = _a[1]; - if (matched) { - return matched; - } - var uaMatch = regex.exec(ua); - return !!uaMatch && [browser, uaMatch]; - }, false); -} -function parseUserAgent(ua) { - var matchedRule = matchUserAgent(ua); - if (!matchedRule) { - return null; - } - var name = matchedRule[0], match = matchedRule[1]; - if (name === "searchbot") { - return new BotInfo(); - } - var versionParts = match[1] && match[1].split(".").join("_").split("_").slice(0, 3); - if (versionParts) { - if (versionParts.length < REQUIRED_VERSION_PARTS) { - versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true); - } - } else { - versionParts = []; - } - var version3 = versionParts.join("."); - var os = detectOS(ua); - var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua); - if (searchBotMatch && searchBotMatch[1]) { - return new SearchBotDeviceInfo(name, version3, os, searchBotMatch[1]); - } - return new BrowserInfo(name, version3, os); -} -function detectOS(ua) { - for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) { - var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1]; - var match = regex.exec(ua); - if (match) { - return os; - } - } - return null; -} -function getNodeVersion() { - var isNode = typeof process !== "undefined" && process.version; - return isNode ? new NodeInfo(process.version.slice(1)) : null; -} -function createVersionParts(count) { - var output = []; - for (var ii = 0; ii < count; ii++) { - output.push("0"); - } - return output; -} - -// src/packageLogs.ts -var browserInfo = detect(); -var logs; -var config; -var intervalId; -var intervalType; -var intervalPath; -var intervalTimer; -var intervalCounter; -var intervalLog; -var filterHandler = null; -var mapHandler = null; -var cbHandlers = {}; -function addCallbacks(...newCallbacks) { - newCallbacks.forEach((source) => { - let descriptors = {}; - descriptors = Object.keys(source).reduce((descriptors2, key) => { - descriptors2[key] = Object.getOwnPropertyDescriptor(source, key); - return descriptors2; - }, descriptors); - Object.getOwnPropertySymbols(source).forEach((sym) => { - const descriptor = Object.getOwnPropertyDescriptor(source, sym); - if (descriptor?.enumerable) { - descriptors[sym] = descriptor; - } - }); - Object.defineProperties(cbHandlers, descriptors); - }); - return cbHandlers; -} -function removeCallbacks(targetKeys) { - targetKeys.forEach((key) => { - if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) { - delete cbHandlers[key]; - } - }); -} -function initPackager(newLogs, newConfig) { - logs = newLogs; - config = newConfig; - cbHandlers = {}; - intervalId = null; - intervalType = null; - intervalPath = null; - intervalTimer = null; - intervalCounter = 0; - intervalLog = null; -} -function packageLog(e, detailFcn) { - if (!config.on) { - return false; - } - let details = null; - if (detailFcn) { - details = detailFcn(e); - } - const timeFields = extractTimeFields( - e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now() - ); - let log2 = { - target: e.target ? getSelector(e.target) : null, - path: buildPath(e), - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: timeFields.milli, - microTime: timeFields.micro, - location: getLocation(e), - scrnRes: getScreenRes(), - type: e.type, - logType: "raw", - userAction: true, - details, - userId: config.userId, - toolVersion: config.toolVersion, - toolName: config.toolName, - useraleVersion: config.useraleVersion, - sessionId: config.sessionId, - httpSessionId: config.httpSessionId, - browserSessionId: config.browserSessionId, - attributes: buildAttrs(e), - style: buildCSS(e) - }; - if (typeof filterHandler === "function" && !filterHandler(log2)) { - return false; - } - if (typeof mapHandler === "function") { - log2 = mapHandler(log2, e); - } - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log2 = func(log2, e); - if (!log2) { - return false; - } - } - } - logs.push(log2); - return true; -} -function packageCustomLog(customLog, detailFcn, userAction) { - if (!config.on) { - return false; - } - let details = null; - if (detailFcn.length === 0) { - const staticDetailFcn = detailFcn; - details = staticDetailFcn(); - } - const metaData = { - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - clientTime: Date.now(), - scrnRes: getScreenRes(), - logType: "custom", - userAction, - details, - userId: config.userId, - toolVersion: config.toolVersion, - toolName: config.toolName, - useraleVersion: config.useraleVersion, - sessionId: config.sessionId, - httpSessionId: config.httpSessionId, - browserSessionId: config.browserSessionId - }; - let log2 = Object.assign(metaData, customLog); - if (typeof filterHandler === "function" && !filterHandler(log2)) { - return false; - } - if (typeof mapHandler === "function") { - log2 = mapHandler(log2); - } - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - log2 = func(log2, null); - if (!log2) { - return false; - } - } - } - logs.push(log2); - return true; -} -function extractTimeFields(timeStamp) { - return { - milli: Math.floor(timeStamp), - micro: Number((timeStamp % 1).toFixed(3)) - }; -} -function packageIntervalLog(e) { - try { - const target = e.target ? getSelector(e.target) : null; - const path = buildPath(e); - const type = e.type; - const timestamp = Math.floor( - e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now() - ); - if (intervalId == null) { - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - if ((intervalId !== target || intervalType !== type) && intervalTimer) { - intervalLog = { - target: intervalId, - path: intervalPath, - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), - count: intervalCounter, - duration: timestamp - intervalTimer, - startTime: intervalTimer, - endTime: timestamp, - type: intervalType, - logType: "interval", - targetChange: intervalId !== target, - typeChange: intervalType !== type, - userAction: false, - userId: config.userId, - toolVersion: config.toolVersion, - toolName: config.toolName, - useraleVersion: config.useraleVersion, - sessionId: config.sessionId, - httpSessionId: config.httpSessionId, - browserSessionId: config.browserSessionId - }; - if (typeof filterHandler === "function" && !filterHandler(intervalLog)) { - return false; - } - if (typeof mapHandler === "function") { - intervalLog = mapHandler(intervalLog, e); - } - for (const func of Object.values(cbHandlers)) { - if (typeof func === "function") { - intervalLog = func(intervalLog, null); - if (!intervalLog) { - return false; - } - } - } - if (intervalLog) - logs.push(intervalLog); - intervalId = target; - intervalType = type; - intervalPath = path; - intervalTimer = timestamp; - intervalCounter = 0; - } - if (intervalId == target && intervalType == type && intervalCounter) { - intervalCounter = intervalCounter + 1; - } - return true; - } catch { - return false; - } -} -function getLocation(e) { - if (e instanceof MouseEvent) { - if (e.pageX != null) { - return { x: e.pageX, y: e.pageY }; - } else if (e.clientX != null) { - return { - x: document.documentElement.scrollLeft + e.clientX, - y: document.documentElement.scrollTop + e.clientY - }; - } - } else { - return { x: null, y: null }; - } -} -function getScreenRes() { - return { width: window.innerWidth, height: window.innerHeight }; -} -function getSelector(ele) { - if (ele instanceof HTMLElement || ele instanceof Element) { - if (ele.localName) { - return ele.localName + (ele.id ? "#" + ele.id : "") + (ele.className ? "." + ele.className : ""); - } else if (ele.nodeName) { - return ele.nodeName + (ele.id ? "#" + ele.id : "") + (ele.className ? "." + ele.className : ""); - } - } else if (ele instanceof Document) { - return "#document"; - } else if (ele === globalThis) { - return "Window"; - } - return "Unknown"; -} -function buildPath(e) { - const path = e.composedPath(); - return selectorizePath(path); -} -function selectorizePath(path) { - let i = 0; - let pathEle; - const pathSelectors = []; - while (pathEle = path[i]) { - pathSelectors.push(getSelector(pathEle)); - ++i; - pathEle = path[i]; - } - return pathSelectors; -} -function detectBrowser() { - return { - browser: browserInfo ? browserInfo.name : "", - version: browserInfo ? browserInfo.version : "" - }; -} -function buildAttrs(e) { - const attributes = {}; - const attributeBlackList = ["style"]; - if (e.target && e.target instanceof Element) { - for (const attr of e.target.attributes) { - if (attributeBlackList.includes(attr.name)) - continue; - let val = attr.value; - try { - val = JSON.parse(val); - } catch (error) { - } - attributes[attr.name] = val; - } - } - return attributes; -} -function buildCSS(e) { - const properties = {}; - if (e.target && e.target instanceof HTMLElement) { - const styleObj = e.target.style; - for (let i = 0; i < styleObj.length; i++) { - const prop = styleObj[i]; - properties[prop] = styleObj.getPropertyValue(prop); - } - } - return properties; -} - -// src/attachHandlers.ts -var events; -var bufferBools; -var bufferedEvents; -var refreshEvents; -var intervalEvents = [ - "click", - "focus", - "blur", - "input", - "change", - "mouseover", - "submit" -]; -var windowEvents = ["load", "blur", "focus"]; -function extractMouseDetails(e) { - return { - clicks: e.detail, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey - }; -} -function extractKeyboardDetails(e) { - return { - key: e.key, - code: e.code, - ctrl: e.ctrlKey, - alt: e.altKey, - shift: e.shiftKey, - meta: e.metaKey - }; -} -function extractChangeDetails(e) { - return { - value: e.target.value - }; -} -function extractWheelDetails(e) { - return { - x: e.deltaX, - y: e.deltaY, - z: e.deltaZ - }; -} -function extractScrollDetails() { - return { - x: window.scrollX, - y: window.scrollY - }; -} -function extractResizeDetails() { - return { - width: window.outerWidth, - height: window.outerHeight - }; -} -function defineDetails(config3) { - events = { - click: extractMouseDetails, - dblclick: extractMouseDetails, - mousedown: extractMouseDetails, - mouseup: extractMouseDetails, - focus: null, - blur: null, - input: config3.logDetails ? extractKeyboardDetails : null, - change: config3.logDetails ? extractChangeDetails : null, - dragstart: null, - dragend: null, - drag: null, - drop: null, - keydown: config3.logDetails ? extractKeyboardDetails : null, - mouseover: null - }; - bufferBools = {}; - bufferedEvents = { - wheel: extractWheelDetails, - scroll: extractScrollDetails, - resize: extractResizeDetails - }; - refreshEvents = { - submit: null - }; -} -function defineCustomDetails(options2, type) { - const eventType = { - click: extractMouseDetails, - dblclick: extractMouseDetails, - mousedown: extractMouseDetails, - mouseup: extractMouseDetails, - focus: null, - blur: null, - load: null, - input: options2.logDetails ? extractKeyboardDetails : null, - change: options2.logDetails ? extractChangeDetails : null, - dragstart: null, - dragend: null, - drag: null, - drop: null, - keydown: options2.logDetails ? extractKeyboardDetails : null, - mouseover: null, - wheel: extractWheelDetails, - scroll: extractScrollDetails, - resize: extractResizeDetails, - submit: null - }; - return eventType[type]; -} -function attachHandlers(config3) { - try { - defineDetails(config3); - Object.keys(events).forEach(function(ev) { - document.addEventListener( - ev, - function(e) { - packageLog(e, events[ev]); - }, - true - ); - }); - intervalEvents.forEach(function(ev) { - document.addEventListener( - ev, - function(e) { - packageIntervalLog(e); - }, - true - ); - }); - Object.keys(bufferedEvents).forEach( - function(ev) { - bufferBools[ev] = true; - window.addEventListener( - ev, - function(e) { - if (bufferBools[ev]) { - bufferBools[ev] = false; - packageLog(e, bufferedEvents[ev]); - setTimeout(function() { - bufferBools[ev] = true; - }, config3.resolution); - } - }, - true - ); - } - ); - Object.keys(refreshEvents).forEach( - function(ev) { - document.addEventListener( - ev, - function(e) { - packageLog(e, events[ev]); - }, - true - ); - } - ); - windowEvents.forEach(function(ev) { - window.addEventListener( - ev, - function(e) { - packageLog(e, function() { - return { window: true }; - }); - }, - true - ); - }); - return true; - } catch { - return false; - } -} - -// src/utils/auth/index.ts -var authCallback = null; -function updateAuthHeader(config3) { - if (authCallback) { - try { - config3.authHeader = authCallback(); - } catch (e) { - console.error(`Error encountered while setting the auth header: ${e}`); - } - } -} -function registerAuthCallback(callback) { - try { - verifyCallback(callback); - authCallback = callback; - return true; - } catch (e) { - return false; - } -} -function verifyCallback(callback) { - if (typeof callback !== "function") { - throw new Error("Userale auth callback must be a function"); - } - const result = callback(); - if (typeof result !== "string") { - throw new Error("Userale auth callback must return a string"); - } -} - -// src/utils/headers/index.ts -var headersCallback = null; -function updateCustomHeaders(config3) { - if (headersCallback) { - try { - config3.headers = headersCallback(); - } catch (e) { - console.error(`Error encountered while setting the headers: ${e}`); - } - } -} - -// src/sendLogs.ts -var sendIntervalId; -function initSender(logs3, config3) { - if (sendIntervalId) { - clearInterval(sendIntervalId); - } - sendIntervalId = sendOnInterval(logs3, config3); - sendOnClose(logs3, config3); -} -function sendOnInterval(logs3, config3) { - return setInterval(function() { - if (!config3.on) { - return; - } - if (logs3.length >= config3.logCountThreshold) { - sendLogs(logs3.slice(0), config3, 0); - logs3.splice(0); - } - }, config3.transmitInterval); -} -function sendOnClose(logs3, config3) { - window.addEventListener("pagehide", function() { - if (!config3.on) { - return; - } - if (logs3.length > 0) { - if (config3.websocketsEnabled) { - const data = JSON.stringify(logs3); - wsock.send(data); - } else { - const headers = new Headers(); - headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); - if (config3.authHeader) { - headers.set("Authorization", config3.authHeader.toString()); - } - fetch(config3.url, { - keepalive: true, - method: "POST", - headers, - body: JSON.stringify(logs3) - }).catch((error) => { - console.error(error); - }); - } - logs3.splice(0); - } - }); -} -function sendLogs(logs3, config3, retries) { - const data = JSON.stringify(logs3); - if (config3.websocketsEnabled) { - wsock.send(data); - } else { - const req = new XMLHttpRequest(); - req.open("POST", config3.url); - updateAuthHeader(config3); - if (config3.authHeader) { - req.setRequestHeader( - "Authorization", - typeof config3.authHeader === "function" ? config3.authHeader() : config3.authHeader - ); - } - req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); - updateCustomHeaders(config3); - if (config3.headers) { - Object.entries(config3.headers).forEach(([header, value]) => { - req.setRequestHeader(header, value); - }); - } - req.onreadystatechange = function() { - if (req.readyState === 4 && req.status !== 200) { - if (retries > 0) { - sendLogs(logs3, config3, retries--); - } - } - }; - req.send(data); - } -} - -// src/main.ts -var config2 = Configuration.getInstance(); -var logs2 = []; -var startLoadTimestamp = Date.now(); -var endLoadTimestamp; -try { - window.onload = function() { - endLoadTimestamp = Date.now(); - }; -} catch (error) { - endLoadTimestamp = Date.now(); -} -var started = false; -var wsock; -config2.update({ - useraleVersion: version -}); -initPackager(logs2, config2); -getWebsocketsEnabled(config2); -if (config2.autostart) { - setup(config2); -} -function setup(config3) { - if (!started) { - setTimeout(function() { - let state; - try { - state = document.readyState; - } catch (error) { - initSender(logs2, config3); - } - if (config3.autostart && (state === "interactive" || state === "complete")) { - attachHandlers(config3); - initSender(logs2, config3); - started = config3.on = true; - packageCustomLog( - { - type: "load", - details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp } - }, - () => ({}), - false - ); - } else { - setup(config3); - } - }, 100); - } -} -function getWebsocketsEnabled(config3) { - wsock = new WebSocket(config3.url.replace("http://", "ws://")); - wsock.onerror = () => { - console.log("no websockets detected"); - }; - wsock.onopen = () => { - console.log("connection established with websockets"); - config3.websocketsEnabled = true; - }; - wsock.onclose = () => { - sendOnClose(logs2, config3); - }; -} -var version2 = version; -function start() { - if (!started || config2.autostart === false) { - started = config2.on = true; - config2.update({ autostart: true }); - } -} -function stop() { - started = config2.on = false; - config2.update({ autostart: false }); -} -function options(newConfig) { - if (newConfig) { - config2.update(newConfig); - } - return config2; -} -function log(customLog) { - if (customLog) { - logs2.push(customLog); - return true; - } else { - return false; - } -} -export { - addCallbacks, - buildPath, - defineCustomDetails as details, - getSelector, - log, - options, - packageCustomLog, - packageLog, - registerAuthCallback, - removeCallbacks, - start, - started, - stop, - version2 as version, - wsock -}; -//# sourceMappingURL=main.mjs.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/esm/main.mjs.map b/products/userale/packages/flagon-userale/build/esm/main.mjs.map deleted file mode 100644 index 66a020b..0000000 --- a/products/userale/packages/flagon-userale/build/esm/main.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/getInitialSettings.ts","../../src/configure.ts","../../../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js","../../src/packageLogs.ts","../../src/attachHandlers.ts","../../src/utils/auth/index.ts","../../src/utils/headers/index.ts","../../src/sendLogs.ts","../../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (window.sessionStorage.getItem(sessionKey) === null) {\n window.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(window.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { detect } from \"detect-browser\";\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\nconst browserInfo = detect();\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: window.innerWidth, height: window.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\nexport function detectBrowser() {\n return {\n browser: browserInfo ? browserInfo.name : \"\",\n version: browserInfo ? browserInfo.version : \"\",\n };\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n window.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n window.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n window.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n if (config.websocketsEnabled) {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\n\n// @todo expose config object to sendLogs replate url with config.url\nexport function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n) {\n const data = JSON.stringify(logs);\n\n if (config.websocketsEnabled) {\n wsock.send(data);\n } else {\n const req = new XMLHttpRequest();\n\n req.open(\"POST\", config.url);\n\n // Update headers\n updateAuthHeader(config);\n if (config.authHeader) {\n req.setRequestHeader(\n \"Authorization\",\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader,\n );\n }\n req.setRequestHeader(\"Content-type\", \"application/json;charset=UTF-8\");\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n Object.entries(config.headers).forEach(([header, value]) => {\n req.setRequestHeader(header, value);\n });\n }\n\n req.onreadystatechange = function() {\n if (req.readyState === 4 && req.status !== 200) {\n if (retries > 0) {\n sendLogs(logs, config, retries--);\n }\n }\n };\n\n req.send(data);\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender, sendOnClose } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\ntry {\n window.onload = function() {\n endLoadTimestamp = Date.now();\n };\n} catch (error) {\n endLoadTimestamp = Date.now();\n}\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\ngetWebsocketsEnabled(config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n initSender(logs, config);\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n/**\n * Checks to see if the specified backend URL supporsts Websockets\n * and updates the config accordingly\n */\nfunction getWebsocketsEnabled(config: Configuration) {\n wsock = new WebSocket(config.url.replace(\"http://\", \"ws://\"));\n wsock.onerror = () => {\n console.log(\"no websockets detected\");\n };\n wsock.onopen = () => {\n console.log(\"connection established with websockets\");\n config.websocketsEnabled = true;\n };\n wsock.onclose = () => {\n sendOnClose(logs, config);\n };\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAI,YAA2B;AAC/B,IAAI,gBAA+B;AAO5B,SAAS,qBAAsC;AACpD,MAAI,cAAc,MAAM;AACtB,gBAAY;AAAA,MACV;AAAA,MACA,aAAa,OAAO,KAAK,IAAI,CAAC;AAAA,IAChC;AAAA,EACF;AAEA,MAAI,kBAAkB,MAAM;AAC1B,oBAAgB;AAAA,MACd;AAAA,MACA,sBAAsB;AAAA,IACxB;AAAA,EACF;AAEA,QAAM,SACJ,SAAS,iBACR,WAAY;AACX,UAAM,UAAU,SAAS,qB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mBAAmB;AAAA,UACjE;AAAA,UACA,OAAO,CAAC;AAAA,UACR;AAAA,QACF;AAAA,MACF,OAAO;AACL,cAAMA,OAAM;AAAA,MACd;AAAA,IACF,GAAG,GAAG;AAAA,EACR;AACF;AAMA,SAAS,qBAAqBA,SAAuB;AACnD,UAAQ,IAAI,UAAUA,QAAO,IAAI,QAAQ,WAAW,OAAO,CAAC;AAC5D,QAAM,UAAU,MAAM;AACpB,YAAQ,IAAI,wBAAwB;AAAA,EACtC;AACA,QAAM,SAAS,MAAM;AACnB,YAAQ,IAAI,wCAAwC;AACpD,IAAAA,QAAO,oBAAoB;AAAA,EAC7B;AACA,QAAM,UAAU,MAAM;AACpB,gBAAYC,OAAMD,OAAM;AAAA,EAC1B;AACF;AAGO,IAAME,WAAU;AAMhB,SAAS,QAAc;AAC5B,MAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;","names":["BrowserInfo","version","NodeInfo","version","SearchBotDeviceInfo","version","BotInfo","ReactNativeInfo","version","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/main.d.ts b/products/userale/packages/flagon-userale/build/main.d.ts index e08e30d..5e56576 100644 --- a/products/userale/packages/flagon-userale/build/main.d.ts +++ b/products/userale/packages/flagon-userale/build/main.d.ts @@ -65,6 +65,7 @@ declare namespace Settings { useraleVersion: Version; userId: UserId; version?: Version; + websocketsEnabled?: boolean; } export interface IConfiguration extends Config { @@ -151,56 +152,6 @@ declare namespace Callbacks { }; } -declare class Configuration$1 { - [key: string]: Settings.ConfigValueTypes; - private static instance; - autostart: boolean; - authHeader: Settings.AuthHeader; - browserSessionId: Settings.SessionId; - custIndex: Settings.CustomIndex; - headers: Settings.Headers; - httpSessionId: Settings.SessionId; - logCountThreshold: number; - logDetails: boolean; - on: boolean; - resolution: number; - sessionId: Settings.SessionId; - time: Settings.TimeFunction; - toolName: Settings.ToolName; - toolVersion: Settings.Version; - transmitInterval: number; - url: string; - userFromParams: Settings.UserFromParams; - useraleVersion: Settings.Version; - userId: Settings.UserId; - version: Settings.Version; - websocketsEnabled: boolean; - private constructor(); - static getInstance(): Configuration$1; - private initialize; - /** - * Resets the configuration to its initial state. - */ - reset(): void; - /** - * Shallow merges a newConfig with the configuration class, updating it. - * Retrieves/updates the userid if userFromParams is provided. - * @param {Partial} newConfig Configuration object to merge into the current config. - */ - update(newConfig: Partial): void; - /** - * Attempts to extract the userid from the query parameters of the URL. - * @param {string} param The name of the query parameter containing the userid. - * @return {string | null} The extracted/decoded userid, or null if none is found. - */ - static getUserIdFromParams(param: string): string | null; - /** - * - * @return {bool} - */ - isWebSocket(): boolean; -} - /** * Defines the way information is extracted from various events. * Also defines which events we will listen to. @@ -255,13 +206,8 @@ declare function getSelector(ele: EventTarget): string; declare function buildPath(e: Event): string[]; declare let started: boolean; +declare let wsock: WebSocket; -/** - * Hooks the global event listener, and starts up the - * logging interval. - * @param {Configuration} config Configuration settings for the logger - */ -declare function setup(config: Configuration$1): void; declare const version: string; /** * Used to start the logging process if the @@ -286,4 +232,4 @@ declare function options(newConfig: Partial | undefined): Setti */ declare function log(customLog: Logging.CustomLog | undefined): boolean; -export { addCallbacks, buildPath, defineCustomDetails as details, getSelector, log, options, packageCustomLog, packageLog, registerAuthCallback, removeCallbacks, setup, start, started, stop, version }; +export { addCallbacks, buildPath, defineCustomDetails as details, getSelector, log, options, packageCustomLog, packageLog, registerAuthCallback, removeCallbacks, start, started, stop, version, wsock }; diff --git a/products/userale/packages/flagon-userale/build/main.mjs b/products/userale/packages/flagon-userale/build/main.mjs index f4cc151..8e511bc 100644 --- a/products/userale/packages/flagon-userale/build/main.mjs +++ b/products/userale/packages/flagon-userale/build/main.mjs @@ -1,17 +1,17 @@ /* Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to you under the Apache License, Version 2.0 -(the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License.*/ + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.*/ // package.json var version = "2.4.0"; @@ -19,6 +19,29 @@ var version = "2.4.0"; var sessionId = null; var httpSessionId = null; function getInitialSettings() { + if (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) { + const settings2 = { + authHeader: null, + autostart: true, + browserSessionId: null, + custIndex: null, + headers: null, + httpSessionId: null, + logCountThreshold: 5, + logDetails: false, + resolution: 500, + sessionId, + time: (ts) => ts !== void 0 ? ts : Date.now(), + toolName: null, + toolVersion: null, + transmitInterval: 5e3, + url: "http://localhost:8000", + useraleVersion: null, + userFromParams: null, + userId: null + }; + return settings2; + } if (sessionId === null) { sessionId = getsessionId( "userAlesessionId", @@ -62,11 +85,11 @@ function getInitialSettings() { return settings; } function getsessionId(sessionKey, value) { - if (window.sessionStorage.getItem(sessionKey) === null) { - window.sessionStorage.setItem(sessionKey, JSON.stringify(value)); + if (self.sessionStorage.getItem(sessionKey) === null) { + self.sessionStorage.setItem(sessionKey, JSON.stringify(value)); return value; } - return JSON.parse(window.sessionStorage.getItem(sessionKey) || ""); + return JSON.parse(self.sessionStorage.getItem(sessionKey) || ""); } function timeStampScale(e) { let tsScaler; @@ -137,12 +160,8 @@ var _Configuration = class { return _Configuration.instance; } initialize() { - try { - const settings = getInitialSettings(); - this.update(settings); - } catch (error) { - console.log(error); - } + const settings = getInitialSettings(); + this.update(settings); } reset() { this.initialize(); @@ -176,214 +195,11 @@ var _Configuration = class { } return null; } - isWebSocket() { - return this.url.startsWith("ws://") || this.url.startsWith("wss://"); - } }; var Configuration = _Configuration; Configuration.instance = null; -// ../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js -var __spreadArray = function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var BrowserInfo = function() { - function BrowserInfo2(name, version3, os) { - this.name = name; - this.version = version3; - this.os = os; - this.type = "browser"; - } - return BrowserInfo2; -}(); -var NodeInfo = function() { - function NodeInfo2(version3) { - this.version = version3; - this.type = "node"; - this.name = "node"; - this.os = process.platform; - } - return NodeInfo2; -}(); -var SearchBotDeviceInfo = function() { - function SearchBotDeviceInfo2(name, version3, os, bot) { - this.name = name; - this.version = version3; - this.os = os; - this.bot = bot; - this.type = "bot-device"; - } - return SearchBotDeviceInfo2; -}(); -var BotInfo = function() { - function BotInfo2() { - this.type = "bot"; - this.bot = true; - this.name = "bot"; - this.version = null; - this.os = null; - } - return BotInfo2; -}(); -var ReactNativeInfo = function() { - function ReactNativeInfo2() { - this.type = "react-native"; - this.name = "react-native"; - this.version = null; - this.os = null; - } - return ReactNativeInfo2; -}(); -var SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/; -var SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/; -var REQUIRED_VERSION_PARTS = 3; -var userAgentRules = [ - ["aol", /AOLShield\/([0-9\._]+)/], - ["edge", /Edge\/([0-9\._]+)/], - ["edge-ios", /EdgiOS\/([0-9\._]+)/], - ["yandexbrowser", /YaBrowser\/([0-9\._]+)/], - ["kakaotalk", /KAKAOTALK\s([0-9\.]+)/], - ["samsung", /SamsungBrowser\/([0-9\.]+)/], - ["silk", /\bSilk\/([0-9._-]+)\b/], - ["miui", /MiuiBrowser\/([0-9\.]+)$/], - ["beaker", /BeakerBrowser\/([0-9\.]+)/], - ["edge-chromium", /EdgA?\/([0-9\.]+)/], - [ - "chromium-webview", - /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/ - ], - ["chrome", /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], - ["phantomjs", /PhantomJS\/([0-9\.]+)(:?\s|$)/], - ["crios", /CriOS\/([0-9\.]+)(:?\s|$)/], - ["firefox", /Firefox\/([0-9\.]+)(?:\s|$)/], - ["fxios", /FxiOS\/([0-9\.]+)/], - ["opera-mini", /Opera Mini.*Version\/([0-9\.]+)/], - ["opera", /Opera\/([0-9\.]+)(?:\s|$)/], - ["opera", /OPR\/([0-9\.]+)(:?\s|$)/], - ["pie", /^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/], - ["pie", /^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/], - ["netfront", /^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/], - ["ie", /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/], - ["ie", /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/], - ["ie", /MSIE\s(7\.0)/], - ["bb10", /BB10;\sTouch.*Version\/([0-9\.]+)/], - ["android", /Android\s([0-9\.]+)/], - ["ios", /Version\/([0-9\._]+).*Mobile.*Safari.*/], - ["safari", /Version\/([0-9\._]+).*Safari/], - ["facebook", /FB[AS]V\/([0-9\.]+)/], - ["instagram", /Instagram\s([0-9\.]+)/], - ["ios-webview", /AppleWebKit\/([0-9\.]+).*Mobile/], - ["ios-webview", /AppleWebKit\/([0-9\.]+).*Gecko\)$/], - ["curl", /^curl\/([0-9\.]+)$/], - ["searchbot", SEARCHBOX_UA_REGEX] -]; -var operatingSystemRules = [ - ["iOS", /iP(hone|od|ad)/], - ["Android OS", /Android/], - ["BlackBerry OS", /BlackBerry|BB10/], - ["Windows Mobile", /IEMobile/], - ["Amazon OS", /Kindle/], - ["Windows 3.11", /Win16/], - ["Windows 95", /(Windows 95)|(Win95)|(Windows_95)/], - ["Windows 98", /(Windows 98)|(Win98)/], - ["Windows 2000", /(Windows NT 5.0)|(Windows 2000)/], - ["Windows XP", /(Windows NT 5.1)|(Windows XP)/], - ["Windows Server 2003", /(Windows NT 5.2)/], - ["Windows Vista", /(Windows NT 6.0)/], - ["Windows 7", /(Windows NT 6.1)/], - ["Windows 8", /(Windows NT 6.2)/], - ["Windows 8.1", /(Windows NT 6.3)/], - ["Windows 10", /(Windows NT 10.0)/], - ["Windows ME", /Windows ME/], - ["Windows CE", /Windows CE|WinCE|Microsoft Pocket Internet Explorer/], - ["Open BSD", /OpenBSD/], - ["Sun OS", /SunOS/], - ["Chrome OS", /CrOS/], - ["Linux", /(Linux)|(X11)/], - ["Mac OS", /(Mac_PowerPC)|(Macintosh)/], - ["QNX", /QNX/], - ["BeOS", /BeOS/], - ["OS/2", /OS\/2/] -]; -function detect(userAgent) { - if (!!userAgent) { - return parseUserAgent(userAgent); - } - if (typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative") { - return new ReactNativeInfo(); - } - if (typeof navigator !== "undefined") { - return parseUserAgent(navigator.userAgent); - } - return getNodeVersion(); -} -function matchUserAgent(ua) { - return ua !== "" && userAgentRules.reduce(function(matched, _a) { - var browser = _a[0], regex = _a[1]; - if (matched) { - return matched; - } - var uaMatch = regex.exec(ua); - return !!uaMatch && [browser, uaMatch]; - }, false); -} -function parseUserAgent(ua) { - var matchedRule = matchUserAgent(ua); - if (!matchedRule) { - return null; - } - var name = matchedRule[0], match = matchedRule[1]; - if (name === "searchbot") { - return new BotInfo(); - } - var versionParts = match[1] && match[1].split(".").join("_").split("_").slice(0, 3); - if (versionParts) { - if (versionParts.length < REQUIRED_VERSION_PARTS) { - versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true); - } - } else { - versionParts = []; - } - var version3 = versionParts.join("."); - var os = detectOS(ua); - var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua); - if (searchBotMatch && searchBotMatch[1]) { - return new SearchBotDeviceInfo(name, version3, os, searchBotMatch[1]); - } - return new BrowserInfo(name, version3, os); -} -function detectOS(ua) { - for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) { - var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1]; - var match = regex.exec(ua); - if (match) { - return os; - } - } - return null; -} -function getNodeVersion() { - var isNode = typeof process !== "undefined" && process.version; - return isNode ? new NodeInfo(process.version.slice(1)) : null; -} -function createVersionParts(count) { - var output = []; - for (var ii = 0; ii < count; ii++) { - output.push("0"); - } - return output; -} - // src/packageLogs.ts -var browserInfo = detect(); var logs; var config; var intervalId; @@ -444,10 +260,10 @@ function packageLog(e, detailFcn) { let log2 = { target: e.target ? getSelector(e.target) : null, path: buildPath(e), - pageUrl: window.location.href, + pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: detectBrowser(), + browser: self.navigator.userAgent, clientTime: timeFields.milli, microTime: timeFields.micro, location: getLocation(e), @@ -493,10 +309,8 @@ function packageCustomLog(customLog, detailFcn, userAction) { details = staticDetailFcn(); } const metaData = { - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), + pageUrl: self.location.href, + browser: self.navigator.userAgent, clientTime: Date.now(), scrnRes: getScreenRes(), logType: "custom", @@ -553,10 +367,10 @@ function packageIntervalLog(e) { intervalLog = { target: intervalId, path: intervalPath, - pageUrl: window.location.href, + pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: detectBrowser(), + browser: self.navigator.userAgent, count: intervalCounter, duration: timestamp - intervalTimer, startTime: intervalTimer, @@ -619,7 +433,7 @@ function getLocation(e) { } } function getScreenRes() { - return { width: window.innerWidth, height: window.innerHeight }; + return { width: self.innerWidth, height: self.innerHeight }; } function getSelector(ele) { if (ele instanceof HTMLElement || ele instanceof Element) { @@ -650,12 +464,6 @@ function selectorizePath(path) { } return pathSelectors; } -function detectBrowser() { - return { - browser: browserInfo ? browserInfo.name : "", - version: browserInfo ? browserInfo.version : "" - }; -} function buildAttrs(e) { const attributes = {}; const attributeBlackList = ["style"]; @@ -798,7 +606,7 @@ function attachHandlers(config3) { try { defineDetails(config3); Object.keys(events).forEach(function(ev) { - document.addEventListener( + self.addEventListener( ev, function(e) { packageLog(e, events[ev]); @@ -807,7 +615,7 @@ function attachHandlers(config3) { ); }); intervalEvents.forEach(function(ev) { - document.addEventListener( + self.addEventListener( ev, function(e) { packageIntervalLog(e); @@ -818,7 +626,7 @@ function attachHandlers(config3) { Object.keys(bufferedEvents).forEach( function(ev) { bufferBools[ev] = true; - window.addEventListener( + self.addEventListener( ev, function(e) { if (bufferBools[ev]) { @@ -845,7 +653,7 @@ function attachHandlers(config3) { } ); windowEvents.forEach(function(ev) { - window.addEventListener( + self.addEventListener( ev, function(e) { packageLog(e, function() { @@ -863,6 +671,15 @@ function attachHandlers(config3) { // src/utils/auth/index.ts var authCallback = null; +function updateAuthHeader(config3) { + if (authCallback) { + try { + config3.authHeader = authCallback(); + } catch (e) { + console.error(`Error encountered while setting the auth header: ${e}`); + } + } +} function registerAuthCallback(callback) { try { verifyCallback(callback); @@ -882,37 +699,51 @@ function verifyCallback(callback) { } } +// src/utils/headers/index.ts +var headersCallback = null; +function updateCustomHeaders(config3) { + if (headersCallback) { + try { + config3.headers = headersCallback(); + } catch (e) { + console.error(`Error encountered while setting the headers: ${e}`); + } + } +} + // src/sendLogs.ts var sendIntervalId; -var wsock; function initSender(logs3, config3) { if (sendIntervalId) { clearInterval(sendIntervalId); } - wsock = new WebSocket(config3.url); - wsock.onerror = () => { - console.log("no websockets detected"); - }; - wsock.onopen = () => { - console.log("connection established with websockets"); - }; - wsock.onclose = () => { - sendOnClose(logs3, config3); - }; + sendIntervalId = sendOnInterval(logs3, config3); sendOnClose(logs3, config3); } +function sendOnInterval(logs3, config3) { + return setInterval(function() { + if (!config3.on) { + return; + } + if (logs3.length >= config3.logCountThreshold) { + sendLogs(logs3.slice(0), config3, 0); + logs3.splice(0); + } + }, config3.transmitInterval); +} function sendOnClose(logs3, config3) { - window.addEventListener("pagehide", function() { + self.addEventListener("pagehide", function() { if (!config3.on) { return; } if (logs3.length > 0) { - if (config3.isWebSocket()) { + const url = new URL(config3.url); + if (url.protocol === "ws:" || url.protocol === "wss:") { const data = JSON.stringify(logs3); wsock.send(data); } else { const headers = new Headers(); - headers.set("Content-Type", "application/json;charset=UTF-8"); + headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); if (config3.authHeader) { headers.set("Authorization", config3.authHeader.toString()); } @@ -929,20 +760,61 @@ function sendOnClose(logs3, config3) { } }); } +async function sendLogs(logs3, config3, retries) { + const data = JSON.stringify(logs3); + const url = new URL(config3.url); + if (url.protocol === "ws:" || url.protocol === "wss:") { + wsock.send(data); + return; + } + const headers = new Headers({ + "Content-Type": "application/json;charset=UTF-8" + }); + updateAuthHeader(config3); + if (config3.authHeader) { + const authHeaderValue = typeof config3.authHeader === "function" ? config3.authHeader() : config3.authHeader; + headers.set("Authorization", authHeaderValue); + } + updateCustomHeaders(config3); + if (config3.headers) { + for (const [header, value] of Object.entries(config3.headers)) { + headers.set(header, value); + } + } + async function attemptSend(remainingRetries) { + try { + const response = await fetch(config3.url, { + method: "POST", + headers, + body: data + }); + if (!response.ok) { + if (remainingRetries > 0) { + return attemptSend(remainingRetries - 1); + } else { + throw new Error(`Failed to send logs: ${response.statusText}`); + } + } + } catch (error) { + if (remainingRetries > 0) { + return attemptSend(remainingRetries - 1); + } + throw error; + } + } + return attemptSend(retries); +} // src/main.ts var config2 = Configuration.getInstance(); var logs2 = []; var startLoadTimestamp = Date.now(); var endLoadTimestamp; -try { - window.onload = function() { - endLoadTimestamp = Date.now(); - }; -} catch (error) { +self.onload = function() { endLoadTimestamp = Date.now(); -} +}; var started = false; +var wsock; config2.update({ useraleVersion: version }); @@ -957,7 +829,7 @@ function setup(config3) { try { state = document.readyState; } catch (error) { - return; + state = "complete"; } if (config3.autostart && (state === "interactive" || state === "complete")) { attachHandlers(config3); @@ -1013,10 +885,10 @@ export { packageLog, registerAuthCallback, removeCallbacks, - setup, start, started, stop, - version2 as version + version2 as version, + wsock }; //# sourceMappingURL=main.mjs.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/main.mjs.map b/products/userale/packages/flagon-userale/build/main.mjs.map index fcf8d8b..3c5430b 100644 --- a/products/userale/packages/flagon-userale/build/main.mjs.map +++ b/products/userale/packages/flagon-userale/build/main.mjs.map @@ -1 +1 @@ -{"version":3,"sources":["../src/getInitialSettings.ts","../src/configure.ts","../../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (window.sessionStorage.getItem(sessionKey) === null) {\n window.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(window.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n try {\n const settings = getInitialSettings();\n this.update(settings);\n } catch (error) {\n console.log(error);\n }\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n\n /**\n * \n * @return {bool}\n */\n public isWebSocket(): boolean {\n return this.url.startsWith(\"ws://\") || this.url.startsWith(\"wss://\");\n }\n}\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { detect } from \"detect-browser\";\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\nconst browserInfo = detect();\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: window.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: detectBrowser(),\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: window.innerWidth, height: window.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\nexport function detectBrowser() {\n return {\n browser: browserInfo ? browserInfo.name : \"\",\n version: browserInfo ? browserInfo.version : \"\",\n };\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n window.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n window.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\nlet wsock: WebSocket;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n wsock = new WebSocket(config.url);\n wsock.onerror = () => {\n console.log(\"no websockets detected\");\n };\n wsock.onopen = () => {\n console.log(\"connection established with websockets\");\n };\n wsock.onclose = () => {\n sendOnClose(logs, config);\n };\n\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n window.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n if (config.isWebSocket()) {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"application/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\n\n// @todo expose config object to sendLogs replate url with config.url\nexport function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n) {\n const data = JSON.stringify(logs);\n\n if (config.isWebSocket()) {\n wsock.send(data);\n } else {\n const req = new XMLHttpRequest();\n\n req.open(\"POST\", config.url);\n\n // Update headers\n updateAuthHeader(config);\n if (config.authHeader) {\n req.setRequestHeader(\n \"Authorization\",\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader,\n );\n }\n req.setRequestHeader(\"Content-type\", \"application/json;charset=UTF-8\");\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n Object.entries(config.headers).forEach(([header, value]) => {\n req.setRequestHeader(header, value);\n });\n }\n\n req.onreadystatechange = function() {\n if (req.readyState === 4 && req.status !== 200) {\n if (retries > 0) {\n sendLogs(logs, config, retries--);\n }\n }\n };\n\n req.send(data);\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\n\nlet endLoadTimestamp: number;\ntry {\n window.onload = function() {\n endLoadTimestamp = Date.now();\n };\n} catch (error) {\n endLoadTimestamp = Date.now();\n}\n\nexport let started = false;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nexport function setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n return;\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAI,YAA2B;AAC/B,IAAI,gBAA+B;AAO5B,SAAS,qBAAsC;AACpD,MAAI,cAAc,MAAM;AACtB,gBAAY;AAAA,MACV;AAAA,MACA,aAAa,OAAO,KAAK,IAAI,CAAC;AAAA,IAChC;AAAA,EACF;AAEA,MAAI,kBAAkB,MAAM;AAC1B,oBAAgB;AAAA,MACd;AAAA,MACA,sBAAsB;AAAA,IACxB;AAAA,EACF;AAEA,QAAM,SACJ,SAAS,iBACR,WAAY;AACX,UAAM,UAAU,SAAS,qBAAqB,QAAQ;AACtD,WAAO,QAAQ,QAAQ,SAAS;AAAA,EAClC,EAAG;AAEL,QAAM,MAAM,SACR,OAAO,aAAa,KAAK,MAAM,IAC/B,WAAY;AACV,WAAO;AAAA,EACT;AACJ,QAAM,UAAU,IAAI,cAAc;AAClC,QAAM,WAA4B;AAAA,IAChC,YAAY,IAAI,WAAW,KAAK;AA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ACF,GAAG,GAAG;AAAA,EACR;AACF;AAGO,IAAME,WAAU;AAMhB,SAAS,QAAc;AAC5B,MAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;","names":["BrowserInfo","version","NodeInfo","version","SearchBotDeviceInfo","version","BotInfo","ReactNativeInfo","version","descriptors","log","config","options","logs","config","logs","config","config","logs","version"]} \ No newline at end of file +{"version":3,"sources":["../src/getInitialSettings.ts","../src/configure.ts","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n // pageTitle: document.title,\n // pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAI,YAA2B;AAC/B,IAAI,gBAA+B;AAO5B,SAAS,qBAAsC;AAEpD,MAAI,OAAO,sBAAsB,eAC/B,gBAAgB,mBAAmB;AACjC,UAAMA,YAA4B;AAAA,MAChC,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,kBAAkB;AAAA,MAClB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA,MAAM,CAAC,OAAiB,OAAO,SAAY,KAAK,KAAK,IAAI;AAAA,MACzD,UAAU;AAAA,MACV,aAAa;AAAA,MACb,kBAAkB;AAAA,MAClB,KAAK;AAAA,MACL,gBAAgB;AAAA,MAChB,gBAAgB;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AM;AACvB,kBAAUA,QAAO,KAAK;AACtB;AAAA,UACE;AAAA,YACE,MAAM;AAAA,YACN,SAAS,EAAE,cAAc,mBAAmB,mBAAmB;AAAA,UACjE;AAAA,UACA,OAAO,CAAC;AAAA,UACR;AAAA,QACF;AAAA,MACF,OAAO;AACL,cAAMA,OAAM;AAAA,MACd;AAAA,IACF,GAAG,GAAG;AAAA,EACR;AACF;AAGO,IAAME,WAAU;AAMhB,SAAS,QAAc;AAC5B,MAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;","names":["settings","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/src/attachHandlers.ts b/products/userale/packages/flagon-userale/src/attachHandlers.ts index 36975fb..18cc2cf 100644 --- a/products/userale/packages/flagon-userale/src/attachHandlers.ts +++ b/products/userale/packages/flagon-userale/src/attachHandlers.ts @@ -201,7 +201,7 @@ export function attachHandlers(config: Configuration): boolean { defineDetails(config); (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) { - document.addEventListener( + self.addEventListener( ev, function (e) { packageLog(e, events[ev]); @@ -211,7 +211,7 @@ export function attachHandlers(config: Configuration): boolean { }); intervalEvents.forEach(function (ev) { - document.addEventListener( + self.addEventListener( ev, function (e) { packageIntervalLog(e); @@ -224,7 +224,7 @@ export function attachHandlers(config: Configuration): boolean { function (ev) { bufferBools[ev] = true; - window.addEventListener( + self.addEventListener( ev, function (e) { if (bufferBools[ev]) { @@ -253,7 +253,7 @@ export function attachHandlers(config: Configuration): boolean { ); windowEvents.forEach(function (ev) { - window.addEventListener( + self.addEventListener( ev, function (e) { packageLog(e, function () { diff --git a/products/userale/packages/flagon-userale/src/getInitialSettings.ts b/products/userale/packages/flagon-userale/src/getInitialSettings.ts index 46f7844..ed8b758 100644 --- a/products/userale/packages/flagon-userale/src/getInitialSettings.ts +++ b/products/userale/packages/flagon-userale/src/getInitialSettings.ts @@ -26,19 +26,46 @@ let httpSessionId: string | null = null; * @return {Object} The extracted configuration object */ export function getInitialSettings(): Settings.Config { - if (sessionId === null) { - sessionId = getsessionId( - "userAlesessionId", - "session_" + String(Date.now()), - ); - } - if (httpSessionId === null) { - httpSessionId = getsessionId( - "userAleHttpSessionId", - generatehttpSessionId(), - ); - } + if (typeof WorkerGlobalScope !== "undefined" && + self instanceof WorkerGlobalScope) { + const settings: Settings.Config = { + authHeader: null, + autostart: true, + browserSessionId: null, + custIndex: null, + headers: null, + httpSessionId: null, + logCountThreshold: +(5), + logDetails: false, + resolution: +(500), + sessionId: sessionId, + time: (ts?: number) => (ts !== undefined ? ts : Date.now()), + toolName: null, + toolVersion: null, + transmitInterval: +(5000), + url: "http://localhost:8000", + useraleVersion: null, + userFromParams: null, + userId: null, + }; + return settings; + } + + if (sessionId === null) { + sessionId = getsessionId( + "userAlesessionId", + "session_" + String(Date.now()), + ); + } + + if (httpSessionId === null) { + httpSessionId = getsessionId( + "userAleHttpSessionId", + generatehttpSessionId(), + ); + } + const script = document.currentScript || @@ -83,12 +110,12 @@ export function getInitialSettings(): Settings.Config { * */ export function getsessionId(sessionKey: string, value: any) { - if (window.sessionStorage.getItem(sessionKey) === null) { - window.sessionStorage.setItem(sessionKey, JSON.stringify(value)); + if (self.sessionStorage.getItem(sessionKey) === null) { + self.sessionStorage.setItem(sessionKey, JSON.stringify(value)); return value; } - return JSON.parse(window.sessionStorage.getItem(sessionKey) || ""); + return JSON.parse(self.sessionStorage.getItem(sessionKey) || ""); } /** diff --git a/products/userale/packages/flagon-userale/src/main.ts b/products/userale/packages/flagon-userale/src/main.ts index 9f75c21..45336f4 100644 --- a/products/userale/packages/flagon-userale/src/main.ts +++ b/products/userale/packages/flagon-userale/src/main.ts @@ -19,7 +19,7 @@ import { version as userAleVersion } from "../package.json"; import { Configuration } from "@/configure"; import { attachHandlers } from "@/attachHandlers"; import { initPackager, packageCustomLog } from "@/packageLogs"; -import { initSender, sendOnClose } from "@/sendLogs"; +import { initSender } from "@/sendLogs"; import type { Settings, Logging } from "@/types"; @@ -28,13 +28,9 @@ const logs: Array = []; const startLoadTimestamp = Date.now(); let endLoadTimestamp: number; -try { - window.onload = function() { - endLoadTimestamp = Date.now(); - }; -} catch (error) { +self.onload = function() { endLoadTimestamp = Date.now(); -} +}; export let started = false; export let wsock: WebSocket; @@ -53,7 +49,6 @@ config.update({ useraleVersion: userAleVersion, }); initPackager(logs, config); -// getWebsocketsEnabled(config); if (config.autostart) { setup(config); } @@ -70,7 +65,8 @@ function setup(config: Configuration) { try { state = document.readyState; } catch (error) { - initSender(logs, config); + // Assume there is no DOM and this is a web worker context + state = "complete"; } if ( @@ -95,24 +91,6 @@ function setup(config: Configuration) { } } -/** - * Checks to see if the specified backend URL supporsts Websockets - * and updates the config accordingly - */ -function getWebsocketsEnabled(config: Configuration) { - wsock = new WebSocket(config.url.replace("http://", "ws://")); - wsock.onerror = () => { - console.log("no websockets detected"); - }; - wsock.onopen = () => { - console.log("connection established with websockets"); - config.websocketsEnabled = true; - }; - wsock.onclose = () => { - sendOnClose(logs, config); - }; -} - // Export the Userale API export const version = userAleVersion; diff --git a/products/userale/packages/flagon-userale/src/packageLogs.ts b/products/userale/packages/flagon-userale/src/packageLogs.ts index 2cb0cbe..10da80f 100644 --- a/products/userale/packages/flagon-userale/src/packageLogs.ts +++ b/products/userale/packages/flagon-userale/src/packageLogs.ts @@ -15,10 +15,8 @@ * limitations under the License. */ -import { detect } from "detect-browser"; import { Callbacks, Logging } from "@/types"; import { Configuration } from "@/configure"; -const browserInfo = detect(); export let logs: Array; let config: Configuration; @@ -119,10 +117,10 @@ export function packageLog( let log: Logging.Log = { target: e.target ? getSelector(e.target) : null, path: buildPath(e), - pageUrl: window.location.href, + pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: detectBrowser(), + browser: self.navigator.userAgent, clientTime: timeFields.milli, microTime: timeFields.micro, location: getLocation(e), @@ -191,10 +189,10 @@ export function packageCustomLog( } const metaData = { - pageUrl: window.location.href, - pageTitle: document.title, - pageReferrer: document.referrer, - browser: detectBrowser(), + pageUrl: self.location.href, + // pageTitle: document.title, + // pageReferrer: document.referrer, + browser: self.navigator.userAgent, clientTime: Date.now(), scrnRes: getScreenRes(), logType: "custom", @@ -276,10 +274,10 @@ export function packageIntervalLog(e: Event) { intervalLog = { target: intervalId, path: intervalPath, - pageUrl: window.location.href, + pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: detectBrowser(), + browser: self.navigator.userAgent, count: intervalCounter, duration: timestamp - intervalTimer, // microseconds startTime: intervalTimer, @@ -362,7 +360,7 @@ export function getLocation(e: Event) { * @return {Object} An object containing the innerWidth and InnerHeight */ export function getScreenRes() { - return { width: window.innerWidth, height: window.innerHeight }; + return { width: self.innerWidth, height: self.innerHeight }; } /** @@ -420,13 +418,6 @@ export function selectorizePath(path: EventTarget[]) { return pathSelectors; } -export function detectBrowser() { - return { - browser: browserInfo ? browserInfo.name : "", - version: browserInfo ? browserInfo.version : "", - }; -} - /** * Builds an object containing attributes of an element. * Attempts to parse all attribute values as JSON text. diff --git a/products/userale/packages/flagon-userale/src/sendLogs.ts b/products/userale/packages/flagon-userale/src/sendLogs.ts index 2c9e6fc..0456e0e 100644 --- a/products/userale/packages/flagon-userale/src/sendLogs.ts +++ b/products/userale/packages/flagon-userale/src/sendLogs.ts @@ -68,13 +68,15 @@ export function sendOnClose( logs: Array, config: Configuration, ): void { - window.addEventListener("pagehide", function() { + self.addEventListener("pagehide", function() { if (!config.on) { return; } if (logs.length > 0) { - if (config.websocketsEnabled) { + const url = new URL(config.url); + + if (url.protocol === "ws:" || url.protocol === "wss:") { const data = JSON.stringify(logs); wsock.send(data); } else { @@ -106,51 +108,64 @@ export function sendOnClose( * @param {Configuration} config configuration singleton. * @param {Number} retries Maximum number of attempts to send the logs. */ - -// @todo expose config object to sendLogs replate url with config.url -export function sendLogs( +export async function sendLogs( logs: Array, config: Configuration, retries: number, -) { +): Promise { const data = JSON.stringify(logs); + const url = new URL(config.url); - if (config.websocketsEnabled) { + if (url.protocol === "ws:" || url.protocol === "wss:") { wsock.send(data); - } else { - const req = new XMLHttpRequest(); - - req.open("POST", config.url); - - // Update headers - updateAuthHeader(config); - if (config.authHeader) { - req.setRequestHeader( - "Authorization", - typeof config.authHeader === "function" - ? config.authHeader() - : config.authHeader, - ); + return; + } + + // Build headers + const headers = new Headers({ + "Content-Type": "application/json;charset=UTF-8", + }); + + updateAuthHeader(config); + if (config.authHeader) { + const authHeaderValue = + typeof config.authHeader === "function" + ? config.authHeader() + : config.authHeader; + headers.set("Authorization", authHeaderValue); + } + + // Update custom headers last to allow them to over-write the defaults. This assumes + // the user knows what they are doing and may want to over-write the defaults. + updateCustomHeaders(config); + if (config.headers) { + for (const [header, value] of Object.entries(config.headers)) { + headers.set(header, value); } - req.setRequestHeader("Content-type", "application/json;charset=UTF-8"); - - // Update custom headers last to allow them to over-write the defaults. This assumes - // the user knows what they are doing and may want to over-write the defaults. - updateCustomHeaders(config); - if (config.headers) { - Object.entries(config.headers).forEach(([header, value]) => { - req.setRequestHeader(header, value); + } + + async function attemptSend(remainingRetries: number): Promise { + try { + const response = await fetch(config.url, { + method: "POST", + headers, + body: data, }); - } - req.onreadystatechange = function() { - if (req.readyState === 4 && req.status !== 200) { - if (retries > 0) { - sendLogs(logs, config, retries--); + if (!response.ok) { + if (remainingRetries > 0) { + return attemptSend(remainingRetries - 1); + } else { + throw new Error(`Failed to send logs: ${response.statusText}`); } } - }; - - req.send(data); + } catch (error) { + if (remainingRetries > 0) { + return attemptSend(remainingRetries - 1); + } + throw error; + } } + + return attemptSend(retries); } diff --git a/products/userale/packages/flagon-userale/tsconfig.json b/products/userale/packages/flagon-userale/tsconfig.json index 129b7b2..12d6a32 100644 --- a/products/userale/packages/flagon-userale/tsconfig.json +++ b/products/userale/packages/flagon-userale/tsconfig.json @@ -13,12 +13,14 @@ "isolatedModules": true, "jsx": "preserve", "lib": [ + "ES2021", + "WebWorker", "dom", "dom.iterable", "esnext" ], "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "bundler", "noEmit": true, "noFallthroughCasesInSwitch": true, "noImplicitReturns": false, @@ -34,7 +36,7 @@ "skipLibCheck": true, "sourceMap": true, "strict": true, - "target": "es2015", + "target": "ES2021", "typeRoots": [ "node_modules/@types/" ], diff --git a/products/userale/packages/flagon-userale/tsup.config.js b/products/userale/packages/flagon-userale/tsup.config.js index 7e734de..5bed426 100644 --- a/products/userale/packages/flagon-userale/tsup.config.js +++ b/products/userale/packages/flagon-userale/tsup.config.js @@ -4,7 +4,7 @@ export default defineConfig([ { tsconfig: './tsconfig.json', entry: ['src/main.ts'], - outDir: 'build/esm', + outDir: 'build', format: ['esm'], name: 'userale', target: 'es2021', From 3e295859f40bb70c8daa54db25a387ff09808a2f Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 23 May 2025 16:36:03 -0700 Subject: [PATCH 08/20] Fix load logs --- .../src/background/messages/config_change.ts | 3 --- .../src/background/ports/log.ts | 1 - .../packages/flagon-userale/build/main.mjs | 20 +++++++++++-------- .../flagon-userale/build/main.mjs.map | 2 +- .../packages/flagon-userale/src/main.ts | 18 +++++++++-------- .../flagon-userale/src/packageLogs.ts | 4 ++-- 6 files changed, 25 insertions(+), 23 deletions(-) diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts index 8ee0bf4..f895ab4 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts @@ -9,14 +9,11 @@ const handler: PlasmoMessaging.MessageHandler = async (req, res) => { } export function setOptions(options: StoredOptions) { - console.log(options); userale.options({url: options.loggingUrl}); allowListRegExp = new RegExp(options.allowList); } export function getAllowListRegExp() { - console.log("getAllowListRegExp"); - console.log(allowListRegExp); return allowListRegExp; } diff --git a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts index 6e0fe6f..b86596f 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts @@ -6,7 +6,6 @@ const handler: PlasmoMessaging.PortHandler = async (req, res) => { let log = req.body log.browserSessionId = browserSessionId; let allowListRegExp = getAllowListRegExp(); - console.log(allowListRegExp); if (allowListRegExp.test(log.pageUrl)) { userale.log(log); } diff --git a/products/userale/packages/flagon-userale/build/main.mjs b/products/userale/packages/flagon-userale/build/main.mjs index 8e511bc..b944a2d 100644 --- a/products/userale/packages/flagon-userale/build/main.mjs +++ b/products/userale/packages/flagon-userale/build/main.mjs @@ -310,6 +310,8 @@ function packageCustomLog(customLog, detailFcn, userAction) { } const metaData = { pageUrl: self.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, browser: self.navigator.userAgent, clientTime: Date.now(), scrnRes: getScreenRes(), @@ -835,14 +837,16 @@ function setup(config3) { attachHandlers(config3); initSender(logs2, config3); started = config3.on = true; - packageCustomLog( - { - type: "load", - details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp } - }, - () => ({}), - false - ); + if (typeof window !== "undefined" && typeof document !== "undefined") { + packageCustomLog( + { + type: "load", + details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp } + }, + () => ({}), + false + ); + } } else { setup(config3); } diff --git a/products/userale/packages/flagon-userale/build/main.mjs.map b/products/userale/packages/flagon-userale/build/main.mjs.map index 3c5430b..08fdcea 100644 --- a/products/userale/packages/flagon-userale/build/main.mjs.map +++ b/products/userale/packages/flagon-userale/build/main.mjs.map @@ -1 +1 @@ -{"version":3,"sources":["../src/getInitialSettings.ts","../src/configure.ts","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n // pageTitle: document.title,\n // pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAI,YAA2B;AAC/B,IAAI,gBAA+B;AAO5B,SAAS,qBAAsC;AAEpD,MAAI,OAAO,sBAAsB,eAC/B,gBAAgB,mBAAmB;AACjC,UAAMA,YAA4B;AAAA,MAChC,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,kBAAkB;AAAA,MAClB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA,MAAM,CAAC,OAAiB,OAAO,SAAY,KAAK,KAAK,IAAI;AAAA,MACzD,UAAU;AAAA,MACV,aAAa;AAAA,MACb,kBAAkB;AAAA,MAClB,KAAK;AAAA,MACL,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,QAAQ;AAAA,IACV;AACA,WAAOA;AAAA,EACT;AAEA,MAAI,cAAc,MAAM;AACtB,gBAAY;AAAA,MACV;AAAA,MACA,aAAa,OAAO,KAAK,IAAI,CAAC;AAAA,IAChC;AAAA,EACF;AAEA,MAAI,kBAAkB,MAAM;AAC1B,oBAAgB;AAAA,MACd;AAAA,MACA,sBAAsB;AAAA,IACxB;AAAA,EACF;AAGF,QAAM,SACJ,SAAS,iBACR,WAAY;AACX,UAAM,UAAU,SAAS,qBAAqB,QAAQ;AACtD,WAAO,QAAQ,QAAQ,SAAS;AAAA,EAClC,EAAG;AAEL,QAAM,MAAM,SACR,OAAO,aAAa,KAAK,MAAM,IAC/B,WAAY;AACV,WAAO;AAAA,EACT;A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;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;","names":["settings","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file +{"version":3,"sources":["../src/getInitialSettings.ts","../src/configure.ts","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if(typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAI,YAA2B;AAC/B,IAAI,gBAA+B;AAO5B,SAAS,qBAAsC;AAEpD,MAAI,OAAO,sBAAsB,eAC/B,gBAAgB,mBAAmB;AACjC,UAAMA,YAA4B;AAAA,MAChC,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,kBAAkB;AAAA,MAClB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA,MAAM,CAAC,OAAiB,OAAO,SAAY,KAAK,KAAK,IAAI;AAAA,MACzD,UAAU;AAAA,MACV,aAAa;AAAA,MACb,kBAAkB;AAAA,MAClB,KAAK;AAAA,MACL,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,QAAQ;AAAA,IACV;AACA,WAAOA;AAAA,EACT;AAEA,MAAI,cAAc,MAAM;AACtB,gBAAY;AAAA,MACV;AAAA,MACA,aAAa,OAAO,KAAK,IAAI,CAAC;AAAA,IAChC;AAAA,EACF;AAEA,MAAI,kBAAkB,MAAM;AAC1B,oBAAgB;AAAA,MACd;AAAA,MACA,sBAAsB;AAAA,IACxB;AAAA,EACF;AAGF,QAA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F;AAAA,MACF,OAAO;AACL,cAAMA,OAAM;AAAA,MACd;AAAA,IACF,GAAG,GAAG;AAAA,EACR;AACF;AAGO,IAAME,WAAU;AAMhB,SAAS,QAAc;AAC5B,MAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;","names":["settings","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/src/main.ts b/products/userale/packages/flagon-userale/src/main.ts index 45336f4..9019694 100644 --- a/products/userale/packages/flagon-userale/src/main.ts +++ b/products/userale/packages/flagon-userale/src/main.ts @@ -76,14 +76,16 @@ function setup(config: Configuration) { attachHandlers(config); initSender(logs, config); started = config.on = true; - packageCustomLog( - { - type: "load", - details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp }, - }, - () => ({}), - false, - ); + if(typeof window !== "undefined" && typeof document !== "undefined") { + packageCustomLog( + { + type: "load", + details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp }, + }, + () => ({}), + false, + ); + } } else { setup(config); } diff --git a/products/userale/packages/flagon-userale/src/packageLogs.ts b/products/userale/packages/flagon-userale/src/packageLogs.ts index 10da80f..284916c 100644 --- a/products/userale/packages/flagon-userale/src/packageLogs.ts +++ b/products/userale/packages/flagon-userale/src/packageLogs.ts @@ -190,8 +190,8 @@ export function packageCustomLog( const metaData = { pageUrl: self.location.href, - // pageTitle: document.title, - // pageReferrer: document.referrer, + pageTitle: document.title, + pageReferrer: document.referrer, browser: self.navigator.userAgent, clientTime: Date.now(), scrnRes: getScreenRes(), From 5a39beb6a3c4bc52ba5d23bf527cdddc2114902d Mon Sep 17 00:00:00 2001 From: Jason Young Date: Tue, 27 May 2025 13:28:42 -0700 Subject: [PATCH 09/20] Add iife build format --- .../flagon-userale/build/main.global.js | 884 ++++++++++++++++++ .../flagon-userale/build/main.global.js.map | 1 + .../example/log-label-example/index.html | 2 +- .../packages/flagon-userale/tsup.config.js | 2 +- 4 files changed, 887 insertions(+), 2 deletions(-) create mode 100644 products/userale/packages/flagon-userale/build/main.global.js create mode 100644 products/userale/packages/flagon-userale/build/main.global.js.map diff --git a/products/userale/packages/flagon-userale/build/main.global.js b/products/userale/packages/flagon-userale/build/main.global.js new file mode 100644 index 0000000..6ea422b --- /dev/null +++ b/products/userale/packages/flagon-userale/build/main.global.js @@ -0,0 +1,884 @@ +"use strict"; +/* Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.*/ +(() => { + // package.json + var version = "2.4.0"; + + // src/getInitialSettings.ts + var sessionId = null; + var httpSessionId = null; + function getInitialSettings() { + if (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) { + const settings2 = { + authHeader: null, + autostart: true, + browserSessionId: null, + custIndex: null, + headers: null, + httpSessionId: null, + logCountThreshold: 5, + logDetails: false, + resolution: 500, + sessionId, + time: (ts) => ts !== void 0 ? ts : Date.now(), + toolName: null, + toolVersion: null, + transmitInterval: 5e3, + url: "http://localhost:8000", + useraleVersion: null, + userFromParams: null, + userId: null + }; + return settings2; + } + if (sessionId === null) { + sessionId = getsessionId( + "userAlesessionId", + "session_" + String(Date.now()) + ); + } + if (httpSessionId === null) { + httpSessionId = getsessionId( + "userAleHttpSessionId", + generatehttpSessionId() + ); + } + const script = document.currentScript || function() { + const scripts = document.getElementsByTagName("script"); + return scripts[scripts.length - 1]; + }(); + const get = script ? script.getAttribute.bind(script) : function() { + return null; + }; + const headers = get("data-headers"); + const settings = { + authHeader: get("data-auth") || null, + autostart: get("data-autostart") === "false" ? false : true, + browserSessionId: null, + custIndex: get("data-index") || null, + headers: headers ? JSON.parse(headers) : null, + httpSessionId, + logCountThreshold: +(get("data-threshold") || 5), + logDetails: get("data-log-details") === "true" ? true : false, + resolution: +(get("data-resolution") || 500), + sessionId: get("data-session") || sessionId, + time: timeStampScale(document.createEvent("CustomEvent")), + toolName: get("data-tool") || null, + toolVersion: get("data-version") || null, + transmitInterval: +(get("data-interval") || 5e3), + url: get("data-url") || "http://localhost:8000", + useraleVersion: get("data-userale-version") || null, + userFromParams: get("data-user-from-params") || null, + userId: get("data-user") || null + }; + return settings; + } + function getsessionId(sessionKey, value) { + if (self.sessionStorage.getItem(sessionKey) === null) { + self.sessionStorage.setItem(sessionKey, JSON.stringify(value)); + return value; + } + return JSON.parse(self.sessionStorage.getItem(sessionKey) || ""); + } + function timeStampScale(e) { + let tsScaler; + if (e.timeStamp && e.timeStamp > 0) { + const delta = Date.now() - e.timeStamp; + if (delta < 0) { + tsScaler = function() { + return e.timeStamp / 1e3; + }; + } else if (delta > e.timeStamp) { + const navStart = performance.timeOrigin; + tsScaler = function(ts) { + return ts + navStart; + }; + } else { + tsScaler = function(ts) { + return ts; + }; + } + } else { + tsScaler = function() { + return Date.now(); + }; + } + return tsScaler; + } + function generatehttpSessionId() { + const len = 32; + const arr = new Uint8Array(len / 2); + window.crypto.getRandomValues(arr); + return Array.from(arr, (dec) => { + return dec.toString(16).padStart(2, "0"); + }).join(""); + } + + // src/configure.ts + var _Configuration = class { + constructor() { + this.autostart = false; + this.authHeader = null; + this.browserSessionId = null; + this.custIndex = null; + this.headers = null; + this.httpSessionId = null; + this.logCountThreshold = 0; + this.logDetails = false; + this.on = false; + this.resolution = 0; + this.sessionId = null; + this.time = () => Date.now(); + this.toolName = null; + this.toolVersion = null; + this.transmitInterval = 0; + this.url = ""; + this.userFromParams = null; + this.useraleVersion = null; + this.userId = null; + this.version = null; + this.websocketsEnabled = false; + if (_Configuration.instance === null) { + this.initialize(); + } + } + static getInstance() { + if (_Configuration.instance === null) { + _Configuration.instance = new _Configuration(); + } + return _Configuration.instance; + } + initialize() { + const settings = getInitialSettings(); + this.update(settings); + } + reset() { + this.initialize(); + } + update(newConfig) { + Object.keys(newConfig).forEach((option) => { + if (option === "userFromParams") { + const userParamString = newConfig[option]; + const userId = userParamString ? _Configuration.getUserIdFromParams(userParamString) : null; + if (userId) { + this["userId"] = userId; + } + } + const hasNewUserFromParams = newConfig["userFromParams"]; + const willNullifyUserId = option === "userId" && newConfig[option] === null; + if (willNullifyUserId && hasNewUserFromParams) { + return; + } + const newOption = newConfig[option]; + if (newOption !== void 0) { + this[option] = newOption; + } + }); + } + static getUserIdFromParams(param) { + const userField = param; + const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); + const results = window.location.href.match(regex); + if (results && results[2]) { + return decodeURIComponent(results[2].replace(/\+/g, " ")); + } + return null; + } + }; + var Configuration = _Configuration; + Configuration.instance = null; + + // src/packageLogs.ts + var logs; + var config; + var intervalId; + var intervalType; + var intervalPath; + var intervalTimer; + var intervalCounter; + var intervalLog; + var filterHandler = null; + var mapHandler = null; + var cbHandlers = {}; + function addCallbacks(...newCallbacks) { + newCallbacks.forEach((source) => { + let descriptors = {}; + descriptors = Object.keys(source).reduce((descriptors2, key) => { + descriptors2[key] = Object.getOwnPropertyDescriptor(source, key); + return descriptors2; + }, descriptors); + Object.getOwnPropertySymbols(source).forEach((sym) => { + const descriptor = Object.getOwnPropertyDescriptor(source, sym); + if (descriptor?.enumerable) { + descriptors[sym] = descriptor; + } + }); + Object.defineProperties(cbHandlers, descriptors); + }); + return cbHandlers; + } + function removeCallbacks(targetKeys) { + targetKeys.forEach((key) => { + if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) { + delete cbHandlers[key]; + } + }); + } + function initPackager(newLogs, newConfig) { + logs = newLogs; + config = newConfig; + cbHandlers = {}; + intervalId = null; + intervalType = null; + intervalPath = null; + intervalTimer = null; + intervalCounter = 0; + intervalLog = null; + } + function packageLog(e, detailFcn) { + if (!config.on) { + return false; + } + let details = null; + if (detailFcn) { + details = detailFcn(e); + } + const timeFields = extractTimeFields( + e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now() + ); + let log2 = { + target: e.target ? getSelector(e.target) : null, + path: buildPath(e), + pageUrl: self.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, + browser: self.navigator.userAgent, + clientTime: timeFields.milli, + microTime: timeFields.micro, + location: getLocation(e), + scrnRes: getScreenRes(), + type: e.type, + logType: "raw", + userAction: true, + details, + userId: config.userId, + toolVersion: config.toolVersion, + toolName: config.toolName, + useraleVersion: config.useraleVersion, + sessionId: config.sessionId, + httpSessionId: config.httpSessionId, + browserSessionId: config.browserSessionId, + attributes: buildAttrs(e), + style: buildCSS(e) + }; + if (typeof filterHandler === "function" && !filterHandler(log2)) { + return false; + } + if (typeof mapHandler === "function") { + log2 = mapHandler(log2, e); + } + for (const func of Object.values(cbHandlers)) { + if (typeof func === "function") { + log2 = func(log2, e); + if (!log2) { + return false; + } + } + } + logs.push(log2); + return true; + } + function packageCustomLog(customLog, detailFcn, userAction) { + if (!config.on) { + return false; + } + let details = null; + if (detailFcn.length === 0) { + const staticDetailFcn = detailFcn; + details = staticDetailFcn(); + } + const metaData = { + pageUrl: self.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, + browser: self.navigator.userAgent, + clientTime: Date.now(), + scrnRes: getScreenRes(), + logType: "custom", + userAction, + details, + userId: config.userId, + toolVersion: config.toolVersion, + toolName: config.toolName, + useraleVersion: config.useraleVersion, + sessionId: config.sessionId, + httpSessionId: config.httpSessionId, + browserSessionId: config.browserSessionId + }; + let log2 = Object.assign(metaData, customLog); + if (typeof filterHandler === "function" && !filterHandler(log2)) { + return false; + } + if (typeof mapHandler === "function") { + log2 = mapHandler(log2); + } + for (const func of Object.values(cbHandlers)) { + if (typeof func === "function") { + log2 = func(log2, null); + if (!log2) { + return false; + } + } + } + logs.push(log2); + return true; + } + function extractTimeFields(timeStamp) { + return { + milli: Math.floor(timeStamp), + micro: Number((timeStamp % 1).toFixed(3)) + }; + } + function packageIntervalLog(e) { + try { + const target = e.target ? getSelector(e.target) : null; + const path = buildPath(e); + const type = e.type; + const timestamp = Math.floor( + e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now() + ); + if (intervalId == null) { + intervalId = target; + intervalType = type; + intervalPath = path; + intervalTimer = timestamp; + intervalCounter = 0; + } + if ((intervalId !== target || intervalType !== type) && intervalTimer) { + intervalLog = { + target: intervalId, + path: intervalPath, + pageUrl: self.location.href, + pageTitle: document.title, + pageReferrer: document.referrer, + browser: self.navigator.userAgent, + count: intervalCounter, + duration: timestamp - intervalTimer, + startTime: intervalTimer, + endTime: timestamp, + type: intervalType, + logType: "interval", + targetChange: intervalId !== target, + typeChange: intervalType !== type, + userAction: false, + userId: config.userId, + toolVersion: config.toolVersion, + toolName: config.toolName, + useraleVersion: config.useraleVersion, + sessionId: config.sessionId, + httpSessionId: config.httpSessionId, + browserSessionId: config.browserSessionId + }; + if (typeof filterHandler === "function" && !filterHandler(intervalLog)) { + return false; + } + if (typeof mapHandler === "function") { + intervalLog = mapHandler(intervalLog, e); + } + for (const func of Object.values(cbHandlers)) { + if (typeof func === "function") { + intervalLog = func(intervalLog, null); + if (!intervalLog) { + return false; + } + } + } + if (intervalLog) + logs.push(intervalLog); + intervalId = target; + intervalType = type; + intervalPath = path; + intervalTimer = timestamp; + intervalCounter = 0; + } + if (intervalId == target && intervalType == type && intervalCounter) { + intervalCounter = intervalCounter + 1; + } + return true; + } catch { + return false; + } + } + function getLocation(e) { + if (e instanceof MouseEvent) { + if (e.pageX != null) { + return { x: e.pageX, y: e.pageY }; + } else if (e.clientX != null) { + return { + x: document.documentElement.scrollLeft + e.clientX, + y: document.documentElement.scrollTop + e.clientY + }; + } + } else { + return { x: null, y: null }; + } + } + function getScreenRes() { + return { width: self.innerWidth, height: self.innerHeight }; + } + function getSelector(ele) { + if (ele instanceof HTMLElement || ele instanceof Element) { + if (ele.localName) { + return ele.localName + (ele.id ? "#" + ele.id : "") + (ele.className ? "." + ele.className : ""); + } else if (ele.nodeName) { + return ele.nodeName + (ele.id ? "#" + ele.id : "") + (ele.className ? "." + ele.className : ""); + } + } else if (ele instanceof Document) { + return "#document"; + } else if (ele === globalThis) { + return "Window"; + } + return "Unknown"; + } + function buildPath(e) { + const path = e.composedPath(); + return selectorizePath(path); + } + function selectorizePath(path) { + let i = 0; + let pathEle; + const pathSelectors = []; + while (pathEle = path[i]) { + pathSelectors.push(getSelector(pathEle)); + ++i; + pathEle = path[i]; + } + return pathSelectors; + } + function buildAttrs(e) { + const attributes = {}; + const attributeBlackList = ["style"]; + if (e.target && e.target instanceof Element) { + for (const attr of e.target.attributes) { + if (attributeBlackList.includes(attr.name)) + continue; + let val = attr.value; + try { + val = JSON.parse(val); + } catch (error) { + } + attributes[attr.name] = val; + } + } + return attributes; + } + function buildCSS(e) { + const properties = {}; + if (e.target && e.target instanceof HTMLElement) { + const styleObj = e.target.style; + for (let i = 0; i < styleObj.length; i++) { + const prop = styleObj[i]; + properties[prop] = styleObj.getPropertyValue(prop); + } + } + return properties; + } + + // src/attachHandlers.ts + var events; + var bufferBools; + var bufferedEvents; + var refreshEvents; + var intervalEvents = [ + "click", + "focus", + "blur", + "input", + "change", + "mouseover", + "submit" + ]; + var windowEvents = ["load", "blur", "focus"]; + function extractMouseDetails(e) { + return { + clicks: e.detail, + ctrl: e.ctrlKey, + alt: e.altKey, + shift: e.shiftKey, + meta: e.metaKey + }; + } + function extractKeyboardDetails(e) { + return { + key: e.key, + code: e.code, + ctrl: e.ctrlKey, + alt: e.altKey, + shift: e.shiftKey, + meta: e.metaKey + }; + } + function extractChangeDetails(e) { + return { + value: e.target.value + }; + } + function extractWheelDetails(e) { + return { + x: e.deltaX, + y: e.deltaY, + z: e.deltaZ + }; + } + function extractScrollDetails() { + return { + x: window.scrollX, + y: window.scrollY + }; + } + function extractResizeDetails() { + return { + width: window.outerWidth, + height: window.outerHeight + }; + } + function defineDetails(config3) { + events = { + click: extractMouseDetails, + dblclick: extractMouseDetails, + mousedown: extractMouseDetails, + mouseup: extractMouseDetails, + focus: null, + blur: null, + input: config3.logDetails ? extractKeyboardDetails : null, + change: config3.logDetails ? extractChangeDetails : null, + dragstart: null, + dragend: null, + drag: null, + drop: null, + keydown: config3.logDetails ? extractKeyboardDetails : null, + mouseover: null + }; + bufferBools = {}; + bufferedEvents = { + wheel: extractWheelDetails, + scroll: extractScrollDetails, + resize: extractResizeDetails + }; + refreshEvents = { + submit: null + }; + } + function defineCustomDetails(options2, type) { + const eventType = { + click: extractMouseDetails, + dblclick: extractMouseDetails, + mousedown: extractMouseDetails, + mouseup: extractMouseDetails, + focus: null, + blur: null, + load: null, + input: options2.logDetails ? extractKeyboardDetails : null, + change: options2.logDetails ? extractChangeDetails : null, + dragstart: null, + dragend: null, + drag: null, + drop: null, + keydown: options2.logDetails ? extractKeyboardDetails : null, + mouseover: null, + wheel: extractWheelDetails, + scroll: extractScrollDetails, + resize: extractResizeDetails, + submit: null + }; + return eventType[type]; + } + function attachHandlers(config3) { + try { + defineDetails(config3); + Object.keys(events).forEach(function(ev) { + self.addEventListener( + ev, + function(e) { + packageLog(e, events[ev]); + }, + true + ); + }); + intervalEvents.forEach(function(ev) { + self.addEventListener( + ev, + function(e) { + packageIntervalLog(e); + }, + true + ); + }); + Object.keys(bufferedEvents).forEach( + function(ev) { + bufferBools[ev] = true; + self.addEventListener( + ev, + function(e) { + if (bufferBools[ev]) { + bufferBools[ev] = false; + packageLog(e, bufferedEvents[ev]); + setTimeout(function() { + bufferBools[ev] = true; + }, config3.resolution); + } + }, + true + ); + } + ); + Object.keys(refreshEvents).forEach( + function(ev) { + document.addEventListener( + ev, + function(e) { + packageLog(e, events[ev]); + }, + true + ); + } + ); + windowEvents.forEach(function(ev) { + self.addEventListener( + ev, + function(e) { + packageLog(e, function() { + return { window: true }; + }); + }, + true + ); + }); + return true; + } catch { + return false; + } + } + + // src/utils/auth/index.ts + var authCallback = null; + function updateAuthHeader(config3) { + if (authCallback) { + try { + config3.authHeader = authCallback(); + } catch (e) { + console.error(`Error encountered while setting the auth header: ${e}`); + } + } + } + function registerAuthCallback(callback) { + try { + verifyCallback(callback); + authCallback = callback; + return true; + } catch (e) { + return false; + } + } + function verifyCallback(callback) { + if (typeof callback !== "function") { + throw new Error("Userale auth callback must be a function"); + } + const result = callback(); + if (typeof result !== "string") { + throw new Error("Userale auth callback must return a string"); + } + } + + // src/utils/headers/index.ts + var headersCallback = null; + function updateCustomHeaders(config3) { + if (headersCallback) { + try { + config3.headers = headersCallback(); + } catch (e) { + console.error(`Error encountered while setting the headers: ${e}`); + } + } + } + + // src/sendLogs.ts + var sendIntervalId; + function initSender(logs3, config3) { + if (sendIntervalId) { + clearInterval(sendIntervalId); + } + sendIntervalId = sendOnInterval(logs3, config3); + sendOnClose(logs3, config3); + } + function sendOnInterval(logs3, config3) { + return setInterval(function() { + if (!config3.on) { + return; + } + if (logs3.length >= config3.logCountThreshold) { + sendLogs(logs3.slice(0), config3, 0); + logs3.splice(0); + } + }, config3.transmitInterval); + } + function sendOnClose(logs3, config3) { + self.addEventListener("pagehide", function() { + if (!config3.on) { + return; + } + if (logs3.length > 0) { + const url = new URL(config3.url); + if (url.protocol === "ws:" || url.protocol === "wss:") { + const data = JSON.stringify(logs3); + wsock.send(data); + } else { + const headers = new Headers(); + headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); + if (config3.authHeader) { + headers.set("Authorization", config3.authHeader.toString()); + } + fetch(config3.url, { + keepalive: true, + method: "POST", + headers, + body: JSON.stringify(logs3) + }).catch((error) => { + console.error(error); + }); + } + logs3.splice(0); + } + }); + } + async function sendLogs(logs3, config3, retries) { + const data = JSON.stringify(logs3); + const url = new URL(config3.url); + if (url.protocol === "ws:" || url.protocol === "wss:") { + wsock.send(data); + return; + } + const headers = new Headers({ + "Content-Type": "application/json;charset=UTF-8" + }); + updateAuthHeader(config3); + if (config3.authHeader) { + const authHeaderValue = typeof config3.authHeader === "function" ? config3.authHeader() : config3.authHeader; + headers.set("Authorization", authHeaderValue); + } + updateCustomHeaders(config3); + if (config3.headers) { + for (const [header, value] of Object.entries(config3.headers)) { + headers.set(header, value); + } + } + async function attemptSend(remainingRetries) { + try { + const response = await fetch(config3.url, { + method: "POST", + headers, + body: data + }); + if (!response.ok) { + if (remainingRetries > 0) { + return attemptSend(remainingRetries - 1); + } else { + throw new Error(`Failed to send logs: ${response.statusText}`); + } + } + } catch (error) { + if (remainingRetries > 0) { + return attemptSend(remainingRetries - 1); + } + throw error; + } + } + return attemptSend(retries); + } + + // src/main.ts + var config2 = Configuration.getInstance(); + var logs2 = []; + var startLoadTimestamp = Date.now(); + var endLoadTimestamp; + self.onload = function() { + endLoadTimestamp = Date.now(); + }; + var started = false; + var wsock; + config2.update({ + useraleVersion: version + }); + initPackager(logs2, config2); + if (config2.autostart) { + setup(config2); + } + function setup(config3) { + if (!started) { + setTimeout(function() { + let state; + try { + state = document.readyState; + } catch (error) { + state = "complete"; + } + if (config3.autostart && (state === "interactive" || state === "complete")) { + attachHandlers(config3); + initSender(logs2, config3); + started = config3.on = true; + if (typeof window !== "undefined" && typeof document !== "undefined") { + packageCustomLog( + { + type: "load", + details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp } + }, + () => ({}), + false + ); + } + } else { + setup(config3); + } + }, 100); + } + } + var version2 = version; + function start() { + if (!started || config2.autostart === false) { + started = config2.on = true; + config2.update({ autostart: true }); + } + } + function stop() { + started = config2.on = false; + config2.update({ autostart: false }); + } + function options(newConfig) { + if (newConfig) { + config2.update(newConfig); + } + return config2; + } + function log(customLog) { + if (customLog) { + logs2.push(customLog); + return true; + } else { + return false; + } + } +})(); +//# sourceMappingURL=main.global.js.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/main.global.js.map b/products/userale/packages/flagon-userale/build/main.global.js.map new file mode 100644 index 0000000..a691f3c --- /dev/null +++ b/products/userale/packages/flagon-userale/build/main.global.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/getInitialSettings.ts","../src/configure.ts","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if(typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBA,MAAI,YAA2B;AAC/B,MAAI,gBAA+B;AAO5B,WAAS,qBAAsC;AAEpD,QAAI,OAAO,sBAAsB,eAC/B,gBAAgB,mBAAmB;AACjC,YAAMA,YAA4B;AAAA,QAChC,YAAY;AAAA,QACZ,WAAW;AAAA,QACX,kBAAkB;AAAA,QAClB,WAAW;AAAA,QACX,SAAS;AAAA,QACT,eAAe;AAAA,QACf,mBAAmB;AAAA,QACnB,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ;AAAA,QACA,MAAM,CAAC,OAAiB,OAAO,SAAY,KAAK,KAAK,IAAI;AAAA,QACzD,UAAU;AAAA,QACV,aAAa;AAAA,QACb,kBAAkB;AAAA,QAClB,KAAK;AAAA,QACL,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,QAChB,QAAQ;AAAA,MACV;AACA,aAAOA;AAAA,IACT;AAEA,QAAI,cAAc,MAAM;AACtB,kBAAY;AAAA,QACV;AAAA,QACA,aAAa,OAAO,KAAK,IAAI,CAAC;AAAA,MAChC;AAAA,IACF;AAEA,QAAI,kBAAkB,MAAM;AAC1B,sBAAgB;AA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SAAS,OAAP;AAEA,kBAAQ;AAAA,QACV;AAEA,YACEA,QAAO,cACN,UAAU,iBAAiB,UAAU,aACtC;AACA,yBAAeA,OAAM;AACrB,qBAAWC,OAAMD,OAAM;AACvB,oBAAUA,QAAO,KAAK;AACtB,cAAG,OAAO,WAAW,eAAe,OAAO,aAAa,aAAa;AACnE;AAAA,cACE;AAAA,gBACE,MAAM;AAAA,gBACN,SAAS,EAAE,cAAc,mBAAmB,mBAAmB;AAAA,cACjE;AAAA,cACA,OAAO,CAAC;AAAA,cACR;AAAA,YACF;AAAA,UACF;AAAA,QACF,OAAO;AACL,gBAAMA,OAAM;AAAA,QACd;AAAA,MACF,GAAG,GAAG;AAAA,IACR;AAAA,EACF;AAGO,MAAME,WAAU;AAMhB,WAAS,QAAc;AAC5B,QAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,gBAAUA,QAAO,KAAK;AACtB,MAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,IACnC;AAAA,EACF;AAKO,WAAS,OAAa;AAC3B,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AAAA,EACpC;AAQO,WAAS,QACd,WACiB;AACjB,QAAI,WAAW;AACb,MAAAA,QAAO,OAAO,SAAS;AAAA,IACzB;AAEA,WAAOA;AAAA,EACT;AAOO,WAAS,IAAI,WAA0C;AAC5D,QAAI,WAAW;AACb,MAAAC,MAAK,KAAK,SAAS;AACnB,aAAO;AAAA,IACT,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;","names":["settings","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/example/log-label-example/index.html b/products/userale/packages/flagon-userale/example/log-label-example/index.html index 55b960d..ca3f7fb 100644 --- a/products/userale/packages/flagon-userale/example/log-label-example/index.html +++ b/products/userale/packages/flagon-userale/example/log-label-example/index.html @@ -15,7 +15,7 @@ - - - + + + + + diff --git a/site/_includes/useralejsDemo.html b/site/_includes/useralejsDemo.html index 0c3215f..9e408d8 100644 --- a/site/_includes/useralejsDemo.html +++ b/site/_includes/useralejsDemo.html @@ -93,9 +93,9 @@

Maps

- - - + + + +``` +Once you've modified the script tag `src` field, save `index.html`. + +Next open index.html in your browser (you can drag it directly into a tab or double-click it). + +You will see a very simple HTML Webpage with a few interactive features. + +On this page, all user events will be captured and sent to the logging server. See instructions below. + +## Testing with the Example Page + +The UserALE Example page can be used to test the structure of logs after instrumentation or UserALE src code modification. It can also be used to experiment with UserALE API functions. + +In order to experiment with various elements of the UserALE API, simply modify the well documented API examples in `index.js`. Details about the API can be found at the [UserALE parent README](https://github.com/apache/flagon-useralejs/tree/FLAGON-469). However, a complete list of exported functions in the API can be found below: + +| Function | Description | Notes | +|---|---|---| +| userale.options | modify userale's configuration option | see top level README for complete list of options | +| [DEPRECATED] userale.filter | filters out logs from logging queue by keys or values | filters are callbacks with global scope | +| [DEPRECATED] userale.map | modify/add log keys or values | mappings are callbacks with global scope | +| userale.addCallbacks | add one or more callbacks to be executed during log packaging | callbacks have global scope | +| userale.removeCallbacks | remove one or more callbacks by name | Removes callbacks added from userale.addCallbacks | +| userale.log | appends a custom log to the log queue | the custom log object is an object key:value pairs | +| userale.packageLog | transforms the provided event into a log and appends it to the log queue | designed for HTML events | +| userale.packageCustomLog | packages the provided customLog to include standard meta data and appends it to the log queue | designed for non HTML events| +| userale.details | defines the way information is extracted from various events | supports packageLog/packageCustomLog 'details' | +| userale.getSelector | builds a string CSS selector from the provided HTML element id | populates 'target' field in packaged logs | +| userale.buildPath| builds an array of elements from the provided event target, to the root element (DOM path) | populates the 'path' field in packaged logs | +| userale.start | used to start the logging process if | unecessary if 'autostart' is set to true in initial setting (default) | +| userale.stop | halts the logging process. Logs will no longer be sent | will need to invoke userale.start to restart logging | + +NOTE: Each modification of `index.html` or `index.js` will require that you both save the modifications and refresh the webpage in your browser. + +See the [Flagon website](http://flagon.apache.org/) for additional documentation on the [API](http://flagon.apache.org/docs/useralejs/API/) and [testing for scale](http://flagon.apache.org/docs/stack/scaling/). + +## Capturing Logs Using the Logging Server + +The example logging server receives log from any UserALE instrumented page at `localhost:8000`. + +This means you can test logs from your own instrumented application, the [UserALE WebExtension](https://github.com/apache/flagon-useralejs/tree/master/src/UserALEWebExtension), +or the UserALE Example Page, so long as the `data-url` parameter is set to `localhost:8000`. This is the default setting for both the WebExtension and UserALE Example Page. See the example above. + +Once your UserALE script tag is properly configured to point to a minified UserALE script, and `localhost:8000`, you can log to the Example Logging Server. + +from the `/example` directory or its parent directory, run the following: + +``` +$npm run example:watch +``` + +Once started you will see: + +``` +> flagon-userale@2.2.0 example:watch ... +> nodemon -w ./example example/server.js + +[nodemon] 1.19.1 +[nodemon] to restart at any time, enter `rs` +[nodemon] watching: ... +[nodemon] starting `node example/server.js` +UserAle Local running on port 8000 +``` + +Then start using your instrumented application, browser, or the UserALE Example Page, and you will see logs propagating in the terminal: + +``` + +[ { target: 'body', + path: [ 'body', 'html' ], + clientTime: 1504287557492, + location: { x: 0, y: 0 }, + type: 'keydown', + userAction: true, + details: null, + userId: 'example-user', + toolVersion: '2.2.0', + toolName: 'Apache UserALE Example', + useraleVersion: '2.2.0' }, + ... +] +``` + +Kill the logging script with `^C` or as you would any bash script. + +##Reviewing Logs Collected with the Example Server + +In addition to showing in your terminal, logs collected by the UserALE Example Server are written locally to file. + +Find them in `/logs` under the top level flagon-userale dir. A new log file will appear each time you restart the logging server. + +## Contributing + +Contributions are welcome! Simply [submit an issue](https://github.com/apache/flagon-useralejs/issues) for problems you encounter or submit a pull request for your feature or bug fix. The core team will review it and work with you to incorporate it into UserALE. \ No newline at end of file diff --git a/products/userale/example/log.schema.json b/products/userale/example/log.schema.json new file mode 100644 index 0000000..28571a7 --- /dev/null +++ b/products/userale/example/log.schema.json @@ -0,0 +1,116 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flagon.incubator.apache.org/log.schema.json", + "title": "Log", + "description": "A raw or custom log produced by userale", + "type": "object", + "properties": { + "target": { + "type": "string" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "pageUrl": { + "type": "string" + }, + "pageTitle": { + "type": "string" + }, + "userAgent": { + "type": "string" + }, + "clientTime": { + "type": "integer" + }, + "microTime": { + "type": "number", + "minimum": 0, + "maxmaximumi": 1 + }, + "location": { + "type": "object", + "properties": { + "x": { + "type": ["integer", "null"] + }, + "y": { + "type": ["integer", "null"] + } + }, + "required" : ["x", "y"] + }, + "scrnRes": { + "type": "object", + "properties": { + "height": { + "type": "integer" + }, + "width": { + "type": "integer" + } + }, + "required" : ["height", "width"] + }, + "type": { + "type": "string" + }, + "logType": { + "type": "string", + "enum": ["raw", "custom"] + }, + "userAction": { + "type": "boolean" + }, + "details": { + "type": ["object", "null"] + }, + "userId": { + "type": ["string", "null"] + }, + "toolVersion": { + "type":["string", "null"] + }, + "toolName": { + "type": ["string", "null"] + }, + "useraleVersion": { + "type": "string" + }, + "sessionId": { + "type": "string" + } + }, + "required": [ + "pageUrl", + "pageTitle", + "pageReferrer", + "userAgent", + "clientTime", + "scrnRes", + "logType", + "userAction", + "details", + "userId", + "toolVersion", + "toolName", + "useraleVersion", + "sessionId" + ], + "if": { + "properties": { "logType": { "const": "raw" } } + }, + "then": { + "required": [ + "target", + "path", + "microTime", + "location", + "type" + ] + } +} \ No newline at end of file diff --git a/products/userale/example/server/index.html b/products/userale/example/server/index.html new file mode 100644 index 0000000..799c951 --- /dev/null +++ b/products/userale/example/server/index.html @@ -0,0 +1,92 @@ + + + + UserALE - Example Page + + + + + + + +
+

+ This UserALE Example Page lets you explore how UserALE works, deploys with a script tag, and the data it generates.
+ By default, you'll see the raw logs UserALE generates. We kept this page simple so that its easy to see how things work. +

+

+ To see how our API can be used to shape UserALE logs to your needs, uncomment the 'index.js' script tag in index.html. +

+
+

Click the button below to generate targeted click events.

+
+ +
+
+
+

Play around with the form elements below to see a variety of UserALE log types:

+

+ Capture changes to fields (and values, when it's safe). +

+

+ With index.js injected into the page, you can use the 'Test Field' below to see the behavior of our API dynamically.
+ Type in the following UserALE function names to see their behavior. +

    +
  • "log" - ship a fully customized log, built from scratch
  • +
  • "packageLog" - hijack our own pipeline to modify and ship logs packaged exactly like standard UserALE logs
  • +
  • "packageCustomLog" - smash a number of custom fields together with UserALE standard metadata
  • +
+ +
+ +

+ +
+
+

Capture inputs and changes to different types of selections.

+ +
+
+
+ Business Analytics
+ HCI
+ Other +
+
+
+ +
+
+

Click on the Link to Test Logging with Page Navigation

+ + + diff --git a/products/userale/example/server/index.js b/products/userale/example/server/index.js new file mode 100644 index 0000000..20256cc --- /dev/null +++ b/products/userale/example/server/index.js @@ -0,0 +1,177 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** Options API + * + * the 'options' API allows you to dynamically change UserALE params and set meta data values + * pass in variables or properties into the options object, such as from sessionStorage or localStorage + * NOTE: logDetails is set to true (default:false), this will log key strokes, inputs, and change events + * (be careful of your form data and auth workflows!) + */ +console.log +const changeMe = "me"; +window.userale.options({ + userId: changeMe, + logDetails: true, + toolName: "Apache UserALE Example (Custom)", +}); + +/**Filter API + +/**the 'filter' API allows you to eliminate logs you don't want + * use as a global filter and add classes of events or log types to eliminate + * or use in block scope to surgically eliminate logs from specific elements from an event handler + * The filter below reduces logs to capture click, change, select, scroll and submit events on index.html + * Note that for surgical filters, you may need to clear or reset back to a global filter callback + * the same is true for the 'map' API. See examples below: + */ +window.userale.addCallbacks({ + filter(log) { + var type_array = [ + "mouseup", + "mouseover", + "mousedown", + "keydown", + "dblclick", + "blur", + "focus", + "input", + "wheel", + ]; + var logType_array = ["interval"]; + if (type_array.includes(log.type) || logType_array.includes(log.logType)) { + return false; + } + return log; + }, +}); + +/**Log Mapping API + * + * the 'map' API allows you to add or modify new fields to your logs + * this example works with the "Click Me!" button at the top of index.html + */ +document.addEventListener("click", function (e) { + if (e.target.innerHTML === "Click Me!") { + window.userale.addCallbacks({ + map(log) { + return Object.assign({}, log, { + logType: "custom", + customLabel: "map & packageLog Example", + }); + }, + }); + window.userale.packageLog( + e, + window.userale.details(window.userale.options(), e.type) + ); + /**you'll want to reset the map callback function, or set a conditional (e.g., return log), else + * the callback may be applied to other events of the same class (e.g., click) */ + window.userale.removeCallbacks(["map"]); + } else { + return false; + } +}); + +/** Alternate Log Mapping API Example + * Build a global mapping function with conditional logic to modify logs for similar events + * this example works with the "Click Me!" button at the top of index.html + * Also, note that specifying log as a return will keep the scope of this callback limited to only the events you want + */ +//window.userale.map(function (log, e) { +// var targetsForLabels = ["button#test_button"]; +// if (targetsForLabels.includes(log.target)) { +// return Object.assign({}, log, { customLabel: e.target.innerHTML }); +// } else { +// return log; +// } +//}); + +/**'Log' API and Custom Log Functions + * + * the 'log' API generate custom events and add them to the log queue + * pass in any keys:values for fully customized logs + * utilize 'options' and other functions to streamline populating custom logs + * type 'log' into the 'API Test Field' to see this custom log sent to our example server + */ +document.addEventListener("change", function (e) { + if (e.target.value === "log") { + window.userale.log({ + target: window.userale.getSelector(e.target), + path: window.userale.buildPath(e), + clientTime: Date.now(), + type: e.type, + logType: "custom", + userAction: false, + details: { foo: "bar", bar: "foo" }, + customField1: "I can make this log look like anything I want", + customField2: "foo", + userId: window.userale.options().userId, + toolVersion: window.userale.options().version, + toolName: window.userale.options().toolName, + useraleVersion: window.userale.options().useraleVersion, + sessionId: window.userale.options().sessionId, + customLabel: "Custom Log Example", + }); + } +}); + +/**you can also use UserALE' own packaging function for HTML events to strive for standardization + * type 'packageLog into the 'API Test Field' to see this custom log sent to our example server + */ +document.addEventListener("change", function (e) { + if (e.target.value === "packageLog") { + /**You can then use the 'Mapping' API function to modify custom logs created with the packageLog function*/ + window.userale.addCallbacks({ + changeMap(log) { + var targetsForLabels = ["change"]; + if (targetsForLabels.includes(log.type)) { + return Object.assign({}, log, { + logType: "custom", + customLabel: "packageLog Example", + }); + } else { + return log; + } + }, + }); + /**You can also use the details function to package additional log meta data, or add custom details*/ + window.userale.packageLog( + e, + window.userale.details(window.userale.options(), e.type) + ); + } else { + return false; + } +}); + +/**you can also just add boilerplate UserALE meta data to custom logs with the packageCustomLog function + * type 'packageCustomLog into the 'API Test Field' to see this custom log sent to our example server + */ +document.addEventListener("change", function (e) { + if (e.target.value === "packageCustomLog") { + window.userale.packageCustomLog( + { + customLabel: "packageCustomLog Example", + customField1: "foo", + customField2: "bar", + }, + function () { + return { foo: "bar", bar: "foo" }; + }, + true + ); + } else { + return false; + } +}); diff --git a/products/userale/example/server/no-logging.html b/products/userale/example/server/no-logging.html new file mode 100644 index 0000000..4f5cbb5 --- /dev/null +++ b/products/userale/example/server/no-logging.html @@ -0,0 +1,76 @@ + + + + UserALE - Example Page + + +
+

+ This UserALE Example Page lets you explore how UserALE works, deploys with a script tag, and the data it generates.
+ By default, you'll see the raw logs UserALE generates. We kept this page simple so that its easy to see how things work. +

+

+ To see how our API can be used to shape UserALE logs to your needs, uncomment the 'index.js' script tag in index.html. +

+
+

Click the button below to generate targeted click events.

+
+ +
+
+
+

Play around with the form elements below to see a variety of UserALE log types:

+

+ Capture changes to fields (and values, when it's safe). +

+

+ With index.js injected into the page, you can use the 'Test Field' below to see the behavior of our API dynamically.
+ Type in the following UserALE function names to see their behavior. +

    +
  • "log" - ship a fully customized log, built from scratch
  • +
  • "packageLog" - hijack our own pipeline to modify and ship logs packaged exactly like standard UserALE logs
  • +
  • "packageCustomLog" - smash a number of custom fields together with UserALE standard metadata
  • +
+ +
+ +

+ +
+
+

Capture inputs and changes to different types of selections.

+ +
+
+
+ Business Analytics
+ HCI
+ Other +
+
+
+ +
+
+

Click on the Link to Test Logging with Page Navigation

+ + + \ No newline at end of file diff --git a/products/userale/example/server/server.js b/products/userale/example/server/server.js new file mode 100644 index 0000000..966e591 --- /dev/null +++ b/products/userale/example/server/server.js @@ -0,0 +1,151 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * for additional information. The ASF licenses this file under + * the Apache License, Version 2.0. + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +const express = require("express"); +const http = require("http"); +const ws = require("ws"); +const bodyParser = require("body-parser"); +const fs = require("fs"); +const path = require("path"); + +const app = express(); +const port = process.env.PORT || 8000; + +// --- Setup log file --- +const logDirectory = path.resolve(__dirname, "../logs"); +if (!fs.existsSync(logDirectory)) fs.mkdirSync(logDirectory); + +const logPath = path.join(logDirectory, `logs_${Date.now()}.json`); +const wStream = fs.createWriteStream(logPath); +wStream.write("["); +let firstLog = true; + +function writeLogs(logs) { + if (!Array.isArray(logs) || logs.length === 0) return; + + if (firstLog) { + wStream.write("\n\t"); + firstLog = false; + } else { + wStream.write(",\n\t"); + } + + wStream.write(logs.map(JSON.stringify).join(",\n\t")); +} + +// --- Express Middleware --- +app.use((req, res, next) => { + res.set({ + "Access-Control-Allow-Origin": "*", + "Access-Control-Allow-Methods": "GET,PUT,POST,DELETE,OPTIONS", + "Access-Control-Allow-Headers": "Content-Type, Authorization, Content-Length, X-Requested-With", + }); + + if (req.method === "OPTIONS") return res.sendStatus(200); + next(); +}); + +app.use(bodyParser.urlencoded({ extended: true, limit: "100mb" })); +app.use(bodyParser.json({ limit: "100mb" })); +app.use(bodyParser.text()); + +app.use("/build", express.static(path.join(__dirname, "../../packages/flagon-userale/build"))); +app.use("/", express.static(__dirname)); + +app.get("/", (req, res) => res.sendFile("index.html", { root: __dirname })); +app.get("/ws", (req, res) => res.sendFile("ws-index.html", { root: __dirname })); +app.get("/no-logging", (req, res) => res.sendFile("no-logging.html", { root: __dirname })); + +app.post("/", (req, res) => { + const body = typeof req.body === "string" ? JSON.parse(req.body) : req.body; + + if ( + (Array.isArray(body) && body.length === 0) || + (typeof body === "object" && body !== null && Object.keys(body).length === 0) + ) { + return res.sendStatus(200); + } + + console.log("HTTP POST:", body); + writeLogs(body); + res.sendStatus(200); +}); + +// --- Shared HTTP + WS Server --- +const httpServer = http.createServer(app); +const wss = new ws.WebSocketServer({ noServer: true }); + +httpServer.on("upgrade", (req, socket, head) => { + if (req.url === "/ws" || req.url === "/") { + wss.handleUpgrade(req, socket, head, (wsSocket) => { + wss.emit("connection", wsSocket, req); + }); + } else { + socket.destroy(); + } +}); + +wss.on("connection", (socket) => { + console.log("WebSocket client connected"); + + socket.on("message", (message) => { + const raw = typeof message === "string" ? message : message.toString(); + let body; + try { + body = JSON.parse(raw); + } catch (err) { + console.warn("Invalid JSON from WebSocket:", raw); + return; + } + + if ( + (Array.isArray(body) && body.length === 0) || + (typeof body === "object" && body !== null && Object.keys(body).length === 0) + ) { + return; + } + + console.log("WebSocket POST:", body); + writeLogs(body); + }); + + socket.on("close", () => console.log("WebSocket client disconnected")); +}); + +// --- Graceful Shutdown --- +function closeLogServer() { + console.log("Shutting down..."); + + wStream.end("\n]", () => { + httpServer.close(() => { + console.log("HTTP server closed."); + wss.close(() => { + console.log("WebSocket server closed."); + process.exit(0); + }); + }); + }); +} + +process.on("SIGINT", closeLogServer); +process.on("SIGTERM", closeLogServer); +process.on("uncaughtException", (err) => { + console.error("Uncaught exception:", err); + closeLogServer(); +}); +process.on("unhandledRejection", (reason) => { + console.error("Unhandled rejection:", reason); + closeLogServer(); +}); + +// --- Conditional Start --- +if (require.main === module) { + httpServer.listen(port, () => { + console.log(`UserAle HTTP + WebSocket server running on port ${port}`); + }); +} diff --git a/products/userale/example/server/ws-index.html b/products/userale/example/server/ws-index.html new file mode 100644 index 0000000..15650d2 --- /dev/null +++ b/products/userale/example/server/ws-index.html @@ -0,0 +1,92 @@ + + + + UserALE - Example Page + + + + + + + +
+

+ This UserALE Example Page lets you explore how UserALE works, deploys with a script tag, and the data it generates.
+ By default, you'll see the raw logs UserALE generates. We kept this page simple so that its easy to see how things work. +

+

+ To see how our API can be used to shape UserALE logs to your needs, uncomment the 'index.js' script tag in index.html. +

+
+

Click the button below to generate targeted click events.

+
+ +
+
+
+

Play around with the form elements below to see a variety of UserALE log types:

+

+ Capture changes to fields (and values, when it's safe). +

+

+ With index.js injected into the page, you can use the 'Test Field' below to see the behavior of our API dynamically.
+ Type in the following UserALE function names to see their behavior. +

    +
  • "log" - ship a fully customized log, built from scratch
  • +
  • "packageLog" - hijack our own pipeline to modify and ship logs packaged exactly like standard UserALE logs
  • +
  • "packageCustomLog" - smash a number of custom fields together with UserALE standard metadata
  • +
+ +
+ +

+ +
+
+

Capture inputs and changes to different types of selections.

+ +
+
+
+ Business Analytics
+ HCI
+ Other +
+
+
+ +
+
+

Click on the Link to Test Logging with Page Navigation

+ + + diff --git a/products/userale/package.json b/products/userale/package.json index 735eb90..f3b5674 100644 --- a/products/userale/package.json +++ b/products/userale/package.json @@ -3,9 +3,21 @@ "private": true, "version": "1.0.0", "scripts": { - "build": "pnpm -r run build" + "build": "pnpm -r run build", + "test": "playwright test -c ./test/playwright.config.ts && pnpm -r test", + "pretest": "npx playwright install", + "example:run": "node example/server/server.js", + "example:watch": "nodemon -w ./example/server example/server/server.js" }, "devDependencies": { - "pnpm": "^10.0.0" + "@playwright/test": "^1.52.0", + "@types/node": "^22.15.30", + "body-parser": "^1.20.2", + "express": "^4.18.2", + "flagon-userale": "workspace:flagon-userale", + "jsonschema": "^1.4.1", + "pnpm": "^10.0.0", + "nodemon": "^3.0.2", + "ws": "^8.18.0" } } \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts index b86596f..ec9f4ee 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts @@ -7,6 +7,7 @@ const handler: PlasmoMessaging.PortHandler = async (req, res) => { log.browserSessionId = browserSessionId; let allowListRegExp = getAllowListRegExp(); if (allowListRegExp.test(log.pageUrl)) { + console.log(log); userale.log(log); } } diff --git a/products/userale/packages/flagon-userale-ext/src/options/logging.tsx b/products/userale/packages/flagon-userale-ext/src/options/logging.tsx index f5ce4f0..652cd06 100644 --- a/products/userale/packages/flagon-userale-ext/src/options/logging.tsx +++ b/products/userale/packages/flagon-userale-ext/src/options/logging.tsx @@ -25,12 +25,20 @@ function Logging() {

Logging Options

- - setLoggingUrl(e.target.value)} /> + + setLoggingUrl(e.target.value)} + />
- - setAllowList(e.target.value)} /> + + setAllowList(e.target.value)} + />
diff --git a/products/userale/packages/flagon-userale/build/main.d.ts b/products/userale/packages/flagon-userale/build/main.d.ts index 5e56576..a3cc624 100644 --- a/products/userale/packages/flagon-userale/build/main.d.ts +++ b/products/userale/packages/flagon-userale/build/main.d.ts @@ -206,7 +206,6 @@ declare function getSelector(ele: EventTarget): string; declare function buildPath(e: Event): string[]; declare let started: boolean; -declare let wsock: WebSocket; declare const version: string; /** @@ -232,4 +231,4 @@ declare function options(newConfig: Partial | undefined): Setti */ declare function log(customLog: Logging.CustomLog | undefined): boolean; -export { addCallbacks, buildPath, defineCustomDetails as details, getSelector, log, options, packageCustomLog, packageLog, registerAuthCallback, removeCallbacks, start, started, stop, version, wsock }; +export { Logging, addCallbacks, buildPath, defineCustomDetails as details, getSelector, log, options, packageCustomLog, packageLog, registerAuthCallback, removeCallbacks, start, started, stop, version }; diff --git a/products/userale/packages/flagon-userale/build/main.global.js b/products/userale/packages/flagon-userale/build/main.global.js index 6ea422b..490b8d0 100644 --- a/products/userale/packages/flagon-userale/build/main.global.js +++ b/products/userale/packages/flagon-userale/build/main.global.js @@ -14,205 +14,49 @@ See the License for the specific language governing permissions and limitations under the License.*/ (() => { - // package.json - var version = "2.4.0"; - - // src/getInitialSettings.ts - var sessionId = null; - var httpSessionId = null; - function getInitialSettings() { - if (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) { - const settings2 = { - authHeader: null, - autostart: true, - browserSessionId: null, - custIndex: null, - headers: null, - httpSessionId: null, - logCountThreshold: 5, - logDetails: false, - resolution: 500, - sessionId, - time: (ts) => ts !== void 0 ? ts : Date.now(), - toolName: null, - toolVersion: null, - transmitInterval: 5e3, - url: "http://localhost:8000", - useraleVersion: null, - userFromParams: null, - userId: null - }; - return settings2; - } - if (sessionId === null) { - sessionId = getsessionId( - "userAlesessionId", - "session_" + String(Date.now()) - ); - } - if (httpSessionId === null) { - httpSessionId = getsessionId( - "userAleHttpSessionId", - generatehttpSessionId() - ); - } - const script = document.currentScript || function() { - const scripts = document.getElementsByTagName("script"); - return scripts[scripts.length - 1]; - }(); - const get = script ? script.getAttribute.bind(script) : function() { - return null; - }; - const headers = get("data-headers"); - const settings = { - authHeader: get("data-auth") || null, - autostart: get("data-autostart") === "false" ? false : true, - browserSessionId: null, - custIndex: get("data-index") || null, - headers: headers ? JSON.parse(headers) : null, - httpSessionId, - logCountThreshold: +(get("data-threshold") || 5), - logDetails: get("data-log-details") === "true" ? true : false, - resolution: +(get("data-resolution") || 500), - sessionId: get("data-session") || sessionId, - time: timeStampScale(document.createEvent("CustomEvent")), - toolName: get("data-tool") || null, - toolVersion: get("data-version") || null, - transmitInterval: +(get("data-interval") || 5e3), - url: get("data-url") || "http://localhost:8000", - useraleVersion: get("data-userale-version") || null, - userFromParams: get("data-user-from-params") || null, - userId: get("data-user") || null - }; - return settings; - } - function getsessionId(sessionKey, value) { - if (self.sessionStorage.getItem(sessionKey) === null) { - self.sessionStorage.setItem(sessionKey, JSON.stringify(value)); - return value; - } - return JSON.parse(self.sessionStorage.getItem(sessionKey) || ""); - } - function timeStampScale(e) { - let tsScaler; - if (e.timeStamp && e.timeStamp > 0) { - const delta = Date.now() - e.timeStamp; - if (delta < 0) { - tsScaler = function() { - return e.timeStamp / 1e3; - }; - } else if (delta > e.timeStamp) { - const navStart = performance.timeOrigin; - tsScaler = function(ts) { - return ts + navStart; - }; - } else { - tsScaler = function(ts) { - return ts; - }; - } - } else { - tsScaler = function() { - return Date.now(); - }; - } - return tsScaler; - } - function generatehttpSessionId() { - const len = 32; - const arr = new Uint8Array(len / 2); - window.crypto.getRandomValues(arr); - return Array.from(arr, (dec) => { - return dec.toString(16).padStart(2, "0"); - }).join(""); - } - - // src/configure.ts - var _Configuration = class { - constructor() { - this.autostart = false; - this.authHeader = null; - this.browserSessionId = null; - this.custIndex = null; - this.headers = null; - this.httpSessionId = null; - this.logCountThreshold = 0; - this.logDetails = false; - this.on = false; - this.resolution = 0; - this.sessionId = null; - this.time = () => Date.now(); - this.toolName = null; - this.toolVersion = null; - this.transmitInterval = 0; - this.url = ""; - this.userFromParams = null; - this.useraleVersion = null; - this.userId = null; - this.version = null; - this.websocketsEnabled = false; - if (_Configuration.instance === null) { - this.initialize(); - } - } - static getInstance() { - if (_Configuration.instance === null) { - _Configuration.instance = new _Configuration(); - } - return _Configuration.instance; - } - initialize() { - const settings = getInitialSettings(); - this.update(settings); - } - reset() { - this.initialize(); - } - update(newConfig) { - Object.keys(newConfig).forEach((option) => { - if (option === "userFromParams") { - const userParamString = newConfig[option]; - const userId = userParamString ? _Configuration.getUserIdFromParams(userParamString) : null; - if (userId) { - this["userId"] = userId; - } - } - const hasNewUserFromParams = newConfig["userFromParams"]; - const willNullifyUserId = option === "userId" && newConfig[option] === null; - if (willNullifyUserId && hasNewUserFromParams) { - return; - } - const newOption = newConfig[option]; - if (newOption !== void 0) { - this[option] = newOption; - } - }); - } - static getUserIdFromParams(param) { - const userField = param; - const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); - const results = window.location.href.match(regex); - if (results && results[2]) { - return decodeURIComponent(results[2].replace(/\+/g, " ")); - } - return null; + var __defProp = Object.defineProperty; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; + }; + var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } + return to; }; - var Configuration = _Configuration; - Configuration.instance = null; + var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/packageLogs.ts - var logs; - var config; - var intervalId; - var intervalType; - var intervalPath; - var intervalTimer; - var intervalCounter; - var intervalLog; - var filterHandler = null; - var mapHandler = null; - var cbHandlers = {}; + var packageLogs_exports = {}; + __export(packageLogs_exports, { + addCallbacks: () => addCallbacks, + buildAttrs: () => buildAttrs, + buildCSS: () => buildCSS, + buildPath: () => buildPath, + cbHandlers: () => cbHandlers, + extractTimeFields: () => extractTimeFields, + filterHandler: () => filterHandler, + getLocation: () => getLocation, + getScreenRes: () => getScreenRes, + getSelector: () => getSelector, + initPackager: () => initPackager, + logs: () => logs, + mapHandler: () => mapHandler, + packageCustomLog: () => packageCustomLog, + packageIntervalLog: () => packageIntervalLog, + packageLog: () => packageLog, + removeCallbacks: () => removeCallbacks, + selectorizePath: () => selectorizePath + }); function addCallbacks(...newCallbacks) { newCallbacks.forEach((source) => { let descriptors = {}; @@ -265,7 +109,7 @@ pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: self.navigator.userAgent, + userAgent: self.navigator.userAgent, clientTime: timeFields.milli, microTime: timeFields.micro, location: getLocation(e), @@ -314,7 +158,7 @@ pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: self.navigator.userAgent, + userAgent: self.navigator.userAgent, clientTime: Date.now(), scrnRes: getScreenRes(), logType: "custom", @@ -374,7 +218,7 @@ pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: self.navigator.userAgent, + userAgent: self.navigator.userAgent, count: intervalCounter, duration: timestamp - intervalTimer, startTime: intervalTimer, @@ -496,22 +340,30 @@ } return properties; } + var logs, config, intervalId, intervalType, intervalPath, intervalTimer, intervalCounter, intervalLog, filterHandler, mapHandler, cbHandlers; + var init_packageLogs = __esm({ + "src/packageLogs.ts"() { + "use strict"; + filterHandler = null; + mapHandler = null; + cbHandlers = {}; + } + }); // src/attachHandlers.ts - var events; - var bufferBools; - var bufferedEvents; - var refreshEvents; - var intervalEvents = [ - "click", - "focus", - "blur", - "input", - "change", - "mouseover", - "submit" - ]; - var windowEvents = ["load", "blur", "focus"]; + var attachHandlers_exports = {}; + __export(attachHandlers_exports, { + attachHandlers: () => attachHandlers, + defineCustomDetails: () => defineCustomDetails, + defineDetails: () => defineDetails, + extractChangeDetails: () => extractChangeDetails, + extractInputDetails: () => extractInputDetails, + extractKeyboardDetails: () => extractKeyboardDetails, + extractMouseDetails: () => extractMouseDetails, + extractResizeDetails: () => extractResizeDetails, + extractScrollDetails: () => extractScrollDetails, + extractWheelDetails: () => extractWheelDetails + }); function extractMouseDetails(e) { return { clicks: e.detail, @@ -531,6 +383,11 @@ meta: e.metaKey }; } + function extractInputDetails(e) { + return { + value: e.target.value + }; + } function extractChangeDetails(e) { return { value: e.target.value @@ -610,7 +467,7 @@ try { defineDetails(config3); Object.keys(events).forEach(function(ev) { - self.addEventListener( + document.addEventListener( ev, function(e) { packageLog(e, events[ev]); @@ -619,7 +476,7 @@ ); }); intervalEvents.forEach(function(ev) { - self.addEventListener( + document.addEventListener( ev, function(e) { packageIntervalLog(e); @@ -672,9 +529,25 @@ return false; } } + var events, bufferBools, bufferedEvents, refreshEvents, intervalEvents, windowEvents; + var init_attachHandlers = __esm({ + "src/attachHandlers.ts"() { + "use strict"; + init_packageLogs(); + intervalEvents = [ + "click", + "focus", + "blur", + "input", + "change", + "mouseover", + "submit" + ]; + windowEvents = ["load", "blur", "focus"]; + } + }); // src/utils/auth/index.ts - var authCallback = null; function updateAuthHeader(config3) { if (authCallback) { try { @@ -702,9 +575,18 @@ throw new Error("Userale auth callback must return a string"); } } + function resetAuthCallback() { + authCallback = null; + } + var authCallback; + var init_auth = __esm({ + "src/utils/auth/index.ts"() { + "use strict"; + authCallback = null; + } + }); // src/utils/headers/index.ts - var headersCallback = null; function updateCustomHeaders(config3) { if (headersCallback) { try { @@ -714,13 +596,267 @@ } } } + function registerHeadersCallback(callback) { + try { + verifyCallback2(callback); + headersCallback = callback; + return true; + } catch (e) { + return false; + } + } + function verifyCallback2(callback) { + if (typeof callback !== "function") { + throw new Error("Userale headers callback must be a function"); + } + const result = callback(); + if (typeof result !== "object") { + throw new Error("Userale headers callback must return an object"); + } + for (const [key, value] of Object.entries(result)) { + if (typeof key !== "string" || typeof value !== "string") { + throw new Error( + "Userale header callback must return an object with string keys and values" + ); + } + } + } + function resetHeadersCallback() { + headersCallback = null; + } + var headersCallback; + var init_headers = __esm({ + "src/utils/headers/index.ts"() { + "use strict"; + headersCallback = null; + } + }); + + // src/utils/index.ts + var utils_exports = {}; + __export(utils_exports, { + authCallback: () => authCallback, + headersCallback: () => headersCallback, + registerAuthCallback: () => registerAuthCallback, + registerHeadersCallback: () => registerHeadersCallback, + resetAuthCallback: () => resetAuthCallback, + resetHeadersCallback: () => resetHeadersCallback, + updateAuthHeader: () => updateAuthHeader, + updateCustomHeaders: () => updateCustomHeaders, + verifyAuthCallback: () => verifyCallback, + verifyHeadersCallback: () => verifyCallback2 + }); + var init_utils = __esm({ + "src/utils/index.ts"() { + "use strict"; + init_auth(); + init_headers(); + } + }); + + // package.json + var version = "2.4.0"; + + // src/getInitialSettings.ts + var sessionId = null; + var httpSessionId = null; + function getInitialSettings() { + if (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) { + const settings2 = { + authHeader: null, + autostart: true, + browserSessionId: null, + custIndex: null, + headers: null, + httpSessionId: null, + logCountThreshold: 5, + logDetails: false, + resolution: 500, + sessionId, + time: (ts) => ts !== void 0 ? ts : Date.now(), + toolName: null, + toolVersion: null, + transmitInterval: 5e3, + url: "http://localhost:8000", + useraleVersion: null, + userFromParams: null, + userId: null + }; + return settings2; + } + if (sessionId === null) { + sessionId = getsessionId( + "userAlesessionId", + "session_" + String(Date.now()) + ); + } + if (httpSessionId === null) { + httpSessionId = getsessionId( + "userAleHttpSessionId", + generatehttpSessionId() + ); + } + const script = document.currentScript || function() { + const scripts = document.getElementsByTagName("script"); + return scripts[scripts.length - 1]; + }(); + const get = script ? script.getAttribute.bind(script) : function() { + return null; + }; + const headers = get("data-headers"); + const settings = { + authHeader: get("data-auth") || null, + autostart: get("data-autostart") === "false" ? false : true, + browserSessionId: null, + custIndex: get("data-index") || null, + headers: headers ? JSON.parse(headers) : null, + httpSessionId, + logCountThreshold: +(get("data-threshold") || 5), + logDetails: get("data-log-details") === "true" ? true : false, + resolution: +(get("data-resolution") || 500), + sessionId: get("data-session") || sessionId, + time: timeStampScale(document.createEvent("CustomEvent")), + toolName: get("data-tool") || null, + toolVersion: get("data-version") || null, + transmitInterval: +(get("data-interval") || 5e3), + url: get("data-url") || "http://localhost:8000", + useraleVersion: get("data-userale-version") || null, + userFromParams: get("data-user-from-params") || null, + userId: get("data-user") || null + }; + return settings; + } + function getsessionId(sessionKey, value) { + if (self.sessionStorage.getItem(sessionKey) === null) { + self.sessionStorage.setItem(sessionKey, JSON.stringify(value)); + return value; + } + return JSON.parse(self.sessionStorage.getItem(sessionKey) || ""); + } + function timeStampScale(e) { + let tsScaler; + if (e.timeStamp && e.timeStamp > 0) { + const delta = Date.now() - e.timeStamp; + if (delta < 0) { + tsScaler = function() { + return e.timeStamp / 1e3; + }; + } else if (delta > e.timeStamp) { + const navStart = performance.timeOrigin; + tsScaler = function(ts) { + return ts + navStart; + }; + } else { + tsScaler = function(ts) { + return ts; + }; + } + } else { + tsScaler = function() { + return Date.now(); + }; + } + return tsScaler; + } + function generatehttpSessionId() { + const len = 32; + const arr = new Uint8Array(len / 2); + window.crypto.getRandomValues(arr); + return Array.from(arr, (dec) => { + return dec.toString(16).padStart(2, "0"); + }).join(""); + } + + // src/configure.ts + var _Configuration = class { + constructor() { + this.autostart = false; + this.authHeader = null; + this.browserSessionId = null; + this.custIndex = null; + this.headers = null; + this.httpSessionId = null; + this.logCountThreshold = 0; + this.logDetails = false; + this.on = false; + this.resolution = 0; + this.sessionId = null; + this.time = () => Date.now(); + this.toolName = null; + this.toolVersion = null; + this.transmitInterval = 0; + this.url = ""; + this.userFromParams = null; + this.useraleVersion = null; + this.userId = null; + this.version = null; + this.websocketsEnabled = false; + if (_Configuration.instance === null) { + this.initialize(); + } + } + static getInstance() { + if (_Configuration.instance === null) { + _Configuration.instance = new _Configuration(); + } + return _Configuration.instance; + } + initialize() { + const settings = getInitialSettings(); + this.update(settings); + } + reset() { + this.initialize(); + } + update(newConfig) { + Object.keys(newConfig).forEach((option) => { + if (option === "userFromParams") { + const userParamString = newConfig[option]; + const userId = userParamString ? _Configuration.getUserIdFromParams(userParamString) : null; + if (userId) { + this["userId"] = userId; + } + } + const hasNewUserFromParams = newConfig["userFromParams"]; + const willNullifyUserId = option === "userId" && newConfig[option] === null; + if (willNullifyUserId && hasNewUserFromParams) { + return; + } + const newOption = newConfig[option]; + if (newOption !== void 0) { + this[option] = newOption; + } + }); + } + static getUserIdFromParams(param) { + const userField = param; + const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); + const results = window.location.href.match(regex); + if (results && results[2]) { + return decodeURIComponent(results[2].replace(/\+/g, " ")); + } + return null; + } + }; + var Configuration = _Configuration; + Configuration.instance = null; + + // src/main.ts + init_attachHandlers(); + init_packageLogs(); // src/sendLogs.ts + init_utils(); var sendIntervalId; + var wsock; function initSender(logs3, config3) { if (sendIntervalId) { clearInterval(sendIntervalId); } + const url = new URL(config3.url); + if (url.protocol === "ws:" || url.protocol === "wss:") { + wsock = new WebSocket(config3.url); + } sendIntervalId = sendOnInterval(logs3, config3); sendOnClose(logs3, config3); } @@ -747,7 +883,7 @@ wsock.send(data); } else { const headers = new Headers(); - headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); + headers.set("Content-Type", "application/json;charset=UTF-8"); if (config3.authHeader) { headers.set("Authorization", config3.authHeader.toString()); } @@ -810,6 +946,9 @@ } // src/main.ts + init_attachHandlers(); + init_utils(); + init_packageLogs(); var config2 = Configuration.getInstance(); var logs2 = []; var startLoadTimestamp = Date.now(); @@ -818,7 +957,6 @@ endLoadTimestamp = Date.now(); }; var started = false; - var wsock; config2.update({ useraleVersion: version }); @@ -880,5 +1018,22 @@ return false; } } + if (typeof window !== "undefined") { + window.userale = { + start, + stop, + options, + log, + version, + details: (init_attachHandlers(), __toCommonJS(attachHandlers_exports)).defineCustomDetails, + registerAuthCallback: (init_utils(), __toCommonJS(utils_exports)).registerAuthCallback, + addCallbacks: (init_packageLogs(), __toCommonJS(packageLogs_exports)).addCallbacks, + removeCallbacks: (init_packageLogs(), __toCommonJS(packageLogs_exports)).removeCallbacks, + packageLog: (init_packageLogs(), __toCommonJS(packageLogs_exports)).packageLog, + packageCustomLog: (init_packageLogs(), __toCommonJS(packageLogs_exports)).packageCustomLog, + getSelector: (init_packageLogs(), __toCommonJS(packageLogs_exports)).getSelector, + buildPath: (init_packageLogs(), __toCommonJS(packageLogs_exports)).buildPath + }; + } })(); //# sourceMappingURL=main.global.js.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/main.global.js.map b/products/userale/packages/flagon-userale/build/main.global.js.map index a691f3c..a0eea58 100644 --- a/products/userale/packages/flagon-userale/build/main.global.js.map +++ b/products/userale/packages/flagon-userale/build/main.global.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/getInitialSettings.ts","../src/configure.ts","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if(typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;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C1C,gBAAUA,QAAO,KAAK;AACtB,MAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,IACnC;AAAA,EACF;AAKO,WAAS,OAAa;AAC3B,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AAAA,EACpC;AAQO,WAAS,QACd,WACiB;AACjB,QAAI,WAAW;AACb,MAAAA,QAAO,OAAO,SAAS;AAAA,IACzB;AAEA,WAAOA;AAAA,EACT;AAOO,WAAS,IAAI,WAA0C;AAC5D,QAAI,WAAW;AACb,MAAAC,MAAK,KAAK,SAAS;AACnB,aAAO;AAAA,IACT,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;","names":["settings","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file +{"version":3,"sources":["../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/utils/index.ts","../src/getInitialSettings.ts","../src/configure.ts","../src/main.ts","../src/sendLogs.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {\n authCallback,\n updateAuthHeader,\n registerAuthCallback,\n resetAuthCallback,\n verifyCallback as verifyAuthCallback,\n} from \"./auth\";\nexport {\n headersCallback,\n updateCustomHeaders,\n registerHeadersCallback,\n resetHeadersCallback,\n verifyCallback as verifyHeadersCallback,\n} from \"./headers\";\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\nexport type { Logging } from \"@/types\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if(typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n\n\n// Only attach to window in IIFE builds\nif (typeof window !== \"undefined\") {\n (window as any).userale = {\n start,\n stop,\n options,\n log,\n version: userAleVersion,\n details: require(\"@/attachHandlers\").defineCustomDetails,\n registerAuthCallback: require(\"@/utils\").registerAuthCallback,\n addCallbacks: require(\"@/packageLogs\").addCallbacks,\n removeCallbacks: require(\"@/packageLogs\").removeCallbacks,\n packageLog: require(\"@/packageLogs\").packageLog,\n packageCustomLog: require(\"@/packageLogs\").packageCustomLog,\n getSelector: require(\"@/packageLogs\").getSelector,\n buildPath: require(\"@/packageLogs\").buildPath,\n };\n}","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\nlet wsock: WebSocket;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n const url = new URL(config.url);\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock = new WebSocket(config.url);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"application/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCO,WAAS,gBACX,cACH;AACA,iBAAa,QAAQ,CAAC,WAAW;AAC/B,UAAI,cAAiD,CAAC;AAEtD,oBAAc,OAAO,KAAK,MAAM,EAAE,OAAO,CAACA,cAAa,QAAQ;AAC7D,QAAAA,aAAY,OAAO,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,eAAOA;AAAA,MACT,GAAG,WAAW;AAEd,aAAO,sBAAsB,MAAM,EAAE,QAAQ,CAAC,QAAQ;AACpD,cAAM,aAAa,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,YAAI,YAAY,YAAY;AAC1B,sBAAY,OAAO;AAAA,QACrB;AAAA,MACF,CAAC;AACD,aAAO,iBAAiB,YAAY,WAAW;AAAA,IACjD,CAAC;AACD,WAAO;AAAA,EACT;AAMO,WAAS,gBAAgB,YAAsB;AACpD,eAAW,QAAQ,CAAC,QAAQ;AAC1B,UAAI,OAAO,UAAU,eAAe,KAAK,YAAY,GAAG,GAAG;AACzD,eAAO,WAAW;AAAA,MACpB;AAAA,IACF,CAAC;AAAA,EACH;AAOO,WAAS,aACd,S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AC1C,YAAY,wDAAyB;AAAA,MACrC,kBAAkB,wDAAyB;AAAA,MAC3C,aAAa,wDAAyB;AAAA,MACtC,WAAW,wDAAyB;AAAA,IACtC;AAAA,EACF;","names":["descriptors","log","config","options","config","config","verifyCallback","verifyCallback","settings","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/main.mjs b/products/userale/packages/flagon-userale/build/main.mjs index b944a2d..a9318e2 100644 --- a/products/userale/packages/flagon-userale/build/main.mjs +++ b/products/userale/packages/flagon-userale/build/main.mjs @@ -12,205 +12,55 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.*/ -// package.json -var version = "2.4.0"; - -// src/getInitialSettings.ts -var sessionId = null; -var httpSessionId = null; -function getInitialSettings() { - if (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) { - const settings2 = { - authHeader: null, - autostart: true, - browserSessionId: null, - custIndex: null, - headers: null, - httpSessionId: null, - logCountThreshold: 5, - logDetails: false, - resolution: 500, - sessionId, - time: (ts) => ts !== void 0 ? ts : Date.now(), - toolName: null, - toolVersion: null, - transmitInterval: 5e3, - url: "http://localhost:8000", - useraleVersion: null, - userFromParams: null, - userId: null - }; - return settings2; - } - if (sessionId === null) { - sessionId = getsessionId( - "userAlesessionId", - "session_" + String(Date.now()) - ); - } - if (httpSessionId === null) { - httpSessionId = getsessionId( - "userAleHttpSessionId", - generatehttpSessionId() - ); - } - const script = document.currentScript || function() { - const scripts = document.getElementsByTagName("script"); - return scripts[scripts.length - 1]; - }(); - const get = script ? script.getAttribute.bind(script) : function() { - return null; - }; - const headers = get("data-headers"); - const settings = { - authHeader: get("data-auth") || null, - autostart: get("data-autostart") === "false" ? false : true, - browserSessionId: null, - custIndex: get("data-index") || null, - headers: headers ? JSON.parse(headers) : null, - httpSessionId, - logCountThreshold: +(get("data-threshold") || 5), - logDetails: get("data-log-details") === "true" ? true : false, - resolution: +(get("data-resolution") || 500), - sessionId: get("data-session") || sessionId, - time: timeStampScale(document.createEvent("CustomEvent")), - toolName: get("data-tool") || null, - toolVersion: get("data-version") || null, - transmitInterval: +(get("data-interval") || 5e3), - url: get("data-url") || "http://localhost:8000", - useraleVersion: get("data-userale-version") || null, - userFromParams: get("data-user-from-params") || null, - userId: get("data-user") || null - }; - return settings; -} -function getsessionId(sessionKey, value) { - if (self.sessionStorage.getItem(sessionKey) === null) { - self.sessionStorage.setItem(sessionKey, JSON.stringify(value)); - return value; - } - return JSON.parse(self.sessionStorage.getItem(sessionKey) || ""); -} -function timeStampScale(e) { - let tsScaler; - if (e.timeStamp && e.timeStamp > 0) { - const delta = Date.now() - e.timeStamp; - if (delta < 0) { - tsScaler = function() { - return e.timeStamp / 1e3; - }; - } else if (delta > e.timeStamp) { - const navStart = performance.timeOrigin; - tsScaler = function(ts) { - return ts + navStart; - }; - } else { - tsScaler = function(ts) { - return ts; - }; - } - } else { - tsScaler = function() { - return Date.now(); - }; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } - return tsScaler; -} -function generatehttpSessionId() { - const len = 32; - const arr = new Uint8Array(len / 2); - window.crypto.getRandomValues(arr); - return Array.from(arr, (dec) => { - return dec.toString(16).padStart(2, "0"); - }).join(""); -} + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/configure.ts -var _Configuration = class { - constructor() { - this.autostart = false; - this.authHeader = null; - this.browserSessionId = null; - this.custIndex = null; - this.headers = null; - this.httpSessionId = null; - this.logCountThreshold = 0; - this.logDetails = false; - this.on = false; - this.resolution = 0; - this.sessionId = null; - this.time = () => Date.now(); - this.toolName = null; - this.toolVersion = null; - this.transmitInterval = 0; - this.url = ""; - this.userFromParams = null; - this.useraleVersion = null; - this.userId = null; - this.version = null; - this.websocketsEnabled = false; - if (_Configuration.instance === null) { - this.initialize(); - } - } - static getInstance() { - if (_Configuration.instance === null) { - _Configuration.instance = new _Configuration(); - } - return _Configuration.instance; - } - initialize() { - const settings = getInitialSettings(); - this.update(settings); - } - reset() { - this.initialize(); - } - update(newConfig) { - Object.keys(newConfig).forEach((option) => { - if (option === "userFromParams") { - const userParamString = newConfig[option]; - const userId = userParamString ? _Configuration.getUserIdFromParams(userParamString) : null; - if (userId) { - this["userId"] = userId; - } - } - const hasNewUserFromParams = newConfig["userFromParams"]; - const willNullifyUserId = option === "userId" && newConfig[option] === null; - if (willNullifyUserId && hasNewUserFromParams) { - return; - } - const newOption = newConfig[option]; - if (newOption !== void 0) { - this[option] = newOption; - } - }); +// ../../node_modules/.pnpm/tsup@5.12.9_@swc+core@1.11.22_@swc+helpers@0.5.17__postcss@8.5.3_ts-node@10.9.2_@swc+co_7dfb40117802bc289cccbf76535c67e5/node_modules/tsup/assets/esm_shims.js +var init_esm_shims = __esm({ + "../../node_modules/.pnpm/tsup@5.12.9_@swc+core@1.11.22_@swc+helpers@0.5.17__postcss@8.5.3_ts-node@10.9.2_@swc+co_7dfb40117802bc289cccbf76535c67e5/node_modules/tsup/assets/esm_shims.js"() { } - static getUserIdFromParams(param) { - const userField = param; - const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); - const results = window.location.href.match(regex); - if (results && results[2]) { - return decodeURIComponent(results[2].replace(/\+/g, " ")); - } - return null; - } -}; -var Configuration = _Configuration; -Configuration.instance = null; +}); // src/packageLogs.ts -var logs; -var config; -var intervalId; -var intervalType; -var intervalPath; -var intervalTimer; -var intervalCounter; -var intervalLog; -var filterHandler = null; -var mapHandler = null; -var cbHandlers = {}; +var packageLogs_exports = {}; +__export(packageLogs_exports, { + addCallbacks: () => addCallbacks, + buildAttrs: () => buildAttrs, + buildCSS: () => buildCSS, + buildPath: () => buildPath, + cbHandlers: () => cbHandlers, + extractTimeFields: () => extractTimeFields, + filterHandler: () => filterHandler, + getLocation: () => getLocation, + getScreenRes: () => getScreenRes, + getSelector: () => getSelector, + initPackager: () => initPackager, + logs: () => logs, + mapHandler: () => mapHandler, + packageCustomLog: () => packageCustomLog, + packageIntervalLog: () => packageIntervalLog, + packageLog: () => packageLog, + removeCallbacks: () => removeCallbacks, + selectorizePath: () => selectorizePath +}); function addCallbacks(...newCallbacks) { newCallbacks.forEach((source) => { let descriptors = {}; @@ -263,7 +113,7 @@ function packageLog(e, detailFcn) { pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: self.navigator.userAgent, + userAgent: self.navigator.userAgent, clientTime: timeFields.milli, microTime: timeFields.micro, location: getLocation(e), @@ -312,7 +162,7 @@ function packageCustomLog(customLog, detailFcn, userAction) { pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: self.navigator.userAgent, + userAgent: self.navigator.userAgent, clientTime: Date.now(), scrnRes: getScreenRes(), logType: "custom", @@ -372,7 +222,7 @@ function packageIntervalLog(e) { pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: self.navigator.userAgent, + userAgent: self.navigator.userAgent, count: intervalCounter, duration: timestamp - intervalTimer, startTime: intervalTimer, @@ -494,22 +344,31 @@ function buildCSS(e) { } return properties; } +var logs, config, intervalId, intervalType, intervalPath, intervalTimer, intervalCounter, intervalLog, filterHandler, mapHandler, cbHandlers; +var init_packageLogs = __esm({ + "src/packageLogs.ts"() { + "use strict"; + init_esm_shims(); + filterHandler = null; + mapHandler = null; + cbHandlers = {}; + } +}); // src/attachHandlers.ts -var events; -var bufferBools; -var bufferedEvents; -var refreshEvents; -var intervalEvents = [ - "click", - "focus", - "blur", - "input", - "change", - "mouseover", - "submit" -]; -var windowEvents = ["load", "blur", "focus"]; +var attachHandlers_exports = {}; +__export(attachHandlers_exports, { + attachHandlers: () => attachHandlers, + defineCustomDetails: () => defineCustomDetails, + defineDetails: () => defineDetails, + extractChangeDetails: () => extractChangeDetails, + extractInputDetails: () => extractInputDetails, + extractKeyboardDetails: () => extractKeyboardDetails, + extractMouseDetails: () => extractMouseDetails, + extractResizeDetails: () => extractResizeDetails, + extractScrollDetails: () => extractScrollDetails, + extractWheelDetails: () => extractWheelDetails +}); function extractMouseDetails(e) { return { clicks: e.detail, @@ -529,6 +388,11 @@ function extractKeyboardDetails(e) { meta: e.metaKey }; } +function extractInputDetails(e) { + return { + value: e.target.value + }; +} function extractChangeDetails(e) { return { value: e.target.value @@ -608,7 +472,7 @@ function attachHandlers(config3) { try { defineDetails(config3); Object.keys(events).forEach(function(ev) { - self.addEventListener( + document.addEventListener( ev, function(e) { packageLog(e, events[ev]); @@ -617,7 +481,7 @@ function attachHandlers(config3) { ); }); intervalEvents.forEach(function(ev) { - self.addEventListener( + document.addEventListener( ev, function(e) { packageIntervalLog(e); @@ -670,9 +534,26 @@ function attachHandlers(config3) { return false; } } +var events, bufferBools, bufferedEvents, refreshEvents, intervalEvents, windowEvents; +var init_attachHandlers = __esm({ + "src/attachHandlers.ts"() { + "use strict"; + init_esm_shims(); + init_packageLogs(); + intervalEvents = [ + "click", + "focus", + "blur", + "input", + "change", + "mouseover", + "submit" + ]; + windowEvents = ["load", "blur", "focus"]; + } +}); // src/utils/auth/index.ts -var authCallback = null; function updateAuthHeader(config3) { if (authCallback) { try { @@ -700,9 +581,19 @@ function verifyCallback(callback) { throw new Error("Userale auth callback must return a string"); } } +function resetAuthCallback() { + authCallback = null; +} +var authCallback; +var init_auth = __esm({ + "src/utils/auth/index.ts"() { + "use strict"; + init_esm_shims(); + authCallback = null; + } +}); // src/utils/headers/index.ts -var headersCallback = null; function updateCustomHeaders(config3) { if (headersCallback) { try { @@ -712,13 +603,277 @@ function updateCustomHeaders(config3) { } } } +function registerHeadersCallback(callback) { + try { + verifyCallback2(callback); + headersCallback = callback; + return true; + } catch (e) { + return false; + } +} +function verifyCallback2(callback) { + if (typeof callback !== "function") { + throw new Error("Userale headers callback must be a function"); + } + const result = callback(); + if (typeof result !== "object") { + throw new Error("Userale headers callback must return an object"); + } + for (const [key, value] of Object.entries(result)) { + if (typeof key !== "string" || typeof value !== "string") { + throw new Error( + "Userale header callback must return an object with string keys and values" + ); + } + } +} +function resetHeadersCallback() { + headersCallback = null; +} +var headersCallback; +var init_headers = __esm({ + "src/utils/headers/index.ts"() { + "use strict"; + init_esm_shims(); + headersCallback = null; + } +}); + +// src/utils/index.ts +var utils_exports = {}; +__export(utils_exports, { + authCallback: () => authCallback, + headersCallback: () => headersCallback, + registerAuthCallback: () => registerAuthCallback, + registerHeadersCallback: () => registerHeadersCallback, + resetAuthCallback: () => resetAuthCallback, + resetHeadersCallback: () => resetHeadersCallback, + updateAuthHeader: () => updateAuthHeader, + updateCustomHeaders: () => updateCustomHeaders, + verifyAuthCallback: () => verifyCallback, + verifyHeadersCallback: () => verifyCallback2 +}); +var init_utils = __esm({ + "src/utils/index.ts"() { + "use strict"; + init_esm_shims(); + init_auth(); + init_headers(); + } +}); + +// src/main.ts +init_esm_shims(); + +// package.json +var version = "2.4.0"; + +// src/configure.ts +init_esm_shims(); + +// src/getInitialSettings.ts +init_esm_shims(); +var sessionId = null; +var httpSessionId = null; +function getInitialSettings() { + if (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) { + const settings2 = { + authHeader: null, + autostart: true, + browserSessionId: null, + custIndex: null, + headers: null, + httpSessionId: null, + logCountThreshold: 5, + logDetails: false, + resolution: 500, + sessionId, + time: (ts) => ts !== void 0 ? ts : Date.now(), + toolName: null, + toolVersion: null, + transmitInterval: 5e3, + url: "http://localhost:8000", + useraleVersion: null, + userFromParams: null, + userId: null + }; + return settings2; + } + if (sessionId === null) { + sessionId = getsessionId( + "userAlesessionId", + "session_" + String(Date.now()) + ); + } + if (httpSessionId === null) { + httpSessionId = getsessionId( + "userAleHttpSessionId", + generatehttpSessionId() + ); + } + const script = document.currentScript || function() { + const scripts = document.getElementsByTagName("script"); + return scripts[scripts.length - 1]; + }(); + const get = script ? script.getAttribute.bind(script) : function() { + return null; + }; + const headers = get("data-headers"); + const settings = { + authHeader: get("data-auth") || null, + autostart: get("data-autostart") === "false" ? false : true, + browserSessionId: null, + custIndex: get("data-index") || null, + headers: headers ? JSON.parse(headers) : null, + httpSessionId, + logCountThreshold: +(get("data-threshold") || 5), + logDetails: get("data-log-details") === "true" ? true : false, + resolution: +(get("data-resolution") || 500), + sessionId: get("data-session") || sessionId, + time: timeStampScale(document.createEvent("CustomEvent")), + toolName: get("data-tool") || null, + toolVersion: get("data-version") || null, + transmitInterval: +(get("data-interval") || 5e3), + url: get("data-url") || "http://localhost:8000", + useraleVersion: get("data-userale-version") || null, + userFromParams: get("data-user-from-params") || null, + userId: get("data-user") || null + }; + return settings; +} +function getsessionId(sessionKey, value) { + if (self.sessionStorage.getItem(sessionKey) === null) { + self.sessionStorage.setItem(sessionKey, JSON.stringify(value)); + return value; + } + return JSON.parse(self.sessionStorage.getItem(sessionKey) || ""); +} +function timeStampScale(e) { + let tsScaler; + if (e.timeStamp && e.timeStamp > 0) { + const delta = Date.now() - e.timeStamp; + if (delta < 0) { + tsScaler = function() { + return e.timeStamp / 1e3; + }; + } else if (delta > e.timeStamp) { + const navStart = performance.timeOrigin; + tsScaler = function(ts) { + return ts + navStart; + }; + } else { + tsScaler = function(ts) { + return ts; + }; + } + } else { + tsScaler = function() { + return Date.now(); + }; + } + return tsScaler; +} +function generatehttpSessionId() { + const len = 32; + const arr = new Uint8Array(len / 2); + window.crypto.getRandomValues(arr); + return Array.from(arr, (dec) => { + return dec.toString(16).padStart(2, "0"); + }).join(""); +} + +// src/configure.ts +var _Configuration = class { + constructor() { + this.autostart = false; + this.authHeader = null; + this.browserSessionId = null; + this.custIndex = null; + this.headers = null; + this.httpSessionId = null; + this.logCountThreshold = 0; + this.logDetails = false; + this.on = false; + this.resolution = 0; + this.sessionId = null; + this.time = () => Date.now(); + this.toolName = null; + this.toolVersion = null; + this.transmitInterval = 0; + this.url = ""; + this.userFromParams = null; + this.useraleVersion = null; + this.userId = null; + this.version = null; + this.websocketsEnabled = false; + if (_Configuration.instance === null) { + this.initialize(); + } + } + static getInstance() { + if (_Configuration.instance === null) { + _Configuration.instance = new _Configuration(); + } + return _Configuration.instance; + } + initialize() { + const settings = getInitialSettings(); + this.update(settings); + } + reset() { + this.initialize(); + } + update(newConfig) { + Object.keys(newConfig).forEach((option) => { + if (option === "userFromParams") { + const userParamString = newConfig[option]; + const userId = userParamString ? _Configuration.getUserIdFromParams(userParamString) : null; + if (userId) { + this["userId"] = userId; + } + } + const hasNewUserFromParams = newConfig["userFromParams"]; + const willNullifyUserId = option === "userId" && newConfig[option] === null; + if (willNullifyUserId && hasNewUserFromParams) { + return; + } + const newOption = newConfig[option]; + if (newOption !== void 0) { + this[option] = newOption; + } + }); + } + static getUserIdFromParams(param) { + const userField = param; + const regex = new RegExp("[?&]" + userField + "(=([^&#]*)|&|#|$)"); + const results = window.location.href.match(regex); + if (results && results[2]) { + return decodeURIComponent(results[2].replace(/\+/g, " ")); + } + return null; + } +}; +var Configuration = _Configuration; +Configuration.instance = null; + +// src/main.ts +init_attachHandlers(); +init_packageLogs(); // src/sendLogs.ts +init_esm_shims(); +init_utils(); var sendIntervalId; +var wsock; function initSender(logs3, config3) { if (sendIntervalId) { clearInterval(sendIntervalId); } + const url = new URL(config3.url); + if (url.protocol === "ws:" || url.protocol === "wss:") { + wsock = new WebSocket(config3.url); + } sendIntervalId = sendOnInterval(logs3, config3); sendOnClose(logs3, config3); } @@ -745,7 +900,7 @@ function sendOnClose(logs3, config3) { wsock.send(data); } else { const headers = new Headers(); - headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); + headers.set("Content-Type", "application/json;charset=UTF-8"); if (config3.authHeader) { headers.set("Authorization", config3.authHeader.toString()); } @@ -808,6 +963,9 @@ async function sendLogs(logs3, config3, retries) { } // src/main.ts +init_attachHandlers(); +init_utils(); +init_packageLogs(); var config2 = Configuration.getInstance(); var logs2 = []; var startLoadTimestamp = Date.now(); @@ -816,7 +974,6 @@ self.onload = function() { endLoadTimestamp = Date.now(); }; var started = false; -var wsock; config2.update({ useraleVersion: version }); @@ -878,6 +1035,23 @@ function log(customLog) { return false; } } +if (typeof window !== "undefined") { + window.userale = { + start, + stop, + options, + log, + version, + details: (init_attachHandlers(), __toCommonJS(attachHandlers_exports)).defineCustomDetails, + registerAuthCallback: (init_utils(), __toCommonJS(utils_exports)).registerAuthCallback, + addCallbacks: (init_packageLogs(), __toCommonJS(packageLogs_exports)).addCallbacks, + removeCallbacks: (init_packageLogs(), __toCommonJS(packageLogs_exports)).removeCallbacks, + packageLog: (init_packageLogs(), __toCommonJS(packageLogs_exports)).packageLog, + packageCustomLog: (init_packageLogs(), __toCommonJS(packageLogs_exports)).packageCustomLog, + getSelector: (init_packageLogs(), __toCommonJS(packageLogs_exports)).getSelector, + buildPath: (init_packageLogs(), __toCommonJS(packageLogs_exports)).buildPath + }; +} export { addCallbacks, buildPath, @@ -892,7 +1066,6 @@ export { start, started, stop, - version2 as version, - wsock + version2 as version }; //# sourceMappingURL=main.mjs.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/main.mjs.map b/products/userale/packages/flagon-userale/build/main.mjs.map index 08fdcea..969d89b 100644 --- a/products/userale/packages/flagon-userale/build/main.mjs.map +++ b/products/userale/packages/flagon-userale/build/main.mjs.map @@ -1 +1 @@ -{"version":3,"sources":["../src/getInitialSettings.ts","../src/configure.ts","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n browser: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\nimport { wsock } from \"./main\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"applicaiton/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport let wsock: WebSocket;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if(typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;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I,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;","names":["settings","descriptors","log","config","options","config","config","logs","config","config","logs","version"]} \ No newline at end of file +{"version":3,"sources":["../../../node_modules/.pnpm/tsup@5.12.9_@swc+core@1.11.22_@swc+helpers@0.5.17__postcss@8.5.3_ts-node@10.9.2_@swc+co_7dfb40117802bc289cccbf76535c67e5/node_modules/tsup/assets/esm_shims.js","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/utils/index.ts","../src/main.ts","../src/configure.ts","../src/getInitialSettings.ts","../src/sendLogs.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport { fileURLToPath } from 'url'\nimport path from 'path'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {\n authCallback,\n updateAuthHeader,\n registerAuthCallback,\n resetAuthCallback,\n verifyCallback as verifyAuthCallback,\n} from \"./auth\";\nexport {\n headersCallback,\n updateCustomHeaders,\n registerHeadersCallback,\n resetHeadersCallback,\n verifyCallback as verifyHeadersCallback,\n} from \"./headers\";\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\nexport type { Logging } from \"@/types\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if(typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n\n\n// Only attach to window in IIFE builds\nif (typeof window !== \"undefined\") {\n (window as any).userale = {\n start,\n stop,\n options,\n log,\n version: userAleVersion,\n details: require(\"@/attachHandlers\").defineCustomDetails,\n registerAuthCallback: require(\"@/utils\").registerAuthCallback,\n addCallbacks: require(\"@/packageLogs\").addCallbacks,\n removeCallbacks: require(\"@/packageLogs\").removeCallbacks,\n packageLog: require(\"@/packageLogs\").packageLog,\n packageCustomLog: require(\"@/packageLogs\").packageCustomLog,\n getSelector: require(\"@/packageLogs\").getSelector,\n buildPath: require(\"@/packageLogs\").buildPath,\n };\n}","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\nlet wsock: WebSocket;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n const url = new URL(config.url);\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock = new WebSocket(config.url);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"application/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCO,SAAS,gBACX,cACH;AACA,eAAa,QAAQ,CAAC,WAAW;AAC/B,QAAI,cAAiD,CAAC;AAEtD,kBAAc,OAAO,KAAK,MAAM,EAAE,OAAO,CAACA,cAAa,QAAQ;AAC7D,MAAAA,aAAY,OAAO,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,aAAOA;AAAA,IACT,GAAG,WAAW;AAEd,WAAO,sBAAsB,MAAM,EAAE,QAAQ,CAAC,QAAQ;AACpD,YAAM,aAAa,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,UAAI,YAAY,YAAY;AAC1B,oBAAY,OAAO;AAAA,MACrB;AAAA,IACF,CAAC;AACD,WAAO,iBAAiB,YAAY,WAAW;AAAA,EACjD,CAAC;AACD,SAAO;AACT;AAMO,SAAS,gBAAgB,YAAsB;AACpD,aAAW,QAAQ,CAAC,QAAQ;AAC1B,QAAI,OAAO,UAAU,eAAe,KAAK,YAAY,GAAG,GAAG;AACzD,aAAO,WAAW;AAAA,IACpB;AAAA,EACF,CAAC;AACH;AAOO,SAAS,aACd,SACA,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,YACE;AAAA,cACE,MAAM;AAAA,cACN,SAAS,EAAE,cAAc,mBAAmB,mBAAmB;AAAA,YACjE;AAAA,YACA,OAAO,CAAC;AAAA,YACR;AAAA,UACF;AAAA,QACF;AAAA,MACF,OAAO;AACL,cAAMA,OAAM;AAAA,MACd;AAAA,IACF,GAAG,GAAG;AAAA,EACR;AACF;AAGO,IAAME,WAAU;AAMhB,SAAS,QAAc;AAC5B,MAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAIA,IAAI,OAAO,WAAW,aAAa;AACjC,EAAC,OAAe,UAAU;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,8DAA4B;AAAA,IACrC,sBAAsB,4CAAmB;AAAA,IACzC,cAAc,wDAAyB;AAAA,IACvC,iBAAiB,wDAAyB;AAAA,IAC1C,YAAY,wDAAyB;AAAA,IACrC,kBAAkB,wDAAyB;AAAA,IAC3C,aAAa,wDAAyB;AAAA,IACtC,WAAW,wDAAyB;AAAA,EACtC;AACF;","names":["descriptors","log","config","options","config","config","verifyCallback","verifyCallback","settings","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/example/server.js b/products/userale/packages/flagon-userale/example/server.js deleted file mode 100644 index 0b77731..0000000 --- a/products/userale/packages/flagon-userale/example/server.js +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const express = require("express"); -const w = require("ws"); -const bodyParser = require("body-parser"); -const fs = require("fs"); -const path = require("path"); - -const logDirectory = path.resolve(__dirname, "../logs"); -const logPath = path.resolve( - logDirectory, - "logs_" + new Date().getTime() + ".json", -); - -try { - fs.lstatSync(logDirectory); -} catch (e) { - fs.mkdirSync(logDirectory); // Create directory if it doesn't exist -} - -const wStream = fs.createWriteStream(logPath); -wStream.on("open", function () { - wStream.write("["); -}); - -let firstLog = true; - -// ~~~~~~~~ Websocket Server ~~~~~~~~~~~~~~~~ -const wss = new w.WebSocketServer({ port: 8001 }); -wss.on("connection", (ws) => { - console.log("New client connected"); - - ws.on("message", (message) => { - console.log("message type:" + typeof message); - const body = - typeof message === "string" - ? JSON.parse(message) - : JSON.parse(message.toString()); - - const isEmptyArray = Array.isArray(body) && body.length === 0; - const isEmptyObject = - typeof body === "object" && - body !== null && - Object.keys(body).length === 0; - if (isEmptyArray || isEmptyObject) return; - - console.log(body); - - let delimeter = ",\n\t"; - - if (firstLog) { - wStream.write("\n\t"); - firstLog = false; - } else { - wStream.write(delimeter); - } - - const logLength = message.length - 1; - body.forEach(function (log, i) { - if (i === logLength) { - delimeter = ""; - } - - wStream.write(JSON.stringify(log) + delimeter); - }); - }); - - ws.on("close", () => { - console.log("Client disconnected"); - }); -}); - -console.log("UserAle Websocket server running on port 8001"); -// ~~~~~~~ End Websocket Server ~~~~~~~~~~~~~~ - -// ~~~~~~~ Normal Server ~~~~~~~~~~~~~~~~~~~ -const app = express(); - -app.set("port", process.env.PORT || 8000); -app.use(function (req, res, next) { - res.header("Access-Control-Allow-Origin", "*"); - res.header("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE,OPTIONS"); - res.header( - "Access-Control-Allow-Headers", - "Content-Type, Authorization, Content-Length, X-Requested-With", - ); - - // intercept OPTIONS method - if ("OPTIONS" == req.method) { - res.sendStatus(200); - } else { - next(); - } -}); -app.use(bodyParser.urlencoded({ extended: true, limit: "100mb" })); -app.use(bodyParser.json({ limit: "100mb" })); -app.use(bodyParser.text()); -app.use("/build", express.static(path.join(__dirname, "/../build"))); -app.use("/", express.static(__dirname)); -app.set("view engine", "jade"); -app.use("/", express.static(__dirname)); - -app.get("/", function (req, res) { - res.sendFile("index.html", { root: __dirname }); -}); - -app.get("/ws", function (req, res) { - res.header("Access-Control-Allow-Origin", "*"); - res.header("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE,OPTIONS"); - res.header( - "Access-Control-Allow-Headers", - "Content-Type, Authorization, Content-Length, X-Requested-With", - ); - res.sendFile("ws-index.html", { root: __dirname }); -}); - -app.get("/no-logging", function (req, res) { - res.sendFile("no-logging.html", { root: __dirname }); -}); - -app.post("/", function (req, res) { - const body = typeof req.body === "string" ? JSON.parse(req.body) : req.body; - - const isEmptyArray = Array.isArray(body) && body.length === 0; - const isEmptyObject = - typeof body === "object" && body !== null && Object.keys(body).length === 0; - if (isEmptyArray || isEmptyObject) return; - - console.log(body); - - let delimiter = ",\n\t"; - - if (firstLog) { - wStream.write("\n\t"); - firstLog = false; - } else { - wStream.write(delimiter); - } - - const logLength = req.body.length - 1; - body.forEach(function (log, i) { - if (i === logLength) { - delimiter = ""; - } - - wStream.write(JSON.stringify(log) + delimiter); - }); - - res.sendStatus(200); -}); - -app.listen(app.get("port"), function () { - console.log("UserAle Local running on port", app.get("port")); -}); - -function closeLogServer() { - wStream.end("\n]"); - process.exit(); -} -// ~~~~~~~ End Normal Server ~~~~~~~~~~~~~ - -process.on("SIGTERM", function () { - closeLogServer(); -}); -process.on("SIGINT", function () { - closeLogServer(); -}); diff --git a/products/userale/packages/flagon-userale/package.json b/products/userale/packages/flagon-userale/package.json index cd385b4..6d1fde2 100644 --- a/products/userale/packages/flagon-userale/package.json +++ b/products/userale/packages/flagon-userale/package.json @@ -7,7 +7,8 @@ "types": "build/main.d.ts", "exports": { ".": { - "import": "./build/main.mjs" + "import": "./build/main.mjs", + "types": "./build/main.d.ts" } }, "scripts": { @@ -16,15 +17,8 @@ "check-types": "tsc --pretty --noEmit", "build": "tsc && tsup", "clean": "rm -rf ./build", - "test": "npm run test:unit && npm run test:e2e", - "test:unit": "jest -c ./test/unit/jest.config.ts", - "test:e2e": "playwright test -c ./test/e2e/playwright.config.ts", - "pretest:e2e": "rm -rf ./test/e2e/chromeData/*", - "posttest:e2e": "rm -rf ./test/e2e/chromeData/*", - "example:run": "node example/server.js", - "example:watch": "nodemon -w ./example example/server.js", + "test": "jest -c ./test/jest.config.js", "prepare": "husky", - "pretest": "npx playwright install", "commit": "cz" }, "repository": { @@ -55,7 +49,7 @@ ], "license": "Apache-2.0", "bugs": { - "url": "https://github.com/apache/flagon-useralejs/issues" + "url": "https://github.com/apache/flagon/issues" }, "homepage": "https://flagon.apache.org/", "engines": { @@ -64,8 +58,9 @@ }, "devDependencies": { "@eslint/js": "^9.2.0", - "@playwright/test": "^1.51.0", - "@types/jest": "^29.5.12", + "@jest/globals": "^29.7.0", + "@playwright/test": "^1.52.0", + "@types/jest": "^29.5.14", "@types/jsdom": "^21.1.6", "@types/node": "^20.14.2", "@types/ws": "^8.5.12", @@ -87,20 +82,18 @@ "jest-environment-jsdom": "^29.7.0", "jsdom": "^24.0.0", "jsonschema": "^1.4.1", - "nodemon": "^3.0.2", "prettier": "^3.2.5", + "ts-jest": "^29.4.0", "ts-node": "^10.9.2", "tsup": "^5.10.0", - "typescript": "^5.4.5", + "typescript": "^5.8.3", "typescript-eslint": "^7.8.0", + "whatwg-fetch": "^3.6.20", "ws": "^8.18.0" }, "config": { "commitizen": { "path": "./node_modules/cz-conventional-changelog" } - }, - "dependencies": { - "@jest/globals": "^29.7.0" } } diff --git a/products/userale/packages/flagon-userale/src/attachHandlers.ts b/products/userale/packages/flagon-userale/src/attachHandlers.ts index 18cc2cf..fd04933 100644 --- a/products/userale/packages/flagon-userale/src/attachHandlers.ts +++ b/products/userale/packages/flagon-userale/src/attachHandlers.ts @@ -201,7 +201,7 @@ export function attachHandlers(config: Configuration): boolean { defineDetails(config); (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) { - self.addEventListener( + document.addEventListener( ev, function (e) { packageLog(e, events[ev]); @@ -211,7 +211,7 @@ export function attachHandlers(config: Configuration): boolean { }); intervalEvents.forEach(function (ev) { - self.addEventListener( + document.addEventListener( ev, function (e) { packageIntervalLog(e); diff --git a/products/userale/packages/flagon-userale/src/main.ts b/products/userale/packages/flagon-userale/src/main.ts index 9019694..8ac7c92 100644 --- a/products/userale/packages/flagon-userale/src/main.ts +++ b/products/userale/packages/flagon-userale/src/main.ts @@ -33,7 +33,6 @@ self.onload = function() { }; export let started = false; -export let wsock: WebSocket; export { defineCustomDetails as details } from "@/attachHandlers"; export { registerAuthCallback as registerAuthCallback } from "@/utils"; export { @@ -44,6 +43,7 @@ export { getSelector as getSelector, buildPath as buildPath, } from "@/packageLogs"; +export type { Logging } from "@/types"; config.update({ useraleVersion: userAleVersion, @@ -144,3 +144,23 @@ export function log(customLog: Logging.CustomLog | undefined) { return false; } } + + +// Only attach to window in IIFE builds +if (typeof window !== "undefined") { + (window as any).userale = { + start, + stop, + options, + log, + version: userAleVersion, + details: require("@/attachHandlers").defineCustomDetails, + registerAuthCallback: require("@/utils").registerAuthCallback, + addCallbacks: require("@/packageLogs").addCallbacks, + removeCallbacks: require("@/packageLogs").removeCallbacks, + packageLog: require("@/packageLogs").packageLog, + packageCustomLog: require("@/packageLogs").packageCustomLog, + getSelector: require("@/packageLogs").getSelector, + buildPath: require("@/packageLogs").buildPath, + }; +} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/src/packageLogs.ts b/products/userale/packages/flagon-userale/src/packageLogs.ts index 284916c..2db876f 100644 --- a/products/userale/packages/flagon-userale/src/packageLogs.ts +++ b/products/userale/packages/flagon-userale/src/packageLogs.ts @@ -120,7 +120,7 @@ export function packageLog( pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: self.navigator.userAgent, + userAgent: self.navigator.userAgent, clientTime: timeFields.milli, microTime: timeFields.micro, location: getLocation(e), @@ -192,7 +192,7 @@ export function packageCustomLog( pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: self.navigator.userAgent, + userAgent: self.navigator.userAgent, clientTime: Date.now(), scrnRes: getScreenRes(), logType: "custom", @@ -277,7 +277,7 @@ export function packageIntervalLog(e: Event) { pageUrl: self.location.href, pageTitle: document.title, pageReferrer: document.referrer, - browser: self.navigator.userAgent, + userAgent: self.navigator.userAgent, count: intervalCounter, duration: timestamp - intervalTimer, // microseconds startTime: intervalTimer, diff --git a/products/userale/packages/flagon-userale/src/sendLogs.ts b/products/userale/packages/flagon-userale/src/sendLogs.ts index 0456e0e..3b622ca 100644 --- a/products/userale/packages/flagon-userale/src/sendLogs.ts +++ b/products/userale/packages/flagon-userale/src/sendLogs.ts @@ -18,9 +18,9 @@ import { Configuration } from "@/configure"; import { Logging } from "@/types"; import { updateAuthHeader, updateCustomHeaders } from "@/utils"; -import { wsock } from "./main"; let sendIntervalId: string | number | NodeJS.Timeout | undefined; +let wsock: WebSocket; /** * Initializes the log queue processors. @@ -32,6 +32,11 @@ export function initSender(logs: Array, config: Configuration) { clearInterval(sendIntervalId); } + const url = new URL(config.url); + if (url.protocol === "ws:" || url.protocol === "wss:") { + wsock = new WebSocket(config.url); + } + sendIntervalId = sendOnInterval(logs, config); sendOnClose(logs, config); } @@ -81,7 +86,7 @@ export function sendOnClose( wsock.send(data); } else { const headers: HeadersInit = new Headers(); - headers.set("Content-Type", "applicaiton/json;charset=UTF-8"); + headers.set("Content-Type", "application/json;charset=UTF-8"); if (config.authHeader) { headers.set("Authorization", config.authHeader.toString()); diff --git a/products/userale/packages/flagon-userale/test/e2e/spec/01-extension.spec.ts b/products/userale/packages/flagon-userale/test/e2e/spec/01-extension.spec.ts deleted file mode 100644 index b3e7ea9..0000000 --- a/products/userale/packages/flagon-userale/test/e2e/spec/01-extension.spec.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { test, expect } from "./fixtures/extension.fixture"; -import { errors } from "@playwright/test"; -import { Logging } from "@/types"; - -test.describe("Userale extension", () => { - test("doesn't log by default", async ({ page, sender }) => { - try { - const requestPromise = sender.waitForRequest( - (request) => request.method() === "POST", - { timeout: 15000 }, - ); - await page.goto("./"); - for (let i = 0; i < 5; i++) { - await page.getByText("Click Me!", { exact: true }).click(); - } - await requestPromise; - throw new Error("request made"); - } catch (err) { - expect(err).toBeInstanceOf(errors.TimeoutError); - } - }); - - test("can change url filter", async ({ sender, page, extensionId }) => { - const requestPromise = sender.waitForRequest( - (request) => request.method() === "POST", - ); - await page.goto(`chrome-extension://${extensionId}/options.html`); - // Sleep so options.js can update the html with values from local storage. - await new Promise((r) => setTimeout(r, 1000)); - await page.fill("#filter", ".*"); - await page.click("#submitOptions"); - await page.goto("./"); - for (let i = 0; i < 5; i++) { - await page.getByText("Click Me!", { exact: true }).click(); - } - // The completion of this promise means data was logged and the test passes. - await requestPromise; - }); - - test("can change loging options", async ({ sender, page, extensionId }) => { - let id = "testUser"; - - const requestPromise = sender.waitForRequest((request) => { - const postData = request.postData(); - return Boolean(postData && postData.includes("testUser")); - }); - await page.goto(`chrome-extension://${extensionId}/options.html`); - await page.waitForLoadState("load"); - await page.fill("#user", id); - await page.click("#submitOptions"); - await page.goto("./"); - for (let i = 0; i < 5; i++) { - await page.getByText("Click Me!", { exact: true }).click(); - } - - const request = await requestPromise; - const body = await request.postDataJSON(); - const log = body.find((log: Logging.JSONObject) => log.userId === id); - - expect(log).toBeTruthy; - }); - - test("can submit an issue report", async ({ - context, - sender, - page, - extensionId, - }) => { - let description = "test description 123"; - const requestPromise = sender.waitForRequest((request) => { - const postData = request.postData(); - return Boolean(postData && postData.includes(description)); - }); - await page.goto(`chrome-extension://${extensionId}/browserAction.html`); - await page.waitForLoadState("load"); - await page.fill("#issueDescription", description); - await page.click("#submitIssue"); - - const request = await requestPromise; - const body = await request.postDataJSON(); - const log: Logging.JSONObject = body.find( - (log: Logging.JSONObject) => log.type === "issue", - ); - console.log(log); - expect(log).toEqual( - expect.objectContaining({ - logType: "custom", - type: "issue", - details: { - issueType: "Bug", - issueDescription: description, - }, - }), - ); - }); -}); diff --git a/products/userale/packages/flagon-userale/test/e2e/spec/01-package.spec.ts b/products/userale/packages/flagon-userale/test/e2e/spec/01-package.spec.ts deleted file mode 100644 index 0cb0076..0000000 --- a/products/userale/packages/flagon-userale/test/e2e/spec/01-package.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { test, expect } from "./fixtures/extension.fixture"; - -test.beforeEach(async ({ page }) => { - const requestPromise = page.waitForRequest( - (request) => request.method() === "POST", - ); - await page.goto("./"); - await requestPromise; -}); - -test.describe("Userale custom logging", () => { - test("executes added callbacks", async ({ page }) => { - const requestPromise = page.waitForRequest( - (request) => request.method() === "POST", - ); - await page.getByText("Click Me!", { exact: true }).click(); - const request = await requestPromise; - const body = await request.postDataJSON(); - - const buttonClickLog = body.find( - (log: { target: string; logType: string }) => - log.target === "button#test_button" && log.logType === "custom", - ); - expect(buttonClickLog).toHaveProperty("customLabel"); - - const actualValue = buttonClickLog.customLabel; - const expectedValue = "map & packageLog Example"; - expect(actualValue).toBe(expectedValue); - }); -}); diff --git a/products/userale/packages/flagon-userale/test/e2e/spec/fixtures/extension.fixture.ts b/products/userale/packages/flagon-userale/test/e2e/spec/fixtures/extension.fixture.ts deleted file mode 100644 index 12973ea..0000000 --- a/products/userale/packages/flagon-userale/test/e2e/spec/fixtures/extension.fixture.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { - Page, - test as base, - chromium, - type BrowserContext, -} from "@playwright/test"; -import path from "path"; - -export const test = base.extend<{ - context: BrowserContext; - sender: Page; - extensionId: string; -}>({ - context: async ({ baseURL, context }, use) => { - if (baseURL?.includes("no-logging")) { - const extPath = path.join( - __dirname, - "../../../../build/UserALEWebExtension/", - ); - const dataPath = path.join(__dirname, "../../chromeData/"); - const extContext = await chromium.launchPersistentContext(dataPath, { - headless: false, - args: [ - `--disable-extensions-except=${extPath}`, - `--load-extension=${extPath}`, - ], - }); - await use(extContext); - await extContext.close(); - } else { - await use(context); - await context.close(); - } - }, - sender: async ({ context, baseURL, page }, use) => { - let sender: Page = page; - if (baseURL?.includes("no-logging")) { - // for manifest v2: - [sender] = context.backgroundPages(); - if (baseURL?.includes("no-logging") && !sender) - sender = await context.waitForEvent("backgroundpage"); - } - - await use(sender); - }, - extensionId: async ({ baseURL, sender }, use) => { - let extensionId = ""; - if (baseURL?.includes("no-logging")) { - extensionId = sender.url().split("/")[2]; - } - use(extensionId); - }, -}); - -export const expect = test.expect; diff --git a/products/userale/packages/flagon-userale/test/unit/jest.config.ts b/products/userale/packages/flagon-userale/test/jest.config.js similarity index 54% rename from products/userale/packages/flagon-userale/test/unit/jest.config.ts rename to products/userale/packages/flagon-userale/test/jest.config.js index c0dd83a..e38b6cb 100644 --- a/products/userale/packages/flagon-userale/test/unit/jest.config.ts +++ b/products/userale/packages/flagon-userale/test/jest.config.js @@ -22,27 +22,17 @@ * https://jestjs.io/docs/configuration */ -import type { Config } from "jest"; - -const config: Config = { - // The root directory that Jest should scan for tests and modules within - rootDir: "../../", - - // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module +/** @type {import('jest').Config} */ +const config = { + rootDir: "../", + preset: "ts-jest", moduleNameMapper: { "^@/(.*)$": "/src/$1", }, - - // The paths to modules that run some code to configure or set up the testing environment before each test - setupFiles: ["/test/unit/jest.setup.js"], - - // The test environment that will be used for testing - // Turned off to avoid jsdom invoking node 'ws' module, which can't be used in browser - // Instead we specify jsdom environment on a per-test-file basis - //testEnvironment: "jsdom", - - // The glob patterns Jest uses to detect test files - testMatch: ["/test/unit/spec/(*.)+(spec|test).[tj]s?(x)"], + setupFiles: ["/test/jest.setup.js"], + testMatch: ["/test/spec/(*.)+(spec|test).[tj]s?(x)"], + // Optionally specify this if you want default jsdom behavior: + // testEnvironment: "jsdom", }; -export default config; +module.exports = config; diff --git a/products/userale/packages/flagon-userale/test/unit/jest.setup.js b/products/userale/packages/flagon-userale/test/jest.setup.js similarity index 100% rename from products/userale/packages/flagon-userale/test/unit/jest.setup.js rename to products/userale/packages/flagon-userale/test/jest.setup.js diff --git a/products/userale/packages/flagon-userale/test/unit/spec/attachHandlers.spec.ts b/products/userale/packages/flagon-userale/test/spec/attachHandlers.spec.ts similarity index 100% rename from products/userale/packages/flagon-userale/test/unit/spec/attachHandlers.spec.ts rename to products/userale/packages/flagon-userale/test/spec/attachHandlers.spec.ts diff --git a/products/userale/packages/flagon-userale/test/unit/spec/auth.spec.ts b/products/userale/packages/flagon-userale/test/spec/auth.spec.ts similarity index 100% rename from products/userale/packages/flagon-userale/test/unit/spec/auth.spec.ts rename to products/userale/packages/flagon-userale/test/spec/auth.spec.ts diff --git a/products/userale/packages/flagon-userale/test/unit/spec/configure.spec.ts b/products/userale/packages/flagon-userale/test/spec/configure.spec.ts similarity index 100% rename from products/userale/packages/flagon-userale/test/unit/spec/configure.spec.ts rename to products/userale/packages/flagon-userale/test/spec/configure.spec.ts diff --git a/products/userale/packages/flagon-userale/test/unit/spec/getInitialSettings.spec.ts b/products/userale/packages/flagon-userale/test/spec/getInitialSettings.spec.ts similarity index 100% rename from products/userale/packages/flagon-userale/test/unit/spec/getInitialSettings.spec.ts rename to products/userale/packages/flagon-userale/test/spec/getInitialSettings.spec.ts diff --git a/products/userale/packages/flagon-userale/test/unit/spec/getInitialSettings_fetchAll.html b/products/userale/packages/flagon-userale/test/spec/getInitialSettings_fetchAll.html similarity index 95% rename from products/userale/packages/flagon-userale/test/unit/spec/getInitialSettings_fetchAll.html rename to products/userale/packages/flagon-userale/test/spec/getInitialSettings_fetchAll.html index 5f961aa..ade78da 100644 --- a/products/userale/packages/flagon-userale/test/unit/spec/getInitialSettings_fetchAll.html +++ b/products/userale/packages/flagon-userale/test/spec/getInitialSettings_fetchAll.html @@ -26,7 +26,7 @@ data-log-details="false" data-resolution="100" data-tool="testtool" - src="../../../build/userale-2.4.0.min.js" + src="../../build/main.global.js" > diff --git a/products/userale/packages/flagon-userale/test/unit/spec/getInitialSettings_userParam.html b/products/userale/packages/flagon-userale/test/spec/getInitialSettings_userParam.html similarity index 95% rename from products/userale/packages/flagon-userale/test/unit/spec/getInitialSettings_userParam.html rename to products/userale/packages/flagon-userale/test/spec/getInitialSettings_userParam.html index 94928d0..90639b2 100644 --- a/products/userale/packages/flagon-userale/test/unit/spec/getInitialSettings_userParam.html +++ b/products/userale/packages/flagon-userale/test/spec/getInitialSettings_userParam.html @@ -19,7 +19,7 @@ diff --git a/products/userale/packages/flagon-userale/test/unit/spec/headers.spec.ts b/products/userale/packages/flagon-userale/test/spec/headers.spec.ts similarity index 100% rename from products/userale/packages/flagon-userale/test/unit/spec/headers.spec.ts rename to products/userale/packages/flagon-userale/test/spec/headers.spec.ts diff --git a/products/userale/packages/flagon-userale/test/unit/spec/main.html b/products/userale/packages/flagon-userale/test/spec/main.html similarity index 93% rename from products/userale/packages/flagon-userale/test/unit/spec/main.html rename to products/userale/packages/flagon-userale/test/spec/main.html index 5807250..b4b99fe 100644 --- a/products/userale/packages/flagon-userale/test/unit/spec/main.html +++ b/products/userale/packages/flagon-userale/test/spec/main.html @@ -17,7 +17,7 @@ - + diff --git a/products/userale/packages/flagon-userale/test/unit/spec/main.spec.ts b/products/userale/packages/flagon-userale/test/spec/main.spec.ts similarity index 100% rename from products/userale/packages/flagon-userale/test/unit/spec/main.spec.ts rename to products/userale/packages/flagon-userale/test/spec/main.spec.ts diff --git a/products/userale/packages/flagon-userale/test/unit/spec/packageLogs.spec.ts b/products/userale/packages/flagon-userale/test/spec/packageLogs.spec.ts similarity index 100% rename from products/userale/packages/flagon-userale/test/unit/spec/packageLogs.spec.ts rename to products/userale/packages/flagon-userale/test/spec/packageLogs.spec.ts diff --git a/products/userale/packages/flagon-userale/test/unit/spec/sendLogs.spec.ts b/products/userale/packages/flagon-userale/test/spec/sendLogs.spec.ts similarity index 85% rename from products/userale/packages/flagon-userale/test/unit/spec/sendLogs.spec.ts rename to products/userale/packages/flagon-userale/test/spec/sendLogs.spec.ts index d8ff6e8..a2c944f 100644 --- a/products/userale/packages/flagon-userale/test/unit/spec/sendLogs.spec.ts +++ b/products/userale/packages/flagon-userale/test/spec/sendLogs.spec.ts @@ -17,6 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import "whatwg-fetch"; import { Configuration } from "@/configure"; import { initSender, sendOnInterval, sendOnClose } from "@/sendLogs"; import { registerAuthCallback, registerHeadersCallback } from "@/utils"; @@ -46,7 +47,7 @@ describe("sendLogs", () => { config.update({ on: true, transmitInterval: 500, - url: "test", + url: "http://test.com", logCountThreshold: 2, }); const logs: Array = []; @@ -78,7 +79,7 @@ describe("sendLogs", () => { config.update({ on: true, transmitInterval: 500, - url: "test", + url: "http://test.com", logCountThreshold: 1, }); jest.useFakeTimers(); @@ -104,37 +105,30 @@ describe("sendLogs", () => { }); it("sends logs on page exit with fetch", () => { - const fetchSpy = jest.fn().mockImplementation(() => - Promise.resolve({ - ok: true, - foo: "bar", - }), - ); - global.fetch = fetchSpy; - - config.update({ on: true, url: "test" }); + const fetchSpy = jest.spyOn(global, "fetch"); + + config.update({ on: true, url: "http://test.com" }); sendOnClose([], config); - config.update({ on: true, url: "test" }); + config.update({ on: true, url: "http://test.com" }); sendOnClose([{ foo: "bar" }], config); global.window.dispatchEvent(new window.CustomEvent("pagehide")); expect(fetchSpy).toHaveBeenCalledTimes(1); + + fetchSpy.mockRestore(); }); - it("does not send logs on page exit when config is off", () => { - const fetchSpy = jest.fn().mockImplementation(() => - Promise.resolve({ - ok: true, - foo: "bar", - }), - ); - global.fetch = fetchSpy; + it("does not send logs on page exit when config is off", () => { + const fetchSpy = jest.spyOn(global, "fetch"); + config.update({ on: false, url: "test" }); sendOnClose([{ foo: "bar" }], config); global.window.dispatchEvent(new window.CustomEvent("pagehide")); expect(fetchSpy).not.toHaveBeenCalled(); + + fetchSpy.mockRestore(); }); it("sends logs with proper auth header when using registerAuthCallback", (done) => { @@ -142,44 +136,41 @@ describe("sendLogs", () => { config.update({ on: true, transmitInterval: 500, - url: "test", + url: "http://test.com", logCountThreshold: 1, }); jest.useFakeTimers(); - - // Mock the authCallback function + const authCallback = jest.fn().mockReturnValue("fakeAuthToken"); - - // Register the authCallback registerAuthCallback(authCallback); - - // Initialize sender with logs and config + initSender(logs, config); - - // Simulate log entry logs.push({ foo: "bar" }); - - // Trigger interval to send logs + jest.advanceTimersByTime(config.transmitInterval); - - // Verify that the request has the proper auth header + expect(xhrMock.send).toHaveBeenCalledTimes(1); - expect(xhrMock.setRequestHeader).toHaveBeenCalledWith( - "Authorization", - "fakeAuthToken", + + // Filter only calls to setRequestHeader with 'Authorization' + const calls = (xhrMock.setRequestHeader as jest.Mock).mock.calls; + const authHeaderCall = calls.find( + ([header]) => header.toLowerCase() === "authorization" ); - - // Restore XMLHttpRequest and clock + + expect(authHeaderCall?.[0].toLowerCase()).toBe("authorization"); + expect(authHeaderCall?.[1]).toBe("fakeAuthToken"); + jest.useRealTimers(); done(); }); + it("sends logs with proper custom headers when using registerHeadersCallback", (done) => { const logs: Array = []; config.update({ on: true, transmitInterval: 500, - url: "test", + url: "http://test.com", logCountThreshold: 1, }); jest.useFakeTimers(); diff --git a/products/userale/packages/flagon-userale/test/unit/spec/testUtils.ts b/products/userale/packages/flagon-userale/test/spec/testUtils.ts similarity index 100% rename from products/userale/packages/flagon-userale/test/unit/spec/testUtils.ts rename to products/userale/packages/flagon-userale/test/spec/testUtils.ts diff --git a/products/userale/test/e2e/playwright.config.ts b/products/userale/test/e2e/playwright.config.ts deleted file mode 100644 index 79bd15e..0000000 --- a/products/userale/test/e2e/playwright.config.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { defineConfig } from "@playwright/test"; - -/** - * See https://playwright.dev/docs/test-configuration. - */ -export default defineConfig({ - testDir: "spec", - - fullyParallel: false, - workers: 1, - /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, - /* Retry on CI only */ - retries: process.env.CI ? 2 : 0, - /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: "html", - /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ - use: { - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: "on-first-retry", - }, - - projects: [ - { - name: "package-chromium", - testIgnore: ["*extension*", "*websocket*"], - use: { - browserName: "chromium", - baseURL: "http://127.0.0.1:8000/", - }, - }, - { - name: "package-firefox", - testIgnore: ["*extension*", "*websocket*"], - use: { - browserName: "firefox", - baseURL: "http://127.0.0.1:8000/", - }, - }, - { - name: "extension-chromium", - testIgnore: ["*package*", "*websocket*"], - use: { - browserName: "chromium", - baseURL: "http://127.0.0.1:8000/no-logging/", - }, - }, - { - name: "websocket", - testMatch: "*websocket*", - use: { - browserName: "chromium", - headless: false, - baseURL: "http://127.0.0.1:8000/ws", - }, - }, - ], - - /* Run your local dev server before starting the tests */ - webServer: [ - { - command: "npm run example:run", - url: "http://127.0.0.1:8000", - reuseExistingServer: !process.env.CI, - }, - ] -}); diff --git a/products/userale/test/e2e/spec/02-shared.spec.ts b/products/userale/test/e2e/spec/02-shared.spec.ts deleted file mode 100644 index eb65102..0000000 --- a/products/userale/test/e2e/spec/02-shared.spec.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { validate } from "jsonschema"; -import { test, expect } from "./fixtures/extension.fixture"; -import { Logging } from "@/types"; - -test.describe("Userale logging", () => { - test("sends a page load log", async ({ page, sender }) => { - const requestPromise = sender.waitForRequest((request) => { - const postData = request.postData(); - return Boolean(postData && postData.includes("pageLoadTime")); - }); - await page.goto("./"); - for (let i = 0; i < 6; i++) { - await page.getByText("Click Me!", { exact: true }).click(); - } - const request = await requestPromise; - - const body = await request.postDataJSON(); - - const pageLoadLog = body.find( - (log: Logging.JSONObject) => log.type === "load", - ); - expect(pageLoadLog).toEqual( - expect.objectContaining({ - logType: "custom", - type: "load", - }), - ); - expect(pageLoadLog["details"]["pageLoadTime"]).toBeGreaterThan(0); - }); - - test("builds the correct path in a log", async ({ page, sender }) => { - const requestPromise = sender.waitForRequest((request) => { - const postData = request.postData(); - console.log(postData); - return Boolean(postData && postData.includes("button#test_button")); - }); - await page.goto("./"); - for (let i = 0; i < 6; i++) { - await page.getByText("Click Me!", { exact: true }).click(); - } - const request = await requestPromise; - const body = await request.postDataJSON(); - - const buttonClickLog = body.find( - (log: Logging.JSONObject) => log.target === "button#test_button", - ); - const actualPath = buttonClickLog.path; - const expectedPath = [ - "button#test_button", - "div.container", - "body", - "html", - "#document", - "Window", - ]; - expect(actualPath).toEqual(expectedPath); - }); - - test("produces valid logs", async ({ page, sender }) => { - const requestPromise = sender.waitForRequest( - (request) => request.method() === "POST", - ); - await page.goto("./"); - for (let i = 0; i < 6; i++) { - await page.getByText("Click Me!", { exact: true }).click(); - } - const request = await requestPromise; - const body = await request.postDataJSON(); - - var schema = require("../../../example/log.schema.json"); - for (const log of body) { - if (log.logType == "raw" || log.logType == "custom") { - const result = validate(log, schema); - expect(result.valid).toBe(true); - } - } - }); -}); diff --git a/products/userale/test/e2e/spec/03-websocket.spec.ts b/products/userale/test/e2e/spec/03-websocket.spec.ts deleted file mode 100644 index 4093d28..0000000 --- a/products/userale/test/e2e/spec/03-websocket.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { test, expect } from "./fixtures/extension.fixture"; - -test.describe("Userale logging", () => { - test("should connect to WebSocket server", async ({ page }) => { - page.on("websocket", ws => { - console.log(`WebSocket opened with URL: ${ws.url()}`); - expect(ws.url()).toBe("ws://localhost:8001/"); - }) - - const wsPromise = page.waitForEvent("websocket"); - - await page.goto("http://127.0.0.1:8000/ws"); - for (let i = 0; i < 6; i++) { - await page.getByText("Click Me!", { exact: true }).click(); - } - - const ws = await wsPromise; - const message = ws.waitForEvent("framesent", { predicate: ev => ev.payload.includes("\"logType\":\"custom\"") }); - expect(await message).toEqual(expect.objectContaining({ - payload: expect.stringContaining("\"logType\":\"custom\""), - })); - }); -}); diff --git a/products/userale/test/e2e/spec/fixtures/extension.fixture.ts b/products/userale/test/e2e/spec/fixtures/extension.fixture.ts deleted file mode 100644 index 12973ea..0000000 --- a/products/userale/test/e2e/spec/fixtures/extension.fixture.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { - Page, - test as base, - chromium, - type BrowserContext, -} from "@playwright/test"; -import path from "path"; - -export const test = base.extend<{ - context: BrowserContext; - sender: Page; - extensionId: string; -}>({ - context: async ({ baseURL, context }, use) => { - if (baseURL?.includes("no-logging")) { - const extPath = path.join( - __dirname, - "../../../../build/UserALEWebExtension/", - ); - const dataPath = path.join(__dirname, "../../chromeData/"); - const extContext = await chromium.launchPersistentContext(dataPath, { - headless: false, - args: [ - `--disable-extensions-except=${extPath}`, - `--load-extension=${extPath}`, - ], - }); - await use(extContext); - await extContext.close(); - } else { - await use(context); - await context.close(); - } - }, - sender: async ({ context, baseURL, page }, use) => { - let sender: Page = page; - if (baseURL?.includes("no-logging")) { - // for manifest v2: - [sender] = context.backgroundPages(); - if (baseURL?.includes("no-logging") && !sender) - sender = await context.waitForEvent("backgroundpage"); - } - - await use(sender); - }, - extensionId: async ({ baseURL, sender }, use) => { - let extensionId = ""; - if (baseURL?.includes("no-logging")) { - extensionId = sender.url().split("/")[2]; - } - use(extensionId); - }, -}); - -export const expect = test.expect; diff --git a/products/userale/packages/flagon-userale/test/e2e/playwright.config.ts b/products/userale/test/playwright.config.ts similarity index 91% rename from products/userale/packages/flagon-userale/test/e2e/playwright.config.ts rename to products/userale/test/playwright.config.ts index 79bd15e..3e42e64 100644 --- a/products/userale/packages/flagon-userale/test/e2e/playwright.config.ts +++ b/products/userale/test/playwright.config.ts @@ -19,6 +19,8 @@ import { defineConfig } from "@playwright/test"; +process.env.PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS = '1'; + /** * See https://playwright.dev/docs/test-configuration. */ @@ -69,18 +71,17 @@ export default defineConfig({ testMatch: "*websocket*", use: { browserName: "chromium", - headless: false, baseURL: "http://127.0.0.1:8000/ws", }, }, ], /* Run your local dev server before starting the tests */ - webServer: [ + webServer: { - command: "npm run example:run", + command: "pnpm run example:run", url: "http://127.0.0.1:8000", - reuseExistingServer: !process.env.CI, - }, - ] + reuseExistingServer: false, + gracefulShutdown: { signal: 'SIGTERM', timeout: 1000 } + } }); diff --git a/products/userale/test/spec/01-extension.spec.ts b/products/userale/test/spec/01-extension.spec.ts new file mode 100644 index 0000000..2bc1c1d --- /dev/null +++ b/products/userale/test/spec/01-extension.spec.ts @@ -0,0 +1,38 @@ +import { test, expect } from "./fixtures/extension.fixture"; + +test.describe("Userale extension", () => { + test("doesn't log by default", async ({ page, waitForPostRequest }) => { + const timeout = 3000; + const postPromise = waitForPostRequest(); + + await page.goto("./"); + for (let i = 0; i < 5; i++) { + await page.getByText("Click Me!", { exact: true }).click(); + } + + const result = await Promise.race([ + postPromise.then(() => "request-made"), + new Promise((resolve) => setTimeout(() => resolve("no-request"), timeout)), + ]); + + expect(result).toBe("no-request"); + }); + + test("can change url filter", async ({ page, extensionId, waitForPostRequest }) => { + const postPromise = waitForPostRequest(); + + await page.goto(`chrome-extension://${extensionId}/options.html`); + await page.locator("#allowlist").fill(".*"); + await page.getByRole("button", { name: "Save Changes" }).click(); + + await page.goto("./"); + for (let i = 0; i < 5; i++) { + await page.getByText("Click Me!", { exact: true }).click(); + } + + const req = await postPromise; + const body = req.postDataJSON(); + + expect(Array.isArray(body)).toBe(true); + }); +}); diff --git a/products/userale/test/spec/01-package.spec.ts b/products/userale/test/spec/01-package.spec.ts new file mode 100644 index 0000000..4fe1226 --- /dev/null +++ b/products/userale/test/spec/01-package.spec.ts @@ -0,0 +1,26 @@ +import { test, expect } from "./fixtures/extension.fixture"; + +test.describe("Userale custom logging", () => { + test("executes added callbacks", async ({ page, waitForPostRequest }) => { + const postPromise = waitForPostRequest(); + + await page.goto("./"); + for (let i = 0; i < 10; i++) { + await page.getByText("Click Me!", { exact: true }).click(); + } + + const req = await postPromise; + const body = req.postDataJSON(); + + const buttonClickLog = body.find( + (log: any) => + log.target === "button#test_button" && log.logType === "custom" + ); + + expect(buttonClickLog).toHaveProperty("customLabel"); + + const actualValue = buttonClickLog.customLabel; + const expectedValue = "map & packageLog Example"; + expect(actualValue).toBe(expectedValue); + }); +}); diff --git a/products/userale/packages/flagon-userale/test/e2e/spec/02-shared.spec.ts b/products/userale/test/spec/02-shared.spec.ts similarity index 59% rename from products/userale/packages/flagon-userale/test/e2e/spec/02-shared.spec.ts rename to products/userale/test/spec/02-shared.spec.ts index eb65102..1558531 100644 --- a/products/userale/packages/flagon-userale/test/e2e/spec/02-shared.spec.ts +++ b/products/userale/test/spec/02-shared.spec.ts @@ -16,50 +16,49 @@ */ import { validate } from "jsonschema"; import { test, expect } from "./fixtures/extension.fixture"; -import { Logging } from "@/types"; test.describe("Userale logging", () => { - test("sends a page load log", async ({ page, sender }) => { - const requestPromise = sender.waitForRequest((request) => { - const postData = request.postData(); - return Boolean(postData && postData.includes("pageLoadTime")); - }); + test("sends a page load log", async ({ page, waitForPostRequest }) => { + const requestPromise = waitForPostRequest(); + await page.goto("./"); for (let i = 0; i < 6; i++) { await page.getByText("Click Me!", { exact: true }).click(); } - const request = await requestPromise; - - const body = await request.postDataJSON(); - + + const req = await requestPromise; + const body = req.postDataJSON(); + const pageLoadLog = body.find( - (log: Logging.JSONObject) => log.type === "load", + (log: any) => log.type === "load" ); + expect(pageLoadLog).toEqual( expect.objectContaining({ logType: "custom", type: "load", - }), + }) ); - expect(pageLoadLog["details"]["pageLoadTime"]).toBeGreaterThan(0); + + expect(pageLoadLog.details.pageLoadTime).toBeGreaterThan(0); }); + + + test("builds the correct path in a log", async ({ page, waitForPostRequest }) => { + const requestPromise = waitForPostRequest(); - test("builds the correct path in a log", async ({ page, sender }) => { - const requestPromise = sender.waitForRequest((request) => { - const postData = request.postData(); - console.log(postData); - return Boolean(postData && postData.includes("button#test_button")); - }); await page.goto("./"); for (let i = 0; i < 6; i++) { await page.getByText("Click Me!", { exact: true }).click(); } - const request = await requestPromise; - const body = await request.postDataJSON(); + + const req = await requestPromise; + const body = req.postDataJSON(); const buttonClickLog = body.find( - (log: Logging.JSONObject) => log.target === "button#test_button", + (log: any) => log.target === "button#test_button" ); + const actualPath = buttonClickLog.path; const expectedPath = [ "button#test_button", @@ -69,24 +68,30 @@ test.describe("Userale logging", () => { "#document", "Window", ]; + expect(actualPath).toEqual(expectedPath); }); - test("produces valid logs", async ({ page, sender }) => { - const requestPromise = sender.waitForRequest( - (request) => request.method() === "POST", - ); + test("produces valid logs", async ({ page, waitForPostRequest }) => { + const requestPromise = waitForPostRequest(); + await page.goto("./"); for (let i = 0; i < 6; i++) { await page.getByText("Click Me!", { exact: true }).click(); } - const request = await requestPromise; - const body = await request.postDataJSON(); - var schema = require("../../../example/log.schema.json"); + const req = await requestPromise; + const body = req.postDataJSON(); + + const schema = require("../../example/log.schema.json"); + for (const log of body) { - if (log.logType == "raw" || log.logType == "custom") { + if (log.logType === "raw" || log.logType === "custom") { const result = validate(log, schema); + if(!result.valid) { + console.error(`Schema validation failed for log:`, log); + console.error(`Errors:`, result.errors); + } expect(result.valid).toBe(true); } } diff --git a/products/userale/packages/flagon-userale/test/e2e/spec/03-websocket.spec.ts b/products/userale/test/spec/03-websocket.spec.ts similarity index 70% rename from products/userale/packages/flagon-userale/test/e2e/spec/03-websocket.spec.ts rename to products/userale/test/spec/03-websocket.spec.ts index 4093d28..fca14b2 100644 --- a/products/userale/packages/flagon-userale/test/e2e/spec/03-websocket.spec.ts +++ b/products/userale/test/spec/03-websocket.spec.ts @@ -17,12 +17,7 @@ import { test, expect } from "./fixtures/extension.fixture"; test.describe("Userale logging", () => { - test("should connect to WebSocket server", async ({ page }) => { - page.on("websocket", ws => { - console.log(`WebSocket opened with URL: ${ws.url()}`); - expect(ws.url()).toBe("ws://localhost:8001/"); - }) - + test("connects to WebSocket server and sends logs", async ({ page }) => { const wsPromise = page.waitForEvent("websocket"); await page.goto("http://127.0.0.1:8000/ws"); @@ -31,9 +26,16 @@ test.describe("Userale logging", () => { } const ws = await wsPromise; - const message = ws.waitForEvent("framesent", { predicate: ev => ev.payload.includes("\"logType\":\"custom\"") }); - expect(await message).toEqual(expect.objectContaining({ - payload: expect.stringContaining("\"logType\":\"custom\""), - })); + expect(ws.url()).toBe("ws://localhost:8000/"); + + const message = await ws.waitForEvent("framesent", { + predicate: (event) => event.payload.includes('"logType":"custom"'), + }); + + expect(message).toEqual( + expect.objectContaining({ + payload: expect.stringContaining('"logType":"custom"'), + }) + ); }); }); diff --git a/products/userale/test/spec/fixtures/extension.fixture.ts b/products/userale/test/spec/fixtures/extension.fixture.ts new file mode 100644 index 0000000..97030b9 --- /dev/null +++ b/products/userale/test/spec/fixtures/extension.fixture.ts @@ -0,0 +1,61 @@ +import { test as base, chromium, type BrowserContext, type Page, type Request } from '@playwright/test'; +import path from 'path'; +import os from 'os'; + +export const test = base.extend<{ + context: BrowserContext; + extensionId: string; + waitForPostRequest: ( + filterFn?: (req: Request) => boolean + ) => Promise; +}>({ + context: async ({ }, use) => { + const pathToExtension = path.join( + __dirname, + "../../../packages/flagon-userale-ext/build/chrome-mv3-prod/" + ); + const context = await chromium.launchPersistentContext(os.tmpdir(), { + channel: 'chromium', + args: [ + `--disable-extensions-except=${pathToExtension}`, + `--load-extension=${pathToExtension}`, + ], + }); + await use(context); + await context.close(); + }, + + extensionId: async ({ context }, use) => { + let [background] = context.serviceWorkers(); + if (!background) + background = await context.waitForEvent('serviceworker'); + + const extensionId = background.url().split('/')[2]; + await use(extensionId); + }, + + waitForPostRequest: async ({ context }, use) => { + const waitForPostRequest = (filterFn?: (req: Request) => boolean) => { + return new Promise((resolve) => { + const listener = async (req: Request) => { + const url = req.url(); + const method = req.method(); + // console.log(req); + + if (!url.startsWith('http://localhost:8000') || method !== 'POST') return; + + if (!filterFn || filterFn(req)) { + context.off('request', listener); // cleanup + resolve(req); + } + }; + + context.on('request', listener); + }); + }; + + await use(waitForPostRequest); + }, +}); + +export const expect = test.expect; diff --git a/products/userale/tsconfig.json b/products/userale/tsconfig.json new file mode 100644 index 0000000..71bad78 --- /dev/null +++ b/products/userale/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "CommonJS", + "lib": ["DOM", "ESNext"], + "strict": true, + "esModuleInterop": true, + "moduleResolution": "Node", + "types": ["node", "playwright"], + "skipLibCheck": true + }, + "include": ["**/*.ts", "packages/flagon-userale/test/jest.config.js"] + } + \ No newline at end of file From c09677d25e184bf3baf388c8f1e9fb71a24b27c2 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Tue, 24 Jun 2025 15:47:25 -0700 Subject: [PATCH 18/20] Move from husky to pre-commit --- .husky/pre-commit | 83 ------- .pre-commit-config.yaml | 30 +++ eslint.config.js | 34 --- products/userale/eslint.config.js | 50 ++++ products/userale/package.json | 11 +- .../src/background/index.ts | 66 ++--- .../src/background/messages/config_change.ts | 22 +- .../src/background/ports/log.ts | 34 +-- .../flagon-userale-ext/src/content.ts | 40 +-- .../src/options/logging.tsx | 2 +- .../packages/flagon-userale-ext/src/popup.tsx | 14 +- .../flagon-userale-ext/src/utils/messaging.ts | 16 +- .../flagon-userale-ext/src/utils/storage.ts | 6 +- .../packages/flagon-userale-ext/tsconfig.json | 26 +- .../packages/flagon-userale/.eslintrc.json | 30 --- .../packages/flagon-userale/.husky/pre-commit | 80 ------ .../flagon-userale/build/attachHandlers.d.ts | 81 +++++++ .../flagon-userale/build/configure.d.ts | 46 ++++ .../build/getInitialSettings.d.ts | 21 ++ .../packages/flagon-userale/build/main.d.ts | 228 +----------------- .../flagon-userale/build/main.global.js | 208 +++------------- .../flagon-userale/build/main.global.js.map | 2 +- .../packages/flagon-userale/build/main.mjs | 227 +++-------------- .../flagon-userale/build/main.mjs.map | 2 +- .../flagon-userale/build/packageLogs.d.ts | 106 ++++++++ .../flagon-userale/build/sendLogs.d.ts | 26 ++ .../build/utils/auth/index.d.ts | 31 +++ .../build/utils/headers/index.d.ts | 31 +++ .../flagon-userale/build/utils/index.d.ts | 3 + .../packages/flagon-userale/eslint.config.ts | 29 --- .../example/react-app-example/src/App.js | 43 ++-- .../example/react-app-example/src/index.js | 12 +- .../react-app-example/src/setupTests.js | 2 +- .../flagon-userale/example/test-client.js | 32 +++ .../packages/flagon-userale/package.json | 18 +- .../flagon-userale/src/getInitialSettings.ts | 76 +++--- .../packages/flagon-userale/src/main.ts | 35 ++- .../packages/flagon-userale/src/sendLogs.ts | 4 +- .../packages/flagon-userale/test/globals.d.ts | 2 + .../test/{jest.config.js => jest.config.ts} | 8 + .../test/spec/attachHandlers.spec.ts | 4 +- .../flagon-userale/test/spec/sendLogs.spec.ts | 22 +- .../packages/flagon-userale/tsconfig.json | 67 ++--- .../flagon-userale/tsconfig.test.json | 9 + .../packages/flagon-userale/tsup.config.js | 2 +- .../test/spec/fixtures/extension.fixture.ts | 2 +- products/userale/tsconfig.base.json | 18 ++ products/userale/tsconfig.json | 30 ++- 48 files changed, 858 insertions(+), 1113 deletions(-) delete mode 100755 .husky/pre-commit create mode 100644 .pre-commit-config.yaml delete mode 100644 eslint.config.js create mode 100644 products/userale/eslint.config.js delete mode 100644 products/userale/packages/flagon-userale/.eslintrc.json delete mode 100644 products/userale/packages/flagon-userale/.husky/pre-commit create mode 100644 products/userale/packages/flagon-userale/build/attachHandlers.d.ts create mode 100644 products/userale/packages/flagon-userale/build/configure.d.ts create mode 100644 products/userale/packages/flagon-userale/build/getInitialSettings.d.ts create mode 100644 products/userale/packages/flagon-userale/build/packageLogs.d.ts create mode 100644 products/userale/packages/flagon-userale/build/sendLogs.d.ts create mode 100644 products/userale/packages/flagon-userale/build/utils/auth/index.d.ts create mode 100644 products/userale/packages/flagon-userale/build/utils/headers/index.d.ts create mode 100644 products/userale/packages/flagon-userale/build/utils/index.d.ts delete mode 100644 products/userale/packages/flagon-userale/eslint.config.ts create mode 100644 products/userale/packages/flagon-userale/example/test-client.js create mode 100644 products/userale/packages/flagon-userale/test/globals.d.ts rename products/userale/packages/flagon-userale/test/{jest.config.js => jest.config.ts} (91%) create mode 100644 products/userale/packages/flagon-userale/tsconfig.test.json create mode 100644 products/userale/tsconfig.base.json diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index a06fc79..0000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npm run lint -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -sound() { -echo '\a' -} - -echo "Running pre-commit hooks..." - -# Check Prettier standards -npm run format || -( - sound - echo "❌ Prettier Check Failed. Run npm run format, add changes and try commit again."; - exit 1; -) - -# Check ESLint Standards -npm run lint || -( - sound - echo "❌ ESLint Check Failed. Make the required changes listed above, add changes and try to commit again." - exit 1; -) - -# # Check types -# npm run check-types || -# ( -# sound -# echo "❌ Typescript Check Failed. Make the required changes listed above, add changes and try to commit again." -# exit 1; -# ) - -# # If everything passes... Now we can commit -# echo "✅ Checks passed, trying to build..." - -# "npm" run build || -# ( -# sound -# echo "❌ Build failed, check errors." -# exit 1; -# ) - -# echo "✅ Successful build, running tests..." -# # After build, run unit tests -# # Right now, runs all tests. Later scope to just unit tets, we can add e2e/integration as github actions on merge -# npm run test || -# ( -# sound -# echo "❌ Tests failed: View the logs to see what broke and fix it before re-committing." -# exit 1; -# ) - -# # After build, check license headers -# # These should be fixed in the postbuild step, but if a new filetype -# # emerges, this should catch it. -# npm run license:check || -# ( -# sound -# echo "❌ License check failed: View the logs to see what broke and fix it before re-committing." -# exit 1; -# ) - -# If everything passes... Now we can commit -echo '✅ All tests passed' \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..1b87166 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +repos: + - repo: local + hooks: + - id: userale-format + name: Prettier Format Check (userale) + entry: bash -c 'cd products/userale && pnpm run format' + language: system + pass_filenames: false + files: ^products/userale/ + + - id: userale-lint + name: ESLint Check (userale) + entry: bash -c 'cd products/userale && pnpm run lint' + language: system + pass_filenames: false + files: ^products/userale/ + + - id: userale-build + name: Build Check (userale) + entry: bash -c 'cd products/userale && pnpm run build' + language: system + pass_filenames: false + files: ^products/userale/ + + - id: userale-test + name: Tests (userale) + entry: bash -c 'cd products/userale && pnpm run test' + language: system + pass_filenames: false + files: ^products/userale/ diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index cd685ff..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,34 +0,0 @@ -// eslint.config.js -import js from '@eslint/js' -import ts from '@typescript-eslint/eslint-plugin' -import parser from '@typescript-eslint/parser' - -export default [ - js.configs.recommended, - { - files: ['**/*.ts'], - languageOptions: { - parser, - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - // project: './tsconfig.json', - }, - }, - plugins: { - '@typescript-eslint': ts, - }, - rules: { - 'no-unused-vars': 'off', - - '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], - 'no-undef': 'off', - }, - }, - { - files: ['**/*.js'], - rules: { - 'no-unused-vars': 'warn', - }, - }, -] diff --git a/products/userale/eslint.config.js b/products/userale/eslint.config.js new file mode 100644 index 0000000..c9ae0c6 --- /dev/null +++ b/products/userale/eslint.config.js @@ -0,0 +1,50 @@ +import js from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import pluginJest from 'eslint-plugin-jest'; + +export default [ + js.configs.recommended, + ...tseslint.configs.recommended, + { + files: ['**/*.{ts,tsx,js,jsx}'], + languageOptions: { + parser: tseslint.parser, + sourceType: 'module', + globals: { + window: 'readonly', + document: 'readonly', + navigator: 'readonly', + console: 'readonly', + }, + }, + plugins: { + '@typescript-eslint': tseslint.plugin, + }, + rules: { + 'no-cond-assign': 'warn', + 'no-constant-condition': 'warn', + 'no-unused-vars': 'warn', + '@typescript-eslint/no-unused-vars': 'warn', + '@typescript-eslint/no-explicit-any': 'warn', + }, + }, + { + files: ['test/**/*.{ts,tsx,js,jsx}'], + plugins: { + jest: pluginJest, + }, + languageOptions: { + globals: { + describe: 'readonly', + test: 'readonly', + expect: 'readonly', + beforeEach: 'readonly', + afterEach: 'readonly', + jest: 'readonly', + }, + }, + rules: { + // Optional Jest-specific rules + }, + }, +]; diff --git a/products/userale/package.json b/products/userale/package.json index f3b5674..016a4df 100644 --- a/products/userale/package.json +++ b/products/userale/package.json @@ -3,6 +3,8 @@ "private": true, "version": "1.0.0", "scripts": { + "format": "prettier --ignore-path .gitignore --write 'packages/**/{src,test}/**/*.{ts,js,tsx,jsx}'", + "lint": "eslint 'packages/**/src/**/*.{ts,js,tsx,jsx}' --fix", "build": "pnpm -r run build", "test": "playwright test -c ./test/playwright.config.ts && pnpm -r test", "pretest": "npx playwright install", @@ -10,14 +12,21 @@ "example:watch": "nodemon -w ./example/server example/server/server.js" }, "devDependencies": { + "@eslint/js": "^9.29.0", + "@ianvs/prettier-plugin-sort-imports": "4.1.1", "@playwright/test": "^1.52.0", "@types/node": "^22.15.30", "body-parser": "^1.20.2", + "eslint": "9.29.0", + "eslint-plugin-jest": "^29.0.1", "express": "^4.18.2", "flagon-userale": "workspace:flagon-userale", "jsonschema": "^1.4.1", - "pnpm": "^10.0.0", "nodemon": "^3.0.2", + "pnpm": "^10.0.0", + "prettier": "3.6.0", + "typescript": "^5.8.3", + "typescript-eslint": "^7.8.0", "ws": "^8.18.0" } } \ No newline at end of file diff --git a/products/userale/packages/flagon-userale-ext/src/background/index.ts b/products/userale/packages/flagon-userale-ext/src/background/index.ts index 6e8df51..d3f1b35 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/index.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/index.ts @@ -1,35 +1,41 @@ -import { getStoredOptions } from "~/utils/storage"; -import { setOptions } from "./messages/config_change"; -import { sendToContent } from "~utils/messaging"; +import { getStoredOptions } from "~/utils/storage" +import { sendToContent } from "~utils/messaging" + +import { setOptions } from "./messages/config_change" // Top level await is not supported so immediately execute this async function to set options from storage -(async () => { - const options = await getStoredOptions(); - setOptions(options); -})(); + +;(async () => { + const options = await getStoredOptions() + setOptions(options) +})() // Takes a tabId and event data, gets the tab, and sends it function sendTabEvent(tabId: number, data: Record, type: string) { chrome.tabs.get(tabId, (tab) => { if (!tab) return sendTabEventFromTab(tab, data, type) - }); + }) } // Sends an event directly from a tab object -function sendTabEventFromTab(tab: chrome.tabs.Tab, data: Record, type: string) { +function sendTabEventFromTab( + tab: chrome.tabs.Tab, + data: Record, + type: string +) { const payload = { type, tab, data - }; + } sendToContent(tab.id!, { type: "tab-event", payload }).catch((err) => console.warn(`Failed to send ${type} to tab ${tab.id}:`, err.message) - ); + ) } -// Tab event handlers +// Tab event handlers // https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs // TODO handle events that are sent when the tab isn't active. @@ -39,46 +45,46 @@ function sendTabEventFromTab(tab: chrome.tabs.Tab, data: Record, ty chrome.tabs.onActivated.addListener((activeInfo) => sendTabEvent(activeInfo.tabId, activeInfo, "tabs.onActivated") -); +) chrome.tabs.onAttached.addListener((tabId, attachInfo) => sendTabEvent(tabId, attachInfo, "tabs.onAttached") -); +) chrome.tabs.onCreated.addListener((tab) => sendTabEventFromTab(tab, {}, "tabs.onCreated") -); +) chrome.tabs.onDetached.addListener((tabId, detachInfo) => sendTabEvent(tabId, detachInfo, "tabs.onDetached") -); +) chrome.tabs.onMoved.addListener((tabId, moveInfo) => sendTabEvent(tabId, moveInfo, "tabs.onMoved") -); +) chrome.tabs.onRemoved.addListener((tabId, removeInfo) => sendTabEvent(tabId, removeInfo, "tabs.onRemoved") -); +) chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => sendTabEventFromTab(tab, changeInfo, "tabs.onUpdated") -); +) chrome.tabs.onZoomChange.addListener((zoomChangeInfo) => sendTabEvent(zoomChangeInfo.tabId, zoomChangeInfo, "tabs.onZoomChange") -); +) chrome.tabs.onHighlighted.addListener((highlightInfo) => { - // Note: No tabId is available, so send with windowId and tabIds - const data = { ...highlightInfo } - // Loop over highlightInfo.tabIds and call sendTabEvent on each - for (const tabId of highlightInfo.tabIds) { - sendTabEvent(tabId, data, "tabs.onHighlighted") - } -}); + // Note: No tabId is available, so send with windowId and tabIds + const data = { ...highlightInfo } + // Loop over highlightInfo.tabIds and call sendTabEvent on each + for (const tabId of highlightInfo.tabIds) { + sendTabEvent(tabId, data, "tabs.onHighlighted") + } +}) chrome.tabs.onReplaced.addListener((addedTabId, removedTabId) => { - const data = { addedTabId, removedTabId } - sendTabEvent(addedTabId, data, "tabs.onReplaced") -}); \ No newline at end of file + const data = { addedTabId, removedTabId } + sendTabEvent(addedTabId, data, "tabs.onReplaced") +}) diff --git a/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts index f895ab4..3dec31b 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/messages/config_change.ts @@ -1,20 +1,22 @@ -import type { PlasmoMessaging } from "@plasmohq/messaging"; -import * as userale from "flagon-userale"; -import type { StoredOptions } from "~utils/storage"; - -let allowListRegExp: RegExp; +import * as userale from "flagon-userale" + +import type { PlasmoMessaging } from "@plasmohq/messaging" + +import type { StoredOptions } from "~utils/storage" + +let allowListRegExp: RegExp const handler: PlasmoMessaging.MessageHandler = async (req, res) => { - setOptions(req.body); + setOptions(req.body) } export function setOptions(options: StoredOptions) { - userale.options({url: options.loggingUrl}); - allowListRegExp = new RegExp(options.allowList); + userale.options({ url: options.loggingUrl }) + allowListRegExp = new RegExp(options.allowList) } export function getAllowListRegExp() { - return allowListRegExp; + return allowListRegExp } -export default handler \ No newline at end of file +export default handler diff --git a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts index 445e34e..eaade7f 100644 --- a/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts +++ b/products/userale/packages/flagon-userale-ext/src/background/ports/log.ts @@ -1,28 +1,30 @@ -import type { PlasmoMessaging } from "@plasmohq/messaging"; -import * as userale from "flagon-userale"; -import { getAllowListRegExp } from "~/background/messages/config_change"; +import * as userale from "flagon-userale" + +import type { PlasmoMessaging } from "@plasmohq/messaging" + +import { getAllowListRegExp } from "~/background/messages/config_change" const handler: PlasmoMessaging.PortHandler = async (req, res) => { - let log = req.body - log.browserSessionId = browserSessionId; - let allowListRegExp = getAllowListRegExp(); + const log = req.body + log.browserSessionId = browserSessionId + const allowListRegExp = getAllowListRegExp() if (allowListRegExp.test(log.pageUrl)) { - console.log(log); - userale.log(log); + console.log(log) + userale.log(log) } } -let browserSessionId = generateSessionId(); +const browserSessionId = generateSessionId() // TODO move this to a shared utils workspace (this is from packages/flagon-userale/src/, but shouldn't be publicly exported) function generateSessionId(): string { - // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison - const len = 32; - const arr = new Uint8Array(len / 2); - self.crypto.getRandomValues(arr); - return Array.from(arr, (dec) => { - return dec.toString(16).padStart(2, "0"); - }).join(""); + // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison + const len = 32 + const arr = new Uint8Array(len / 2) + self.crypto.getRandomValues(arr) + return Array.from(arr, (dec) => { + return dec.toString(16).padStart(2, "0") + }).join("") } export default handler diff --git a/products/userale/packages/flagon-userale-ext/src/content.ts b/products/userale/packages/flagon-userale-ext/src/content.ts index e31c14d..46e67b0 100644 --- a/products/userale/packages/flagon-userale-ext/src/content.ts +++ b/products/userale/packages/flagon-userale-ext/src/content.ts @@ -12,29 +12,33 @@ const logPort = getPort("log") userale.addCallbacks({ rerouteLog(log) { - console.log(log); - logPort.postMessage({body: log}); - return false; + console.log(log) + logPort.postMessage({ body: log }) + return false } }) chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { - if( message.type == "tab-event") { - const { type, tab, data } = message.payload; + if (message.type == "tab-event") { + const { type, tab, data } = message.payload userale.packageCustomLog( - {type}, - () => { return data; }, - true, - ); - sendResponse({ status: "received" }); + { type }, + () => { + return data + }, + true + ) + sendResponse({ status: "received" }) } else if (message.type === "issue-report") { userale.packageCustomLog( - {type: message.type}, - () => { return message.payload; }, - true, - ); - sendResponse({ status: "received" }); - } + { type: message.type }, + () => { + return message.payload + }, + true + ) + sendResponse({ status: "received" }) + } - return true -}) \ No newline at end of file + return true +}) diff --git a/products/userale/packages/flagon-userale-ext/src/options/logging.tsx b/products/userale/packages/flagon-userale-ext/src/options/logging.tsx index 6fd221e..1e55f52 100644 --- a/products/userale/packages/flagon-userale-ext/src/options/logging.tsx +++ b/products/userale/packages/flagon-userale-ext/src/options/logging.tsx @@ -23,7 +23,7 @@ function Logging() {

Logging Options

- + { - return new Promise((resolve, reject) => { - chrome.tabs.sendMessage(tabId, message, (response) => { - const err = chrome.runtime.lastError - if (err) reject(err) - else resolve(response) - }) +export async function sendToContent(tabId: number, message: any): Promise { + return new Promise((resolve, reject) => { + chrome.tabs.sendMessage(tabId, message, (response) => { + const err = chrome.runtime.lastError + if (err) reject(err) + else resolve(response) }) -} \ No newline at end of file + }) +} diff --git a/products/userale/packages/flagon-userale-ext/src/utils/storage.ts b/products/userale/packages/flagon-userale-ext/src/utils/storage.ts index 034fc10..bc064d2 100644 --- a/products/userale/packages/flagon-userale-ext/src/utils/storage.ts +++ b/products/userale/packages/flagon-userale-ext/src/utils/storage.ts @@ -43,13 +43,13 @@ export async function setStoredOptions(values: Partial) { } catch (error) { return error } - + // Store the options for after the browser is closed - await browser.storage.local.set(values); + await browser.storage.local.set(values) // Notify the background script of the change return await sendToBackground({ name: "config_change", body: values }) -} \ No newline at end of file +} diff --git a/products/userale/packages/flagon-userale-ext/tsconfig.json b/products/userale/packages/flagon-userale-ext/tsconfig.json index 8af9f45..b25f425 100644 --- a/products/userale/packages/flagon-userale-ext/tsconfig.json +++ b/products/userale/packages/flagon-userale-ext/tsconfig.json @@ -1,20 +1,12 @@ { - "extends": "plasmo/templates/tsconfig.base", - "exclude": [ - "node_modules" - ], - "include": [ - ".plasmo/index.d.ts", - "./**/*.ts", - "./**/*.tsx" - ], + "extends": "../../tsconfig.base.json", "compilerOptions": { - "moduleResolution": "bundler", - "paths": { - "~*": [ - "./src/*" - ] - }, - "baseUrl": "." - } + "composite": true, + "declaration": true, + "module": "ESNext", + "moduleResolution": "node", + "noEmit": false + }, + "include": [".plasmo/index.d.ts", "./**/*.ts", "./**/*.tsx"], + "exclude": ["node_modules"] } diff --git a/products/userale/packages/flagon-userale/.eslintrc.json b/products/userale/packages/flagon-userale/.eslintrc.json deleted file mode 100644 index b076f65..0000000 --- a/products/userale/packages/flagon-userale/.eslintrc.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parserOptions" : { - "sourceType" : "module", - "ecmaFeatures" : { - "modules" : true - } - }, - "plugins": ["@typescript-eslint"], - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], - "env" : { - "browser" : true, - "es6" : true - }, - "rules" : { - "no-cond-assign" : "warn", - "no-constant-condition" : "warn", - "no-unused-vars" : "warn", - "@typescript-eslint/no-unused-vars": "warn", - "@typescript-eslint/no-explicit-any": "warn" - }, - "overrides": [ - { - "files": ["test/**/*"], - "plugins": ["jest"], - "env": { - "jest": true - } - } - ] -} diff --git a/products/userale/packages/flagon-userale/.husky/pre-commit b/products/userale/packages/flagon-userale/.husky/pre-commit deleted file mode 100644 index 2a8d238..0000000 --- a/products/userale/packages/flagon-userale/.husky/pre-commit +++ /dev/null @@ -1,80 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -sound() { -echo '\a' -} - -echo "Running pre-commit hooks..." - -# Check Prettier standards -npm run format || -( - sound - echo "❌ Prettier Check Failed. Run npm run format, add changes and try commit again."; - exit 1; -) - -# Check ESLint Standards -npm run lint || -( - sound - echo "❌ ESLint Check Failed. Make the required changes listed above, add changes and try to commit again." - exit 1; -) - -# Check types -npm run check-types || -( - sound - echo "❌ Typescript Check Failed. Make the required changes listed above, add changes and try to commit again." - exit 1; -) - -# If everything passes... Now we can commit -echo "✅ Checks passed, trying to build..." - -"npm" run build || -( - sound - echo "❌ Build failed, check errors." - exit 1; -) - -echo "✅ Successful build, running tests..." -# After build, run unit tests -# Right now, runs all tests. Later scope to just unit tets, we can add e2e/integration as github actions on merge -npm run test || -( - sound - echo "❌ Tests failed: View the logs to see what broke and fix it before re-committing." - exit 1; -) - -# After build, check license headers -# These should be fixed in the postbuild step, but if a new filetype -# emerges, this should catch it. -npm run license:check || -( - sound - echo "❌ License check failed: View the logs to see what broke and fix it before re-committing." - exit 1; -) - -# If everything passes... Now we can commit -echo '✅ All tests passed' - diff --git a/products/userale/packages/flagon-userale/build/attachHandlers.d.ts b/products/userale/packages/flagon-userale/build/attachHandlers.d.ts new file mode 100644 index 0000000..2ae8cc5 --- /dev/null +++ b/products/userale/packages/flagon-userale/build/attachHandlers.d.ts @@ -0,0 +1,81 @@ +import { Events, Logging, Settings } from "@/types"; +import { Configuration } from "@/configure"; +/** + * Maps a MouseEvent to an object containing useful information. + * @param {MouseEvent} e Event to extract data from + */ +export declare function extractMouseDetails(e: MouseEvent): { + clicks: number; + ctrl: boolean; + alt: boolean; + shift: boolean; + meta: boolean; +}; +/** Maps a KeyboardEvent to an object containing useful infromation + * @param {KeyboardEvent} e Event to extract data from + */ +export declare function extractKeyboardDetails(e: KeyboardEvent): { + key: string; + code: string; + ctrl: boolean; + alt: boolean; + shift: boolean; + meta: boolean; +}; +/** + * Maps an InputEvent to an object containing useful information. + * @param {InputEvent} e Event to extract data from + */ +export declare function extractInputDetails(e: InputEvent): { + value: string; +}; +/** + * Maps a ChangeEvent to an object containing useful information. + * @param {Events.ChangeEvent} e Event to extract data from + */ +export declare function extractChangeDetails(e: Events.ChangeEvent): { + value: any; +}; +/** + * Maps a WheelEvent to an object containing useful information. + * @param {WheelEvent} e Event to extract data from + */ +export declare function extractWheelDetails(e: WheelEvent): { + x: number; + y: number; + z: number; +}; +/** + * Maps a ScrollEvent to an object containing useful information. + */ +export declare function extractScrollDetails(): { + x: number; + y: number; +}; +/** + * Maps a ResizeEvent to an object containing useful information. + */ +export declare function extractResizeDetails(): { + width: number; + height: number; +}; +/** + * Defines the way information is extracted from various events. + * Also defines which events we will listen to. + * @param {Settings.Config} config Configuration object to read from. + */ +export declare function defineDetails(config: Settings.DefaultConfig): void; +/** + * Defines the way information is extracted from various events. + * Also defines which events we will listen to. + * @param {Settings.Config} options UserALE Configuration object to read from. + * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods. + */ +export declare function defineCustomDetails(options: Settings.DefaultConfig, type: Events.AllowedEvents): Logging.DynamicDetailFunction | null | undefined; +/** + * Hooks the event handlers for each event type of interest. + * @param {Configuration} config Configuration singleton to use. + * @return {boolean} Whether the operation succeeded + */ +export declare function attachHandlers(config: Configuration): boolean; +//# sourceMappingURL=attachHandlers.d.ts.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/configure.d.ts b/products/userale/packages/flagon-userale/build/configure.d.ts new file mode 100644 index 0000000..e2ca829 --- /dev/null +++ b/products/userale/packages/flagon-userale/build/configure.d.ts @@ -0,0 +1,46 @@ +import type { Settings } from "@/types"; +export declare class Configuration { + [key: string]: Settings.ConfigValueTypes; + private static instance; + autostart: boolean; + authHeader: Settings.AuthHeader; + browserSessionId: Settings.SessionId; + custIndex: Settings.CustomIndex; + headers: Settings.Headers; + httpSessionId: Settings.SessionId; + logCountThreshold: number; + logDetails: boolean; + on: boolean; + resolution: number; + sessionId: Settings.SessionId; + time: Settings.TimeFunction; + toolName: Settings.ToolName; + toolVersion: Settings.Version; + transmitInterval: number; + url: string; + userFromParams: Settings.UserFromParams; + useraleVersion: Settings.Version; + userId: Settings.UserId; + version: Settings.Version; + websocketsEnabled: boolean; + private constructor(); + static getInstance(): Configuration; + private initialize; + /** + * Resets the configuration to its initial state. + */ + reset(): void; + /** + * Shallow merges a newConfig with the configuration class, updating it. + * Retrieves/updates the userid if userFromParams is provided. + * @param {Partial} newConfig Configuration object to merge into the current config. + */ + update(newConfig: Partial): void; + /** + * Attempts to extract the userid from the query parameters of the URL. + * @param {string} param The name of the query parameter containing the userid. + * @return {string | null} The extracted/decoded userid, or null if none is found. + */ + static getUserIdFromParams(param: string): string | null; +} +//# sourceMappingURL=configure.d.ts.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/getInitialSettings.d.ts b/products/userale/packages/flagon-userale/build/getInitialSettings.d.ts new file mode 100644 index 0000000..3dd3167 --- /dev/null +++ b/products/userale/packages/flagon-userale/build/getInitialSettings.d.ts @@ -0,0 +1,21 @@ +import type { Settings } from "./types"; +/** + * Extracts the initial configuration settings from the + * currently executing script tag. + * @return {Object} The extracted configuration object + */ +export declare function getInitialSettings(): Settings.Config; +/** + * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in + * storage when script is started. This prevents events like 'submit', which refresh page data + * from refreshing the current user session + * + */ +export declare function getsessionId(sessionKey: string, value: any): any; +/** + * Creates a function to normalize the timestamp of the provided event. + * @param {Event} e An event containing a timeStamp property. + * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function. + */ +export declare function timeStampScale(e: Event): Settings.TimeFunction; +//# sourceMappingURL=getInitialSettings.d.ts.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/main.d.ts b/products/userale/packages/flagon-userale/build/main.d.ts index a3cc624..f6df136 100644 --- a/products/userale/packages/flagon-userale/build/main.d.ts +++ b/products/userale/packages/flagon-userale/build/main.d.ts @@ -1,234 +1,30 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -declare namespace Settings { - type Version = string | null; - type UserId = string | null; - type SessionId = string | null; - type UserFromParams = string | null; - type ToolName = string | null; - type AuthHeader = CallableFunction | string | null; - type CustomIndex = string | null; - type HeaderObject = { [key: string]: string }; - type Headers = HeaderObject | null; - type ConfigValueTypes = - | string - | number - | boolean - | null - | Version - | UserId - | SessionId - | UserFromParams - | ToolName - | AuthHeader - | CustomIndex - | Headers; - - type TimeFunction = (() => number) | ((ts: number) => number); - - export interface DefaultConfig { - [key: string]: ConfigValueTypes; - } - - export interface Config extends DefaultConfig { - autostart: boolean; - authHeader: AuthHeader; - browserSessionId: SessionId; - custIndex: CustomIndex; - headers: Headers; - httpSessionId: SessionId; - logCountThreshold: number; - logDetails: boolean; - on?: boolean; - resolution: number; - sessionId: SessionId; - time: TimeFunction; - toolName: ToolName; - toolVersion?: Version; - transmitInterval: number; - url: string; - userFromParams: UserFromParams; - useraleVersion: Version; - userId: UserId; - version?: Version; - websocketsEnabled?: boolean; - } - - export interface IConfiguration extends Config { - getInstance(): Configuration; - configure(newConfig: Config): void; - } -} - -// TODO: Switch to protobuf for managing log types -declare namespace Logging { - type JSONObject = { - [key: string]: - | string - | number - | boolean - | null - | undefined - | JSONObject - | Array; - }; - export type Log = JSONObject; // TODO: Intersect this with the default log objects (raw & interval) - export type CustomLog = JSONObject; - - export type DynamicDetailFunction = ( - e: E, - ) => JSONObject; - export type StaticDetailFunction = () => JSONObject; -} - -declare namespace Events { - type FormElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement; - type ChangeEvent = Event; - export type RawEvents = - | "dblclick" - | "mouseup" - | "mousedown" - | "dragstart" - | "dragend" - | "drag" - | "drop" - | "keydown"; - export type IntervalEvents = - | "click" - | "focus" - | "blur" - | "input" - | "change" - | "mouseover" - | "submit"; - export type WindowEvents = "load" | "blur" | "focus"; - export type BufferedEvents = "wheel" | "scroll" | "resize"; - export type RefreshEvents = "submit"; - export type AllowedEvents = - | RawEvents - | IntervalEvents - | WindowEvents - | BufferedEvents - | RefreshEvents; - - export type EventDetailsMap = Partial<{ - [key in T]: - | Logging.DynamicDetailFunction< - | MouseEvent - | KeyboardEvent - | InputEvent - | Events.ChangeEvent - | WheelEvent - > - | Logging.StaticDetailFunction - | null; - }>; - - export type EventBoolMap = Partial<{ - [key in T]: boolean; - }>; -} - -declare namespace Callbacks { - export type AuthCallback = () => string; - export type HeadersCallback = () => Settings.HeaderObject; - - export type CallbackMap = { - [key in string]: CallableFunction; - }; -} - -/** - * Defines the way information is extracted from various events. - * Also defines which events we will listen to. - * @param {Settings.Config} options UserALE Configuration object to read from. - * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods. - */ -declare function defineCustomDetails(options: Settings.DefaultConfig, type: Events.AllowedEvents): Logging.DynamicDetailFunction | null | undefined; - -/** - * Registers the provided callback to be used when updating the auth header. - * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string. - * @returns {boolean} Whether the operation succeeded. - */ -declare function registerAuthCallback(callback: Callbacks.AuthCallback): boolean; - -/** - * Adds named callbacks to be executed when logging. - * @param {Object } newCallbacks An object containing named callback functions. - */ -declare function addCallbacks(...newCallbacks: Record[]): Callbacks.CallbackMap; -/** - * Removes callbacks by name. - * @param {String[]} targetKeys A list of names of functions to remove. - */ -declare function removeCallbacks(targetKeys: string[]): void; -/** - * Transforms the provided HTML event into a log and appends it to the log queue. - * @param {Event} e The event to be logged. - * @param {Function} detailFcn The function to extract additional log parameters from the event. - * @return {boolean} Whether the event was logged. - */ -declare function packageLog(e: Event, detailFcn?: Logging.DynamicDetailFunction | null): boolean; -/** - * Packages the provided customLog to include standard meta data and appends it to the log queue. - * @param {Logging.CustomLog} customLog The behavior to be logged. - * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. - * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) - * @return {boolean} Whether the event was logged. - */ -declare function packageCustomLog(customLog: Logging.CustomLog, detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction, userAction: boolean): boolean; -/** - * Builds a string CSS selector from the provided element - * @param {EventTarget} ele The element from which the selector is built. - * @return {string} The CSS selector for the element, or Unknown if it can't be determined. - */ -declare function getSelector(ele: EventTarget): string; -/** - * Builds an array of elements from the provided event target, to the root element. - * @param {Event} e Event from which the path should be built. - * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. - */ -declare function buildPath(e: Event): string[]; - -declare let started: boolean; - -declare const version: string; +import type { Settings, Logging } from "@/types"; +export declare let started: boolean; +export { defineCustomDetails as details } from "@/attachHandlers"; +export { registerAuthCallback as registerAuthCallback } from "@/utils"; +export { addCallbacks as addCallbacks, removeCallbacks as removeCallbacks, packageLog as packageLog, packageCustomLog as packageCustomLog, getSelector as getSelector, buildPath as buildPath, } from "@/packageLogs"; +export type { Logging } from "@/types"; +export declare const version: string; /** * Used to start the logging process if the * autostart configuration option is set to false. */ -declare function start(): void; +export declare function start(): void; /** * Halts the logging process. Logs will no longer be sent. */ -declare function stop(): void; +export declare function stop(): void; /** * Updates the current configuration * object with the provided values. * @param {Partial} newConfig The configuration options to use. * @return {Settings.Config} Returns the updated configuration. */ -declare function options(newConfig: Partial | undefined): Settings.Config; +export declare function options(newConfig: Partial | undefined): Settings.Config; /** * Appends a log to the log queue. * @param {Logging.CustomLog} customLog The log to append. * @return {boolean} Whether the operation succeeded. */ -declare function log(customLog: Logging.CustomLog | undefined): boolean; - -export { Logging, addCallbacks, buildPath, defineCustomDetails as details, getSelector, log, options, packageCustomLog, packageLog, registerAuthCallback, removeCallbacks, start, started, stop, version }; +export declare function log(customLog: Logging.CustomLog | undefined): boolean; +//# sourceMappingURL=main.d.ts.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/main.global.js b/products/userale/packages/flagon-userale/build/main.global.js index 490b8d0..2a715da 100644 --- a/products/userale/packages/flagon-userale/build/main.global.js +++ b/products/userale/packages/flagon-userale/build/main.global.js @@ -14,49 +14,18 @@ See the License for the specific language governing permissions and limitations under the License.*/ (() => { - var __defProp = Object.defineProperty; - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; - var __getOwnPropNames = Object.getOwnPropertyNames; - var __hasOwnProp = Object.prototype.hasOwnProperty; - var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; - }; - var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - // src/packageLogs.ts - var packageLogs_exports = {}; - __export(packageLogs_exports, { - addCallbacks: () => addCallbacks, - buildAttrs: () => buildAttrs, - buildCSS: () => buildCSS, - buildPath: () => buildPath, - cbHandlers: () => cbHandlers, - extractTimeFields: () => extractTimeFields, - filterHandler: () => filterHandler, - getLocation: () => getLocation, - getScreenRes: () => getScreenRes, - getSelector: () => getSelector, - initPackager: () => initPackager, - logs: () => logs, - mapHandler: () => mapHandler, - packageCustomLog: () => packageCustomLog, - packageIntervalLog: () => packageIntervalLog, - packageLog: () => packageLog, - removeCallbacks: () => removeCallbacks, - selectorizePath: () => selectorizePath - }); + var logs; + var config; + var intervalId; + var intervalType; + var intervalPath; + var intervalTimer; + var intervalCounter; + var intervalLog; + var filterHandler = null; + var mapHandler = null; + var cbHandlers = {}; function addCallbacks(...newCallbacks) { newCallbacks.forEach((source) => { let descriptors = {}; @@ -322,7 +291,7 @@ let val = attr.value; try { val = JSON.parse(val); - } catch (error) { + } catch { } attributes[attr.name] = val; } @@ -340,30 +309,22 @@ } return properties; } - var logs, config, intervalId, intervalType, intervalPath, intervalTimer, intervalCounter, intervalLog, filterHandler, mapHandler, cbHandlers; - var init_packageLogs = __esm({ - "src/packageLogs.ts"() { - "use strict"; - filterHandler = null; - mapHandler = null; - cbHandlers = {}; - } - }); // src/attachHandlers.ts - var attachHandlers_exports = {}; - __export(attachHandlers_exports, { - attachHandlers: () => attachHandlers, - defineCustomDetails: () => defineCustomDetails, - defineDetails: () => defineDetails, - extractChangeDetails: () => extractChangeDetails, - extractInputDetails: () => extractInputDetails, - extractKeyboardDetails: () => extractKeyboardDetails, - extractMouseDetails: () => extractMouseDetails, - extractResizeDetails: () => extractResizeDetails, - extractScrollDetails: () => extractScrollDetails, - extractWheelDetails: () => extractWheelDetails - }); + var events; + var bufferBools; + var bufferedEvents; + var refreshEvents; + var intervalEvents = [ + "click", + "focus", + "blur", + "input", + "change", + "mouseover", + "submit" + ]; + var windowEvents = ["load", "blur", "focus"]; function extractMouseDetails(e) { return { clicks: e.detail, @@ -383,11 +344,6 @@ meta: e.metaKey }; } - function extractInputDetails(e) { - return { - value: e.target.value - }; - } function extractChangeDetails(e) { return { value: e.target.value @@ -529,25 +485,9 @@ return false; } } - var events, bufferBools, bufferedEvents, refreshEvents, intervalEvents, windowEvents; - var init_attachHandlers = __esm({ - "src/attachHandlers.ts"() { - "use strict"; - init_packageLogs(); - intervalEvents = [ - "click", - "focus", - "blur", - "input", - "change", - "mouseover", - "submit" - ]; - windowEvents = ["load", "blur", "focus"]; - } - }); // src/utils/auth/index.ts + var authCallback = null; function updateAuthHeader(config3) { if (authCallback) { try { @@ -562,7 +502,7 @@ verifyCallback(callback); authCallback = callback; return true; - } catch (e) { + } catch { return false; } } @@ -575,18 +515,9 @@ throw new Error("Userale auth callback must return a string"); } } - function resetAuthCallback() { - authCallback = null; - } - var authCallback; - var init_auth = __esm({ - "src/utils/auth/index.ts"() { - "use strict"; - authCallback = null; - } - }); // src/utils/headers/index.ts + var headersCallback = null; function updateCustomHeaders(config3) { if (headersCallback) { try { @@ -596,63 +527,6 @@ } } } - function registerHeadersCallback(callback) { - try { - verifyCallback2(callback); - headersCallback = callback; - return true; - } catch (e) { - return false; - } - } - function verifyCallback2(callback) { - if (typeof callback !== "function") { - throw new Error("Userale headers callback must be a function"); - } - const result = callback(); - if (typeof result !== "object") { - throw new Error("Userale headers callback must return an object"); - } - for (const [key, value] of Object.entries(result)) { - if (typeof key !== "string" || typeof value !== "string") { - throw new Error( - "Userale header callback must return an object with string keys and values" - ); - } - } - } - function resetHeadersCallback() { - headersCallback = null; - } - var headersCallback; - var init_headers = __esm({ - "src/utils/headers/index.ts"() { - "use strict"; - headersCallback = null; - } - }); - - // src/utils/index.ts - var utils_exports = {}; - __export(utils_exports, { - authCallback: () => authCallback, - headersCallback: () => headersCallback, - registerAuthCallback: () => registerAuthCallback, - registerHeadersCallback: () => registerHeadersCallback, - resetAuthCallback: () => resetAuthCallback, - resetHeadersCallback: () => resetHeadersCallback, - updateAuthHeader: () => updateAuthHeader, - updateCustomHeaders: () => updateCustomHeaders, - verifyAuthCallback: () => verifyCallback, - verifyHeadersCallback: () => verifyCallback2 - }); - var init_utils = __esm({ - "src/utils/index.ts"() { - "use strict"; - init_auth(); - init_headers(); - } - }); // package.json var version = "2.4.0"; @@ -841,12 +715,7 @@ var Configuration = _Configuration; Configuration.instance = null; - // src/main.ts - init_attachHandlers(); - init_packageLogs(); - // src/sendLogs.ts - init_utils(); var sendIntervalId; var wsock; function initSender(logs3, config3) { @@ -946,9 +815,6 @@ } // src/main.ts - init_attachHandlers(); - init_utils(); - init_packageLogs(); var config2 = Configuration.getInstance(); var logs2 = []; var startLoadTimestamp = Date.now(); @@ -1025,14 +891,14 @@ options, log, version, - details: (init_attachHandlers(), __toCommonJS(attachHandlers_exports)).defineCustomDetails, - registerAuthCallback: (init_utils(), __toCommonJS(utils_exports)).registerAuthCallback, - addCallbacks: (init_packageLogs(), __toCommonJS(packageLogs_exports)).addCallbacks, - removeCallbacks: (init_packageLogs(), __toCommonJS(packageLogs_exports)).removeCallbacks, - packageLog: (init_packageLogs(), __toCommonJS(packageLogs_exports)).packageLog, - packageCustomLog: (init_packageLogs(), __toCommonJS(packageLogs_exports)).packageCustomLog, - getSelector: (init_packageLogs(), __toCommonJS(packageLogs_exports)).getSelector, - buildPath: (init_packageLogs(), __toCommonJS(packageLogs_exports)).buildPath + details: defineCustomDetails, + registerAuthCallback, + addCallbacks, + removeCallbacks, + packageLog, + packageCustomLog, + getSelector, + buildPath }; } })(); diff --git a/products/userale/packages/flagon-userale/build/main.global.js.map b/products/userale/packages/flagon-userale/build/main.global.js.map index a0eea58..53a70f8 100644 --- a/products/userale/packages/flagon-userale/build/main.global.js.map +++ b/products/userale/packages/flagon-userale/build/main.global.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/utils/index.ts","../src/getInitialSettings.ts","../src/configure.ts","../src/main.ts","../src/sendLogs.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {\n authCallback,\n updateAuthHeader,\n registerAuthCallback,\n resetAuthCallback,\n verifyCallback as verifyAuthCallback,\n} from \"./auth\";\nexport {\n headersCallback,\n updateCustomHeaders,\n registerHeadersCallback,\n resetHeadersCallback,\n verifyCallback as verifyHeadersCallback,\n} from \"./headers\";\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\nexport type { Logging } from \"@/types\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if(typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n\n\n// Only attach to window in IIFE builds\nif (typeof window !== \"undefined\") {\n (window as any).userale = {\n start,\n stop,\n options,\n log,\n version: userAleVersion,\n details: require(\"@/attachHandlers\").defineCustomDetails,\n registerAuthCallback: require(\"@/utils\").registerAuthCallback,\n addCallbacks: require(\"@/packageLogs\").addCallbacks,\n removeCallbacks: require(\"@/packageLogs\").removeCallbacks,\n packageLog: require(\"@/packageLogs\").packageLog,\n packageCustomLog: require(\"@/packageLogs\").packageCustomLog,\n getSelector: require(\"@/packageLogs\").getSelector,\n buildPath: require(\"@/packageLogs\").buildPath,\n };\n}","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\nlet wsock: WebSocket;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n const url = new URL(config.url);\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock = new WebSocket(config.url);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"application/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AA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GAAG;AAAA,IACR;AAAA,EACF;AAGO,MAAME,WAAU;AAMhB,WAAS,QAAc;AAC5B,QAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,gBAAUA,QAAO,KAAK;AACtB,MAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,IACnC;AAAA,EACF;AAKO,WAAS,OAAa;AAC3B,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AAAA,EACpC;AAQO,WAAS,QACd,WACiB;AACjB,QAAI,WAAW;AACb,MAAAA,QAAO,OAAO,SAAS;AAAA,IACzB;AAEA,WAAOA;AAAA,EACT;AAOO,WAAS,IAAI,WAA0C;AAC5D,QAAI,WAAW;AACb,MAAAC,MAAK,KAAK,SAAS;AACnB,aAAO;AAAA,IACT,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AAIA,MAAI,OAAO,WAAW,aAAa;AACjC,IAAC,OAAe,UAAU;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,8DAA4B;AAAA,MACrC,sBAAsB,4CAAmB;AAAA,MACzC,cAAc,wDAAyB;AAAA,MACvC,iBAAiB,wDAAyB;AAAA,MAC1C,YAAY,wDAAyB;AAAA,MACrC,kBAAkB,wDAAyB;AAAA,MAC3C,aAAa,wDAAyB;AAAA,MACtC,WAAW,wDAAyB;AAAA,IACtC;AAAA,EACF;","names":["descriptors","log","config","options","config","config","verifyCallback","verifyCallback","settings","logs","config","config","logs","version"]} \ No newline at end of file +{"version":3,"sources":["../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/getInitialSettings.ts","../src/configure.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n if (\n typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope\n ) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +5,\n logDetails: false,\n resolution: +500,\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +5000,\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\nlet wsock: WebSocket;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n const url = new URL(config.url);\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock = new WebSocket(config.url);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function () {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n// /**\n// * Attempts to flush the remaining logs when the window is closed.\n// * @param {Array} logs Array of logs to be flushed.\n// * @param {Configuration} config Configuration singleton to be read from.\n// */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function () {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"application/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineCustomDetails } from \"@/attachHandlers\";\nimport { registerAuthCallback } from \"@/utils\";\nimport {\n addCallbacks,\n removeCallbacks,\n packageLog,\n packageCustomLog,\n getSelector,\n buildPath,\n initPackager,\n} from \"@/packageLogs\";\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function () {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\nexport type { Logging } from \"@/types\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function () {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if (typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n\n// Only attach to window in IIFE builds\nif (typeof window !== \"undefined\") {\n (window as any).userale = {\n start,\n stop,\n options,\n log,\n version: userAleVersion,\n details: defineCustomDetails,\n registerAuthCallback,\n addCallbacks,\n removeCallbacks,\n packageLog,\n packageCustomLog,\n getSelector,\n buildPath,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBO,MAAI;AACX,MAAI;AAGJ,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,MAAI;AAEG,MAAM,gBAAyC;AAC/C,MAAM,aAAsC;AAC5C,MAAI,aAAoC,CAAC;AAMzC,WAAS,gBACX,cACH;AACA,iBAAa,QAAQ,CAAC,WAAW;AAC/B,UAAI,cAAiD,CAAC;AAEtD,oBAAc,OAAO,KAAK,MAAM,EAAE,OAAO,CAACA,cAAa,QAAQ;AAC7D,QAAAA,aAAY,OAAO,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,eAAOA;AAAA,MACT,GAAG,WAAW;AAEd,aAAO,sBAAsB,MAAM,EAAE,QAAQ,CAAC,QAAQ;AACpD,cAAM,aAAa,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,YAAI,YAAY,YAAY;AAC1B,sBAAY,OAAO;AAAA,QACrB;AAAA,MACF,CAAC;AACD,aAAO,iBAAiB,YAAY,WAAW;AAAA,IACjD,CAAC;AACD,WAAO;AAAA,EACT;AAMO,WAAS,gBAAgB,YAAsB;AACpD,eAAW,QAAQ,CAAC,QAAQ;AAC1B,UAAI,OAAO,UAAU,eAAe,KAAK,YAAY,GAAG,GAAG;AACzD,eAAO,WAAW;AAAA,MACpB;AAAA,IACF,CAAC;AAAA,EACH;AAOO,WAAS,aACd,SACA,WACA;AACA,WAAO;AACP,aAAS;AACT,iBAAa,CAAC;AACd,iBAAa;AACb,mBAAe;AACf,mBAAe;AACf,oBAAgB;AAChB,sBAAkB;AAClB,kBAAc;AA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ACvB,oBAAUA,QAAO,KAAK;AACtB,cAAI,OAAO,WAAW,eAAe,OAAO,aAAa,aAAa;AACpE;AAAA,cACE;AAAA,gBACE,MAAM;AAAA,gBACN,SAAS,EAAE,cAAc,mBAAmB,mBAAmB;AAAA,cACjE;AAAA,cACA,OAAO,CAAC;AAAA,cACR;AAAA,YACF;AAAA,UACF;AAAA,QACF,OAAO;AACL,gBAAMA,OAAM;AAAA,QACd;AAAA,MACF,GAAG,GAAG;AAAA,IACR;AAAA,EACF;AAGO,MAAME,WAAU;AAMhB,WAAS,QAAc;AAC5B,QAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,gBAAUA,QAAO,KAAK;AACtB,MAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,IACnC;AAAA,EACF;AAKO,WAAS,OAAa;AAC3B,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AAAA,EACpC;AAQO,WAAS,QACd,WACiB;AACjB,QAAI,WAAW;AACb,MAAAA,QAAO,OAAO,SAAS;AAAA,IACzB;AAEA,WAAOA;AAAA,EACT;AAOO,WAAS,IAAI,WAA0C;AAC5D,QAAI,WAAW;AACb,MAAAC,MAAK,KAAK,SAAS;AACnB,aAAO;AAAA,IACT,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AAGA,MAAI,OAAO,WAAW,aAAa;AACjC,IAAC,OAAe,UAAU;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;","names":["descriptors","log","config","options","config","config","settings","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/main.mjs b/products/userale/packages/flagon-userale/build/main.mjs index a9318e2..c61e588 100644 --- a/products/userale/packages/flagon-userale/build/main.mjs +++ b/products/userale/packages/flagon-userale/build/main.mjs @@ -12,55 +12,18 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.*/ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// ../../node_modules/.pnpm/tsup@5.12.9_@swc+core@1.11.22_@swc+helpers@0.5.17__postcss@8.5.3_ts-node@10.9.2_@swc+co_7dfb40117802bc289cccbf76535c67e5/node_modules/tsup/assets/esm_shims.js -var init_esm_shims = __esm({ - "../../node_modules/.pnpm/tsup@5.12.9_@swc+core@1.11.22_@swc+helpers@0.5.17__postcss@8.5.3_ts-node@10.9.2_@swc+co_7dfb40117802bc289cccbf76535c67e5/node_modules/tsup/assets/esm_shims.js"() { - } -}); - // src/packageLogs.ts -var packageLogs_exports = {}; -__export(packageLogs_exports, { - addCallbacks: () => addCallbacks, - buildAttrs: () => buildAttrs, - buildCSS: () => buildCSS, - buildPath: () => buildPath, - cbHandlers: () => cbHandlers, - extractTimeFields: () => extractTimeFields, - filterHandler: () => filterHandler, - getLocation: () => getLocation, - getScreenRes: () => getScreenRes, - getSelector: () => getSelector, - initPackager: () => initPackager, - logs: () => logs, - mapHandler: () => mapHandler, - packageCustomLog: () => packageCustomLog, - packageIntervalLog: () => packageIntervalLog, - packageLog: () => packageLog, - removeCallbacks: () => removeCallbacks, - selectorizePath: () => selectorizePath -}); +var logs; +var config; +var intervalId; +var intervalType; +var intervalPath; +var intervalTimer; +var intervalCounter; +var intervalLog; +var filterHandler = null; +var mapHandler = null; +var cbHandlers = {}; function addCallbacks(...newCallbacks) { newCallbacks.forEach((source) => { let descriptors = {}; @@ -326,7 +289,7 @@ function buildAttrs(e) { let val = attr.value; try { val = JSON.parse(val); - } catch (error) { + } catch { } attributes[attr.name] = val; } @@ -344,31 +307,22 @@ function buildCSS(e) { } return properties; } -var logs, config, intervalId, intervalType, intervalPath, intervalTimer, intervalCounter, intervalLog, filterHandler, mapHandler, cbHandlers; -var init_packageLogs = __esm({ - "src/packageLogs.ts"() { - "use strict"; - init_esm_shims(); - filterHandler = null; - mapHandler = null; - cbHandlers = {}; - } -}); // src/attachHandlers.ts -var attachHandlers_exports = {}; -__export(attachHandlers_exports, { - attachHandlers: () => attachHandlers, - defineCustomDetails: () => defineCustomDetails, - defineDetails: () => defineDetails, - extractChangeDetails: () => extractChangeDetails, - extractInputDetails: () => extractInputDetails, - extractKeyboardDetails: () => extractKeyboardDetails, - extractMouseDetails: () => extractMouseDetails, - extractResizeDetails: () => extractResizeDetails, - extractScrollDetails: () => extractScrollDetails, - extractWheelDetails: () => extractWheelDetails -}); +var events; +var bufferBools; +var bufferedEvents; +var refreshEvents; +var intervalEvents = [ + "click", + "focus", + "blur", + "input", + "change", + "mouseover", + "submit" +]; +var windowEvents = ["load", "blur", "focus"]; function extractMouseDetails(e) { return { clicks: e.detail, @@ -388,11 +342,6 @@ function extractKeyboardDetails(e) { meta: e.metaKey }; } -function extractInputDetails(e) { - return { - value: e.target.value - }; -} function extractChangeDetails(e) { return { value: e.target.value @@ -534,26 +483,9 @@ function attachHandlers(config3) { return false; } } -var events, bufferBools, bufferedEvents, refreshEvents, intervalEvents, windowEvents; -var init_attachHandlers = __esm({ - "src/attachHandlers.ts"() { - "use strict"; - init_esm_shims(); - init_packageLogs(); - intervalEvents = [ - "click", - "focus", - "blur", - "input", - "change", - "mouseover", - "submit" - ]; - windowEvents = ["load", "blur", "focus"]; - } -}); // src/utils/auth/index.ts +var authCallback = null; function updateAuthHeader(config3) { if (authCallback) { try { @@ -568,7 +500,7 @@ function registerAuthCallback(callback) { verifyCallback(callback); authCallback = callback; return true; - } catch (e) { + } catch { return false; } } @@ -581,19 +513,9 @@ function verifyCallback(callback) { throw new Error("Userale auth callback must return a string"); } } -function resetAuthCallback() { - authCallback = null; -} -var authCallback; -var init_auth = __esm({ - "src/utils/auth/index.ts"() { - "use strict"; - init_esm_shims(); - authCallback = null; - } -}); // src/utils/headers/index.ts +var headersCallback = null; function updateCustomHeaders(config3) { if (headersCallback) { try { @@ -603,77 +525,11 @@ function updateCustomHeaders(config3) { } } } -function registerHeadersCallback(callback) { - try { - verifyCallback2(callback); - headersCallback = callback; - return true; - } catch (e) { - return false; - } -} -function verifyCallback2(callback) { - if (typeof callback !== "function") { - throw new Error("Userale headers callback must be a function"); - } - const result = callback(); - if (typeof result !== "object") { - throw new Error("Userale headers callback must return an object"); - } - for (const [key, value] of Object.entries(result)) { - if (typeof key !== "string" || typeof value !== "string") { - throw new Error( - "Userale header callback must return an object with string keys and values" - ); - } - } -} -function resetHeadersCallback() { - headersCallback = null; -} -var headersCallback; -var init_headers = __esm({ - "src/utils/headers/index.ts"() { - "use strict"; - init_esm_shims(); - headersCallback = null; - } -}); - -// src/utils/index.ts -var utils_exports = {}; -__export(utils_exports, { - authCallback: () => authCallback, - headersCallback: () => headersCallback, - registerAuthCallback: () => registerAuthCallback, - registerHeadersCallback: () => registerHeadersCallback, - resetAuthCallback: () => resetAuthCallback, - resetHeadersCallback: () => resetHeadersCallback, - updateAuthHeader: () => updateAuthHeader, - updateCustomHeaders: () => updateCustomHeaders, - verifyAuthCallback: () => verifyCallback, - verifyHeadersCallback: () => verifyCallback2 -}); -var init_utils = __esm({ - "src/utils/index.ts"() { - "use strict"; - init_esm_shims(); - init_auth(); - init_headers(); - } -}); - -// src/main.ts -init_esm_shims(); // package.json var version = "2.4.0"; -// src/configure.ts -init_esm_shims(); - // src/getInitialSettings.ts -init_esm_shims(); var sessionId = null; var httpSessionId = null; function getInitialSettings() { @@ -857,13 +713,7 @@ var _Configuration = class { var Configuration = _Configuration; Configuration.instance = null; -// src/main.ts -init_attachHandlers(); -init_packageLogs(); - // src/sendLogs.ts -init_esm_shims(); -init_utils(); var sendIntervalId; var wsock; function initSender(logs3, config3) { @@ -963,9 +813,6 @@ async function sendLogs(logs3, config3, retries) { } // src/main.ts -init_attachHandlers(); -init_utils(); -init_packageLogs(); var config2 = Configuration.getInstance(); var logs2 = []; var startLoadTimestamp = Date.now(); @@ -1042,14 +889,14 @@ if (typeof window !== "undefined") { options, log, version, - details: (init_attachHandlers(), __toCommonJS(attachHandlers_exports)).defineCustomDetails, - registerAuthCallback: (init_utils(), __toCommonJS(utils_exports)).registerAuthCallback, - addCallbacks: (init_packageLogs(), __toCommonJS(packageLogs_exports)).addCallbacks, - removeCallbacks: (init_packageLogs(), __toCommonJS(packageLogs_exports)).removeCallbacks, - packageLog: (init_packageLogs(), __toCommonJS(packageLogs_exports)).packageLog, - packageCustomLog: (init_packageLogs(), __toCommonJS(packageLogs_exports)).packageCustomLog, - getSelector: (init_packageLogs(), __toCommonJS(packageLogs_exports)).getSelector, - buildPath: (init_packageLogs(), __toCommonJS(packageLogs_exports)).buildPath + details: defineCustomDetails, + registerAuthCallback, + addCallbacks, + removeCallbacks, + packageLog, + packageCustomLog, + getSelector, + buildPath }; } export { diff --git a/products/userale/packages/flagon-userale/build/main.mjs.map b/products/userale/packages/flagon-userale/build/main.mjs.map index 969d89b..2c72769 100644 --- a/products/userale/packages/flagon-userale/build/main.mjs.map +++ b/products/userale/packages/flagon-userale/build/main.mjs.map @@ -1 +1 @@ -{"version":3,"sources":["../../../node_modules/.pnpm/tsup@5.12.9_@swc+core@1.11.22_@swc+helpers@0.5.17__postcss@8.5.3_ts-node@10.9.2_@swc+co_7dfb40117802bc289cccbf76535c67e5/node_modules/tsup/assets/esm_shims.js","../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/utils/index.ts","../src/main.ts","../src/configure.ts","../src/getInitialSettings.ts","../src/sendLogs.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport { fileURLToPath } from 'url'\nimport path from 'path'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch (error) {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {\n authCallback,\n updateAuthHeader,\n registerAuthCallback,\n resetAuthCallback,\n verifyCallback as verifyAuthCallback,\n} from \"./auth\";\nexport {\n headersCallback,\n updateCustomHeaders,\n registerHeadersCallback,\n resetHeadersCallback,\n verifyCallback as verifyHeadersCallback,\n} from \"./headers\";\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initPackager, packageCustomLog } from \"@/packageLogs\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function() {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\nexport type { Logging } from \"@/types\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function() {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if(typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n\n\n// Only attach to window in IIFE builds\nif (typeof window !== \"undefined\") {\n (window as any).userale = {\n start,\n stop,\n options,\n log,\n version: userAleVersion,\n details: require(\"@/attachHandlers\").defineCustomDetails,\n registerAuthCallback: require(\"@/utils\").registerAuthCallback,\n addCallbacks: require(\"@/packageLogs\").addCallbacks,\n removeCallbacks: require(\"@/packageLogs\").removeCallbacks,\n packageLog: require(\"@/packageLogs\").packageLog,\n packageCustomLog: require(\"@/packageLogs\").packageCustomLog,\n getSelector: require(\"@/packageLogs\").getSelector,\n buildPath: require(\"@/packageLogs\").buildPath,\n };\n}","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n\n if (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +(5),\n logDetails: false,\n resolution: +(500),\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +(5000),\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n \n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\nlet wsock: WebSocket;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n const url = new URL(config.url);\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock = new WebSocket(config.url);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n/**\n * Attempts to flush the remaining logs when the window is closed.\n * @param {Array} logs Array of logs to be flushed.\n * @param {Configuration} config Configuration singleton to be read from.\n */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function() {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n \n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"application/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCO,SAAS,gBACX,cACH;AACA,eAAa,QAAQ,CAAC,WAAW;AAC/B,QAAI,cAAiD,CAAC;AAEtD,kBAAc,OAAO,KAAK,MAAM,EAAE,OAAO,CAACA,cAAa,QAAQ;AAC7D,MAAAA,aAAY,OAAO,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,aAAOA;AAAA,IACT,GAAG,WAAW;AAEd,WAAO,sBAAsB,MAAM,EAAE,QAAQ,CAAC,QAAQ;AACpD,YAAM,aAAa,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,UAAI,YAAY,YAAY;AAC1B,oBAAY,OAAO;AAAA,MACrB;AAAA,IACF,CAAC;AACD,WAAO,iBAAiB,YAAY,WAAW;AAAA,EACjD,CAAC;AACD,SAAO;AACT;AAMO,SAAS,gBAAgB,YAAsB;AACpD,aAAW,QAAQ,CAAC,QAAQ;AAC1B,QAAI,OAAO,UAAU,eAAe,KAAK,YAAY,GAAG,GAAG;AACzD,aAAO,WAAW;AAAA,IACpB;AAAA,EACF,CAAC;AACH;AAOO,SAAS,aACd,SACA,WACA;AACA,SAAO;AACP,WAAS;AACT,eAAa,CAAC;AACd,eAAa;AACb,iBAAe;AACf,iBAAe;AACf,kBAAgB;AAChB,oBAAkB;AAClB,gBAAc;AAChB;AAQO,SAAS,WACd,GACA,WACA;AACA,MAAI,CAAC,OAAO,IAAI;AACd,WAAO;AAAA,EACT;AAEA,MAAI,UAAU;AACd,MAAI,WAAW;AACb,cAAU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AAS,QAAc;AAC5B,MAAI,CAAC,WAAWF,QAAO,cAAc,OAAO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAIA,IAAI,OAAO,WAAW,aAAa;AACjC,EAAC,OAAe,UAAU;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,8DAA4B;AAAA,IACrC,sBAAsB,4CAAmB;AAAA,IACzC,cAAc,wDAAyB;AAAA,IACvC,iBAAiB,wDAAyB;AAAA,IAC1C,YAAY,wDAAyB;AAAA,IACrC,kBAAkB,wDAAyB;AAAA,IAC3C,aAAa,wDAAyB;AAAA,IACtC,WAAW,wDAAyB;AAAA,EACtC;AACF;","names":["descriptors","log","config","options","config","config","verifyCallback","verifyCallback","settings","logs","config","config","logs","version"]} \ No newline at end of file +{"version":3,"sources":["../src/packageLogs.ts","../src/attachHandlers.ts","../src/utils/auth/index.ts","../src/utils/headers/index.ts","../src/getInitialSettings.ts","../src/configure.ts","../src/sendLogs.ts","../src/main.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Callbacks, Logging } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\nexport let logs: Array;\nlet config: Configuration;\n\n// Interval Logging Globals\nlet intervalId: string | null;\nlet intervalType: string | null;\nlet intervalPath: string[] | null;\nlet intervalTimer: number | null;\nlet intervalCounter: number | null;\nlet intervalLog: Logging.Log | null;\n\nexport const filterHandler: CallableFunction | null = null;\nexport const mapHandler: CallableFunction | null = null;\nexport let cbHandlers: Callbacks.CallbackMap = {};\n\n/**\n * Adds named callbacks to be executed when logging.\n * @param {Object } newCallbacks An object containing named callback functions.\n */\nexport function addCallbacks(\n ...newCallbacks: Record[]\n) {\n newCallbacks.forEach((source) => {\n let descriptors: { [key in string | symbol]: any } = {};\n\n descriptors = Object.keys(source).reduce((descriptors, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, descriptors);\n\n Object.getOwnPropertySymbols(source).forEach((sym) => {\n const descriptor = Object.getOwnPropertyDescriptor(source, sym);\n if (descriptor?.enumerable) {\n descriptors[sym] = descriptor;\n }\n });\n Object.defineProperties(cbHandlers, descriptors);\n });\n return cbHandlers;\n}\n\n/**\n * Removes callbacks by name.\n * @param {String[]} targetKeys A list of names of functions to remove.\n */\nexport function removeCallbacks(targetKeys: string[]) {\n targetKeys.forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(cbHandlers, key)) {\n delete cbHandlers[key];\n }\n });\n}\n\n/**\n * Assigns the config and log container to be used by the logging functions.\n * @param {Array} newLogs Log container.\n * @param {Object} newConfig Configuration to use while logging.\n */\nexport function initPackager(\n newLogs: Array,\n newConfig: Configuration,\n) {\n logs = newLogs;\n config = newConfig;\n cbHandlers = {};\n intervalId = null;\n intervalType = null;\n intervalPath = null;\n intervalTimer = null;\n intervalCounter = 0;\n intervalLog = null;\n}\n\n/**\n * Transforms the provided HTML event into a log and appends it to the log queue.\n * @param {Event} e The event to be logged.\n * @param {Function} detailFcn The function to extract additional log parameters from the event.\n * @return {boolean} Whether the event was logged.\n */\nexport function packageLog(\n e: Event,\n detailFcn?: Logging.DynamicDetailFunction | null,\n) {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn) {\n details = detailFcn(e);\n }\n\n const timeFields = extractTimeFields(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n let log: Logging.Log = {\n target: e.target ? getSelector(e.target) : null,\n path: buildPath(e),\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: timeFields.milli,\n microTime: timeFields.micro,\n location: getLocation(e),\n scrnRes: getScreenRes(),\n type: e.type,\n logType: \"raw\",\n userAction: true,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n attributes: buildAttrs(e),\n style: buildCSS(e),\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, e);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n return true;\n}\n\n/**\n * Packages the provided customLog to include standard meta data and appends it to the log queue.\n * @param {Logging.CustomLog} customLog The behavior to be logged.\n * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event.\n * @param {boolean} userAction Indicates user behavior (true) or system behavior (false)\n * @return {boolean} Whether the event was logged.\n */\nexport function packageCustomLog(\n customLog: Logging.CustomLog,\n detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction,\n userAction: boolean,\n): boolean {\n if (!config.on) {\n return false;\n }\n\n let details = null;\n if (detailFcn.length === 0) {\n // In the case of a union, the type checker will default to the more stringent\n // type, i.e. the DetailFunction that expects an argument for safety purposes.\n // To avoid this, we must explicitly check the type by asserting it receives\n // no arguments (detailFcn.length === 0) and then cast it to the\n // StaticDetailFunction type.\n const staticDetailFcn = detailFcn as Logging.StaticDetailFunction;\n details = staticDetailFcn();\n }\n\n const metaData = {\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n clientTime: Date.now(),\n scrnRes: getScreenRes(),\n logType: \"custom\",\n userAction: userAction,\n details: details,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n let log = Object.assign(metaData, customLog);\n\n if (typeof filterHandler === \"function\" && !filterHandler(log)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n log = mapHandler(log);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n log = func(log, null);\n if (!log) {\n return false;\n }\n }\n }\n\n logs.push(log);\n\n return true;\n}\n\n/**\n * Extract the millisecond and microsecond portions of a timestamp.\n * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields.\n * @return {Object} An object containing the millisecond\n * and microsecond portions of the timestamp.\n */\nexport function extractTimeFields(timeStamp: number) {\n return {\n milli: Math.floor(timeStamp),\n micro: Number((timeStamp % 1).toFixed(3)),\n };\n}\n\n/**\n * Track intervals and gather details about it.\n * @param {Object} e\n * @return boolean\n */\nexport function packageIntervalLog(e: Event) {\n try {\n const target = e.target ? getSelector(e.target) : null;\n const path = buildPath(e);\n const type = e.type;\n const timestamp = Math.floor(\n e.timeStamp && e.timeStamp > 0 ? config.time(e.timeStamp) : Date.now(),\n );\n\n // Init - this should only happen once on initialization\n if (intervalId == null) {\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n if ((intervalId !== target || intervalType !== type) && intervalTimer) {\n // When to create log? On transition end\n // @todo Possible for intervalLog to not be pushed in the event the interval never ends...\n\n intervalLog = {\n target: intervalId,\n path: intervalPath,\n pageUrl: self.location.href,\n pageTitle: document.title,\n pageReferrer: document.referrer,\n userAgent: self.navigator.userAgent,\n count: intervalCounter,\n duration: timestamp - intervalTimer, // microseconds\n startTime: intervalTimer,\n endTime: timestamp,\n type: intervalType,\n logType: \"interval\",\n targetChange: intervalId !== target,\n typeChange: intervalType !== type,\n userAction: false,\n userId: config.userId,\n toolVersion: config.toolVersion,\n toolName: config.toolName,\n useraleVersion: config.useraleVersion,\n sessionId: config.sessionId,\n httpSessionId: config.httpSessionId,\n browserSessionId: config.browserSessionId,\n };\n\n if (typeof filterHandler === \"function\" && !filterHandler(intervalLog)) {\n return false;\n }\n\n if (typeof mapHandler === \"function\") {\n intervalLog = mapHandler(intervalLog, e);\n }\n\n for (const func of Object.values(cbHandlers)) {\n if (typeof func === \"function\") {\n intervalLog = func(intervalLog, null);\n if (!intervalLog) {\n return false;\n }\n }\n }\n\n if (intervalLog) logs.push(intervalLog);\n\n // Reset\n intervalId = target;\n intervalType = type;\n intervalPath = path;\n intervalTimer = timestamp;\n intervalCounter = 0;\n }\n\n // Interval is still occuring, just update counter\n if (intervalId == target && intervalType == type && intervalCounter) {\n intervalCounter = intervalCounter + 1;\n }\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Extracts coordinate information from the event\n * depending on a few browser quirks.\n * @param {Event} e The event to extract coordinate information from.\n * @return {Object} An object containing nullable x and y coordinates for the event.\n */\nexport function getLocation(e: Event) {\n if (e instanceof MouseEvent) {\n if (e.pageX != null) {\n return { x: e.pageX, y: e.pageY };\n } else if (e.clientX != null) {\n return {\n x: document.documentElement.scrollLeft + e.clientX,\n y: document.documentElement.scrollTop + e.clientY,\n };\n }\n } else {\n return { x: null, y: null };\n }\n}\n\n/**\n * Extracts innerWidth and innerHeight to provide estimates of screen resolution\n * @return {Object} An object containing the innerWidth and InnerHeight\n */\nexport function getScreenRes() {\n return { width: self.innerWidth, height: self.innerHeight };\n}\n\n/**\n * Builds a string CSS selector from the provided element\n * @param {EventTarget} ele The element from which the selector is built.\n * @return {string} The CSS selector for the element, or Unknown if it can't be determined.\n */\nexport function getSelector(ele: EventTarget) {\n if (ele instanceof HTMLElement || ele instanceof Element) {\n if (ele.localName) {\n return (\n ele.localName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n } else if (ele.nodeName) {\n return (\n ele.nodeName +\n (ele.id ? \"#\" + ele.id : \"\") +\n (ele.className ? \".\" + ele.className : \"\")\n );\n }\n } else if (ele instanceof Document) {\n return \"#document\";\n } else if (ele === globalThis) {\n return \"Window\";\n }\n return \"Unknown\";\n}\n\n/**\n * Builds an array of elements from the provided event target, to the root element.\n * @param {Event} e Event from which the path should be built.\n * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element.\n */\nexport function buildPath(e: Event) {\n const path = e.composedPath();\n return selectorizePath(path);\n}\n\n/**\n * Builds a CSS selector path from the provided list of elements.\n * @param {EventTarget[]} path Array of HTML Elements from which the path should be built.\n * @return {string[]} Array of string CSS selectors.\n */\nexport function selectorizePath(path: EventTarget[]) {\n let i = 0;\n let pathEle;\n const pathSelectors: string[] = [];\n while ((pathEle = path[i])) {\n pathSelectors.push(getSelector(pathEle));\n ++i;\n pathEle = path[i];\n }\n return pathSelectors;\n}\n\n/**\n * Builds an object containing attributes of an element.\n * Attempts to parse all attribute values as JSON text.\n * @param {Event} e Event from which the target element's attributes should be extracted.\n * @return {Record} Object with element attributes as key-value pairs.\n */\nexport function buildAttrs(e: Event): Record {\n const attributes: Record = {};\n const attributeBlackList = [\"style\"];\n\n if (e.target && e.target instanceof Element) {\n for (const attr of e.target.attributes) {\n if (attributeBlackList.includes(attr.name)) continue;\n let val: any = attr.value;\n try {\n val = JSON.parse(val);\n } catch {\n // Ignore parsing errors, fallback to raw string value\n }\n attributes[attr.name] = val;\n }\n }\n\n return attributes;\n}\n\n/**\n * Builds an object containing all CSS properties of an element.\n * @param {Event} e Event from which the target element's properties should be extracted.\n * @return {Record} Object with all CSS properties as key-value pairs.\n */\nexport function buildCSS(e: Event): Record {\n const properties: Record = {};\n if (e.target && e.target instanceof HTMLElement) {\n const styleObj = e.target.style;\n for (let i = 0; i < styleObj.length; i++) {\n const prop = styleObj[i];\n properties[prop] = styleObj.getPropertyValue(prop);\n }\n }\n return properties;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { packageLog, packageIntervalLog } from \"@/packageLogs\";\nimport { Events, Logging, Settings } from \"@/types\";\nimport { Configuration } from \"@/configure\";\n\n//@todo: Investigate drag events and their behavior\nlet events: Events.EventDetailsMap;\nlet bufferBools: Events.EventBoolMap;\nlet bufferedEvents: Events.EventDetailsMap;\nlet refreshEvents: Events.EventDetailsMap;\nconst intervalEvents: Array = [\n \"click\",\n \"focus\",\n \"blur\",\n \"input\",\n \"change\",\n \"mouseover\",\n \"submit\",\n];\nconst windowEvents: Array = [\"load\", \"blur\", \"focus\"];\n\n/**\n * Maps a MouseEvent to an object containing useful information.\n * @param {MouseEvent} e Event to extract data from\n */\nexport function extractMouseDetails(e: MouseEvent) {\n return {\n clicks: e.detail,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n // 'text' : e.target.innerHTML\n };\n}\n\n/** Maps a KeyboardEvent to an object containing useful infromation\n * @param {KeyboardEvent} e Event to extract data from\n */\nexport function extractKeyboardDetails(e: KeyboardEvent) {\n return {\n key: e.key,\n code: e.code,\n ctrl: e.ctrlKey,\n alt: e.altKey,\n shift: e.shiftKey,\n meta: e.metaKey,\n };\n}\n\n/**\n * Maps an InputEvent to an object containing useful information.\n * @param {InputEvent} e Event to extract data from\n */\nexport function extractInputDetails(e: InputEvent) {\n return {\n value: (e.target as HTMLInputElement).value,\n };\n}\n\n/**\n * Maps a ChangeEvent to an object containing useful information.\n * @param {Events.ChangeEvent} e Event to extract data from\n */\nexport function extractChangeDetails(e: Events.ChangeEvent) {\n return {\n value: e.target.value,\n };\n}\n\n/**\n * Maps a WheelEvent to an object containing useful information.\n * @param {WheelEvent} e Event to extract data from\n */\nexport function extractWheelDetails(e: WheelEvent) {\n return {\n x: e.deltaX,\n y: e.deltaY,\n z: e.deltaZ,\n };\n}\n\n/**\n * Maps a ScrollEvent to an object containing useful information.\n */\nexport function extractScrollDetails() {\n return {\n x: window.scrollX,\n y: window.scrollY,\n };\n}\n\n/**\n * Maps a ResizeEvent to an object containing useful information.\n */\nexport function extractResizeDetails() {\n return {\n width: window.outerWidth,\n height: window.outerHeight,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} config Configuration object to read from.\n */\nexport function defineDetails(config: Settings.DefaultConfig): void {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n events = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n input: config.logDetails ? extractKeyboardDetails : null,\n change: config.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: config.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n };\n\n bufferBools = {};\n bufferedEvents = {\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n };\n\n refreshEvents = {\n submit: null,\n };\n}\n\n/**\n * Defines the way information is extracted from various events.\n * Also defines which events we will listen to.\n * @param {Settings.Config} options UserALE Configuration object to read from.\n * @param {Events.AllowedEvents} type of html event (e.g., 'click', 'mouseover', etc.), such as passed to addEventListener methods.\n */\nexport function defineCustomDetails(\n options: Settings.DefaultConfig,\n type: Events.AllowedEvents,\n): Logging.DynamicDetailFunction | null | undefined {\n // Events list\n // Keys are event types\n // Values are functions that return details object if applicable\n const eventType: Events.EventDetailsMap = {\n click: extractMouseDetails,\n dblclick: extractMouseDetails,\n mousedown: extractMouseDetails,\n mouseup: extractMouseDetails,\n focus: null,\n blur: null,\n load: null,\n input: options.logDetails ? extractKeyboardDetails : null,\n change: options.logDetails ? extractChangeDetails : null,\n dragstart: null,\n dragend: null,\n drag: null,\n drop: null,\n keydown: options.logDetails ? extractKeyboardDetails : null,\n mouseover: null,\n wheel: extractWheelDetails,\n scroll: extractScrollDetails,\n resize: extractResizeDetails,\n submit: null,\n };\n return eventType[type];\n}\n\n/**\n * Hooks the event handlers for each event type of interest.\n * @param {Configuration} config Configuration singleton to use.\n * @return {boolean} Whether the operation succeeded\n */\nexport function attachHandlers(config: Configuration): boolean {\n try {\n defineDetails(config);\n\n (Object.keys(events) as Events.AllowedEvents[]).forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n });\n\n intervalEvents.forEach(function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageIntervalLog(e);\n },\n true,\n );\n });\n\n (Object.keys(bufferedEvents) as Events.BufferedEvents[]).forEach(\n function (ev) {\n bufferBools[ev] = true;\n\n self.addEventListener(\n ev,\n function (e) {\n if (bufferBools[ev]) {\n bufferBools[ev] = false;\n packageLog(e, bufferedEvents[ev]);\n setTimeout(function () {\n bufferBools[ev] = true;\n }, config.resolution);\n }\n },\n true,\n );\n },\n );\n\n (Object.keys(refreshEvents) as Events.RefreshEvents[]).forEach(\n function (ev) {\n document.addEventListener(\n ev,\n function (e) {\n packageLog(e, events[ev]);\n },\n true,\n );\n },\n );\n\n windowEvents.forEach(function (ev) {\n self.addEventListener(\n ev,\n function (e) {\n packageLog(e, function () {\n return { window: true };\n });\n },\n true,\n );\n });\n\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let authCallback: Callbacks.AuthCallback | null = null;\n\n/**\n * Fetches the most up-to-date auth header string from the auth callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Function} authCallback Callback used to fetch the newest header.\n * @returns {void}\n */\nexport function updateAuthHeader(config: Configuration) {\n if (authCallback) {\n try {\n config.authHeader = authCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the authCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the auth header: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerAuthCallback(callback: Callbacks.AuthCallback) {\n try {\n verifyCallback(callback);\n authCallback = callback;\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Function} callback Callback used to fetch the newest header. Should return a string.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.AuthCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale auth callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"string\") {\n throw new Error(\"Userale auth callback must return a string\");\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetAuthCallback() {\n authCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Callbacks } from \"@/types\";\n\nexport let headersCallback: Callbacks.HeadersCallback | null = null;\n\n/**\n * Fetches the most up-to-date custom headers object from the headers callback\n * and updates the config object with the new value.\n * @param {Configuration} config Configuration object to be updated.\n * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers.\n * @returns {void}\n */\nexport function updateCustomHeaders(config: Configuration) {\n if (headersCallback) {\n try {\n config.headers = headersCallback();\n } catch (e) {\n // We should emit the error, but otherwise continue as this could be a temporary issue\n // due to network connectivity or some logic inside the headersCallback which is the user's\n // responsibility.\n console.error(`Error encountered while setting the headers: ${e}`);\n }\n }\n}\n\n/**\n * Registers the provided callback to be used when updating the auth header.\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object.\n * @returns {boolean} Whether the operation succeeded.\n */\nexport function registerHeadersCallback(callback: Callbacks.HeadersCallback) {\n try {\n verifyCallback(callback);\n headersCallback = callback;\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Verify that the provided callback is a function which returns a string\n * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object.\n * @throws {Error} If the callback is not a function or does not return a string.\n * @returns {void}\n */\nexport function verifyCallback(callback: Callbacks.HeadersCallback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Userale headers callback must be a function\");\n }\n const result = callback();\n if (typeof result !== \"object\") {\n throw new Error(\"Userale headers callback must return an object\");\n }\n for (const [key, value] of Object.entries(result)) {\n if (typeof key !== \"string\" || typeof value !== \"string\") {\n throw new Error(\n \"Userale header callback must return an object with string keys and values\",\n );\n }\n }\n}\n\n/**\n * Resets the authCallback to null. Used for primarily for testing, but could be used\n * to remove the callback in production.\n * @returns {void}\n */\nexport function resetHeadersCallback() {\n headersCallback = null;\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the 'License'); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Settings } from \"./types\";\n\nlet sessionId: string | null = null;\nlet httpSessionId: string | null = null;\n\n/**\n * Extracts the initial configuration settings from the\n * currently executing script tag.\n * @return {Object} The extracted configuration object\n */\nexport function getInitialSettings(): Settings.Config {\n if (\n typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope\n ) {\n const settings: Settings.Config = {\n authHeader: null,\n autostart: true,\n browserSessionId: null,\n custIndex: null,\n headers: null,\n httpSessionId: null,\n logCountThreshold: +5,\n logDetails: false,\n resolution: +500,\n sessionId: sessionId,\n time: (ts?: number) => (ts !== undefined ? ts : Date.now()),\n toolName: null,\n toolVersion: null,\n transmitInterval: +5000,\n url: \"http://localhost:8000\",\n useraleVersion: null,\n userFromParams: null,\n userId: null,\n };\n return settings;\n }\n\n if (sessionId === null) {\n sessionId = getsessionId(\n \"userAlesessionId\",\n \"session_\" + String(Date.now()),\n );\n }\n\n if (httpSessionId === null) {\n httpSessionId = getsessionId(\n \"userAleHttpSessionId\",\n generatehttpSessionId(),\n );\n }\n\n const script =\n document.currentScript ||\n (function () {\n const scripts = document.getElementsByTagName(\"script\");\n return scripts[scripts.length - 1];\n })();\n\n const get = script\n ? script.getAttribute.bind(script)\n : function () {\n return null;\n };\n const headers = get(\"data-headers\");\n const settings: Settings.Config = {\n authHeader: get(\"data-auth\") || null,\n autostart: get(\"data-autostart\") === \"false\" ? false : true,\n browserSessionId: null,\n custIndex: get(\"data-index\") || null,\n headers: headers ? JSON.parse(headers) : null,\n httpSessionId: httpSessionId,\n logCountThreshold: +(get(\"data-threshold\") || 5),\n logDetails: get(\"data-log-details\") === \"true\" ? true : false,\n resolution: +(get(\"data-resolution\") || 500),\n sessionId: get(\"data-session\") || sessionId,\n time: timeStampScale(document.createEvent(\"CustomEvent\")),\n toolName: get(\"data-tool\") || null,\n toolVersion: get(\"data-version\") || null,\n transmitInterval: +(get(\"data-interval\") || 5000),\n url: get(\"data-url\") || \"http://localhost:8000\",\n useraleVersion: get(\"data-userale-version\") || null,\n userFromParams: get(\"data-user-from-params\") || null,\n userId: get(\"data-user\") || null,\n };\n return settings;\n}\n\n/**\n * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in\n * storage when script is started. This prevents events like 'submit', which refresh page data\n * from refreshing the current user session\n *\n */\nexport function getsessionId(sessionKey: string, value: any) {\n if (self.sessionStorage.getItem(sessionKey) === null) {\n self.sessionStorage.setItem(sessionKey, JSON.stringify(value));\n return value;\n }\n\n return JSON.parse(self.sessionStorage.getItem(sessionKey) || \"\");\n}\n\n/**\n * Creates a function to normalize the timestamp of the provided event.\n * @param {Event} e An event containing a timeStamp property.\n * @return {typeof timeStampScale~tsScaler} The timestamp normalizing function.\n */\nexport function timeStampScale(e: Event): Settings.TimeFunction {\n let tsScaler: Settings.TimeFunction;\n if (e.timeStamp && e.timeStamp > 0) {\n const delta = Date.now() - e.timeStamp;\n /**\n * Returns a timestamp depending on various browser quirks.\n * @param {?Number} ts A timestamp to use for normalization.\n * @return {Number} A normalized timestamp.\n */\n\n if (delta < 0) {\n tsScaler = function () {\n return e.timeStamp / 1000;\n };\n } else if (delta > e.timeStamp) {\n const navStart = performance.timeOrigin;\n tsScaler = function (ts) {\n return ts + navStart;\n };\n } else {\n tsScaler = function (ts) {\n return ts;\n };\n }\n } else {\n tsScaler = function () {\n return Date.now();\n };\n }\n\n return tsScaler;\n}\n\n/**\n * Creates a cryptographiclly random string to represent this http session.\n * @return {String} A random 32 digit hex string\n */\nfunction generatehttpSessionId(): string {\n // 32 digit hex -> 128 bits of info -> 2^64 ~= 10^19 sessions needed for 50% chance of collison\n const len = 32;\n const arr = new Uint8Array(len / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, (dec) => {\n return dec.toString(16).padStart(2, \"0\");\n }).join(\"\");\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInitialSettings } from \"@/getInitialSettings\";\nimport type { Settings } from \"@/types\";\n\n// Singleton Configuration class\nexport class Configuration {\n [key: string]: Settings.ConfigValueTypes;\n // Private static property to hold the singleton instance\n private static instance: Configuration | null = null;\n\n // Public properties corresponding to fields in the Config interface\n public autostart: boolean = false;\n public authHeader: Settings.AuthHeader = null;\n public browserSessionId: Settings.SessionId = null;\n public custIndex: Settings.CustomIndex = null;\n public headers: Settings.Headers = null;\n public httpSessionId: Settings.SessionId = null;\n public logCountThreshold: number = 0;\n public logDetails: boolean = false;\n public on: boolean = false;\n public resolution: number = 0;\n public sessionId: Settings.SessionId = null;\n public time: Settings.TimeFunction = () => Date.now();\n public toolName: Settings.ToolName = null;\n public toolVersion: Settings.Version = null;\n public transmitInterval: number = 0;\n public url: string = \"\";\n public userFromParams: Settings.UserFromParams = null;\n public useraleVersion: Settings.Version = null;\n public userId: Settings.UserId = null;\n public version: Settings.Version = null;\n public websocketsEnabled: boolean = false;\n\n // Private constructor to prevent external instantiation\n private constructor() {\n // Call the initialization method only if it's the first time instantiating\n if (Configuration.instance === null) {\n this.initialize();\n }\n }\n\n // Static method to get the singleton instance\n public static getInstance(): Configuration {\n if (Configuration.instance === null) {\n Configuration.instance = new Configuration();\n }\n return Configuration.instance;\n }\n\n private initialize(): void {\n const settings = getInitialSettings();\n this.update(settings);\n }\n\n /**\n * Resets the configuration to its initial state.\n */\n public reset(): void {\n this.initialize();\n }\n\n /**\n * Shallow merges a newConfig with the configuration class, updating it.\n * Retrieves/updates the userid if userFromParams is provided.\n * @param {Partial} newConfig Configuration object to merge into the current config.\n */\n public update(newConfig: Partial): void {\n Object.keys(newConfig).forEach((option) => {\n if (option === \"userFromParams\") {\n const userParamString = newConfig[option] as Settings.UserFromParams;\n const userId = userParamString\n ? Configuration.getUserIdFromParams(userParamString)\n : null;\n if (userId) {\n this[\"userId\"] = userId;\n }\n }\n const hasNewUserFromParams = newConfig[\"userFromParams\"];\n const willNullifyUserId =\n option === \"userId\" && newConfig[option] === null;\n if (willNullifyUserId && hasNewUserFromParams) {\n return;\n }\n\n const newOption = newConfig[option];\n if (newOption !== undefined) {\n this[option] = newOption;\n }\n });\n }\n\n /**\n * Attempts to extract the userid from the query parameters of the URL.\n * @param {string} param The name of the query parameter containing the userid.\n * @return {string | null} The extracted/decoded userid, or null if none is found.\n */\n public static getUserIdFromParams(param: string) {\n const userField = param;\n const regex = new RegExp(\"[?&]\" + userField + \"(=([^&#]*)|&|#|$)\");\n const results = window.location.href.match(regex);\n\n if (results && results[2]) {\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }\n return null;\n }\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Configuration } from \"@/configure\";\nimport { Logging } from \"@/types\";\nimport { updateAuthHeader, updateCustomHeaders } from \"@/utils\";\n\nlet sendIntervalId: string | number | NodeJS.Timeout | undefined;\nlet wsock: WebSocket;\n\n/**\n * Initializes the log queue processors.\n * @param {Array} logs Array of logs to append to.\n * @param {Configuration} config Configuration object to use when logging.\n */\nexport function initSender(logs: Array, config: Configuration) {\n if (sendIntervalId) {\n clearInterval(sendIntervalId);\n }\n\n const url = new URL(config.url);\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock = new WebSocket(config.url);\n }\n\n sendIntervalId = sendOnInterval(logs, config);\n sendOnClose(logs, config);\n}\n\n/**\n * Checks the provided log array on an interval, flushing the logs\n * if the queue has reached the threshold specified by the provided config.\n * @param {Array} logs Array of logs to read from.\n * @param {Configuration} config Configuration singleton to be read from.\n * @return {Number} The newly created interval id.\n */\nexport function sendOnInterval(\n logs: Array,\n config: Configuration,\n): NodeJS.Timeout {\n return setInterval(function () {\n if (!config.on) {\n return;\n }\n\n if (logs.length >= config.logCountThreshold) {\n sendLogs(logs.slice(0), config, 0); // Send a copy\n logs.splice(0); // Clear array reference (no reassignment)\n }\n }, config.transmitInterval);\n}\n\n// /**\n// * Attempts to flush the remaining logs when the window is closed.\n// * @param {Array} logs Array of logs to be flushed.\n// * @param {Configuration} config Configuration singleton to be read from.\n// */\nexport function sendOnClose(\n logs: Array,\n config: Configuration,\n): void {\n self.addEventListener(\"pagehide\", function () {\n if (!config.on) {\n return;\n }\n\n if (logs.length > 0) {\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n const data = JSON.stringify(logs);\n wsock.send(data);\n } else {\n const headers: HeadersInit = new Headers();\n headers.set(\"Content-Type\", \"application/json;charset=UTF-8\");\n\n if (config.authHeader) {\n headers.set(\"Authorization\", config.authHeader.toString());\n }\n\n fetch(config.url, {\n keepalive: true,\n method: \"POST\",\n headers: headers,\n body: JSON.stringify(logs),\n }).catch((error) => {\n console.error(error);\n });\n }\n logs.splice(0); // clear log queue\n }\n });\n}\n\n/**\n * Sends the provided array of logs to the specified url,\n * retrying the request up to the specified number of retries.\n * @param {Array} logs Array of logs to send.\n * @param {Configuration} config configuration singleton.\n * @param {Number} retries Maximum number of attempts to send the logs.\n */\nexport async function sendLogs(\n logs: Array,\n config: Configuration,\n retries: number,\n): Promise {\n const data = JSON.stringify(logs);\n const url = new URL(config.url);\n\n if (url.protocol === \"ws:\" || url.protocol === \"wss:\") {\n wsock.send(data);\n return;\n }\n\n // Build headers\n const headers = new Headers({\n \"Content-Type\": \"application/json;charset=UTF-8\",\n });\n\n updateAuthHeader(config);\n if (config.authHeader) {\n const authHeaderValue =\n typeof config.authHeader === \"function\"\n ? config.authHeader()\n : config.authHeader;\n headers.set(\"Authorization\", authHeaderValue);\n }\n\n // Update custom headers last to allow them to over-write the defaults. This assumes\n // the user knows what they are doing and may want to over-write the defaults.\n updateCustomHeaders(config);\n if (config.headers) {\n for (const [header, value] of Object.entries(config.headers)) {\n headers.set(header, value);\n }\n }\n\n async function attemptSend(remainingRetries: number): Promise {\n try {\n const response = await fetch(config.url, {\n method: \"POST\",\n headers,\n body: data,\n });\n\n if (!response.ok) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n } else {\n throw new Error(`Failed to send logs: ${response.statusText}`);\n }\n }\n } catch (error) {\n if (remainingRetries > 0) {\n return attemptSend(remainingRetries - 1);\n }\n throw error;\n }\n }\n\n return attemptSend(retries);\n}\n","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineCustomDetails } from \"@/attachHandlers\";\nimport { registerAuthCallback } from \"@/utils\";\nimport {\n addCallbacks,\n removeCallbacks,\n packageLog,\n packageCustomLog,\n getSelector,\n buildPath,\n initPackager,\n} from \"@/packageLogs\";\nimport { version as userAleVersion } from \"../package.json\";\nimport { Configuration } from \"@/configure\";\nimport { attachHandlers } from \"@/attachHandlers\";\nimport { initSender } from \"@/sendLogs\";\n\nimport type { Settings, Logging } from \"@/types\";\n\nconst config = Configuration.getInstance();\nconst logs: Array = [];\n\nconst startLoadTimestamp = Date.now();\nlet endLoadTimestamp: number;\nself.onload = function () {\n endLoadTimestamp = Date.now();\n};\n\nexport let started = false;\nexport { defineCustomDetails as details } from \"@/attachHandlers\";\nexport { registerAuthCallback as registerAuthCallback } from \"@/utils\";\nexport {\n addCallbacks as addCallbacks,\n removeCallbacks as removeCallbacks,\n packageLog as packageLog,\n packageCustomLog as packageCustomLog,\n getSelector as getSelector,\n buildPath as buildPath,\n} from \"@/packageLogs\";\nexport type { Logging } from \"@/types\";\n\nconfig.update({\n useraleVersion: userAleVersion,\n});\ninitPackager(logs, config);\nif (config.autostart) {\n setup(config);\n}\n\n/**\n * Hooks the global event listener, and starts up the\n * logging interval.\n * @param {Configuration} config Configuration settings for the logger\n */\nfunction setup(config: Configuration) {\n if (!started) {\n setTimeout(function () {\n let state;\n try {\n state = document.readyState;\n } catch (error) {\n // Assume there is no DOM and this is a web worker context\n state = \"complete\";\n }\n\n if (\n config.autostart &&\n (state === \"interactive\" || state === \"complete\")\n ) {\n attachHandlers(config);\n initSender(logs, config);\n started = config.on = true;\n if (typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n packageCustomLog(\n {\n type: \"load\",\n details: { pageLoadTime: endLoadTimestamp - startLoadTimestamp },\n },\n () => ({}),\n false,\n );\n }\n } else {\n setup(config);\n }\n }, 100);\n }\n}\n\n// Export the Userale API\nexport const version = userAleVersion;\n\n/**\n * Used to start the logging process if the\n * autostart configuration option is set to false.\n */\nexport function start(): void {\n if (!started || config.autostart === false) {\n started = config.on = true;\n config.update({ autostart: true });\n }\n}\n\n/**\n * Halts the logging process. Logs will no longer be sent.\n */\nexport function stop(): void {\n started = config.on = false;\n config.update({ autostart: false });\n}\n\n/**\n * Updates the current configuration\n * object with the provided values.\n * @param {Partial} newConfig The configuration options to use.\n * @return {Settings.Config} Returns the updated configuration.\n */\nexport function options(\n newConfig: Partial | undefined,\n): Settings.Config {\n if (newConfig) {\n config.update(newConfig);\n }\n\n return config;\n}\n\n/**\n * Appends a log to the log queue.\n * @param {Logging.CustomLog} customLog The log to append.\n * @return {boolean} Whether the operation succeeded.\n */\nexport function log(customLog: Logging.CustomLog | undefined) {\n if (customLog) {\n logs.push(customLog);\n return true;\n } else {\n return false;\n }\n}\n\n// Only attach to window in IIFE builds\nif (typeof window !== \"undefined\") {\n (window as any).userale = {\n start,\n stop,\n options,\n log,\n version: userAleVersion,\n details: defineCustomDetails,\n registerAuthCallback,\n addCallbacks,\n removeCallbacks,\n packageLog,\n packageCustomLog,\n getSelector,\n buildPath,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoBO,IAAI;AACX,IAAI;AAGJ,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AAEG,IAAM,gBAAyC;AAC/C,IAAM,aAAsC;AAC5C,IAAI,aAAoC,CAAC;AAMzC,SAAS,gBACX,cACH;AACA,eAAa,QAAQ,CAAC,WAAW;AAC/B,QAAI,cAAiD,CAAC;AAEtD,kBAAc,OAAO,KAAK,MAAM,EAAE,OAAO,CAACA,cAAa,QAAQ;AAC7D,MAAAA,aAAY,OAAO,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,aAAOA;AAAA,IACT,GAAG,WAAW;AAEd,WAAO,sBAAsB,MAAM,EAAE,QAAQ,CAAC,QAAQ;AACpD,YAAM,aAAa,OAAO,yBAAyB,QAAQ,GAAG;AAC9D,UAAI,YAAY,YAAY;AAC1B,oBAAY,OAAO;AAAA,MACrB;AAAA,IACF,CAAC;AACD,WAAO,iBAAiB,YAAY,WAAW;AAAA,EACjD,CAAC;AACD,SAAO;AACT;AAMO,SAAS,gBAAgB,YAAsB;AACpD,aAAW,QAAQ,CAAC,QAAQ;AAC1B,QAAI,OAAO,UAAU,eAAe,KAAK,YAAY,GAAG,GAAG;AACzD,aAAO,WAAW;AAAA,IACpB;AAAA,EACF,CAAC;AACH;AAOO,SAAS,aACd,SACA,WACA;AACA,SAAO;AACP,WAAS;AACT,eAAa,CAAC;AACd,eAAa;AACb,iBAAe;AACf,iBAAe;AACf,kBAAgB;AAChB,oBAAkB;AAClB,gBAAc;AAChB;AAQO,SAAS,WACd,GACA,WACA;AACA,MAAI,CAAC,OAAO,IAAI;AACd,WAAO;AAAA,EACT;AAEA,MAAI,UAAU;AACd,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AO;AAC1C,cAAUA,QAAO,KAAK;AACtB,IAAAA,QAAO,OAAO,EAAE,WAAW,KAAK,CAAC;AAAA,EACnC;AACF;AAKO,SAAS,OAAa;AAC3B,YAAUA,QAAO,KAAK;AACtB,EAAAA,QAAO,OAAO,EAAE,WAAW,MAAM,CAAC;AACpC;AAQO,SAAS,QACd,WACiB;AACjB,MAAI,WAAW;AACb,IAAAA,QAAO,OAAO,SAAS;AAAA,EACzB;AAEA,SAAOA;AACT;AAOO,SAAS,IAAI,WAA0C;AAC5D,MAAI,WAAW;AACb,IAAAC,MAAK,KAAK,SAAS;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAGA,IAAI,OAAO,WAAW,aAAa;AACjC,EAAC,OAAe,UAAU;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["descriptors","log","config","options","config","config","settings","logs","config","config","logs","version"]} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/packageLogs.d.ts b/products/userale/packages/flagon-userale/build/packageLogs.d.ts new file mode 100644 index 0000000..fc4dff2 --- /dev/null +++ b/products/userale/packages/flagon-userale/build/packageLogs.d.ts @@ -0,0 +1,106 @@ +import { Callbacks, Logging } from "@/types"; +import { Configuration } from "@/configure"; +export declare let logs: Array; +export declare const filterHandler: CallableFunction | null; +export declare const mapHandler: CallableFunction | null; +export declare let cbHandlers: Callbacks.CallbackMap; +/** + * Adds named callbacks to be executed when logging. + * @param {Object } newCallbacks An object containing named callback functions. + */ +export declare function addCallbacks(...newCallbacks: Record[]): Callbacks.CallbackMap; +/** + * Removes callbacks by name. + * @param {String[]} targetKeys A list of names of functions to remove. + */ +export declare function removeCallbacks(targetKeys: string[]): void; +/** + * Assigns the config and log container to be used by the logging functions. + * @param {Array} newLogs Log container. + * @param {Object} newConfig Configuration to use while logging. + */ +export declare function initPackager(newLogs: Array, newConfig: Configuration): void; +/** + * Transforms the provided HTML event into a log and appends it to the log queue. + * @param {Event} e The event to be logged. + * @param {Function} detailFcn The function to extract additional log parameters from the event. + * @return {boolean} Whether the event was logged. + */ +export declare function packageLog(e: Event, detailFcn?: Logging.DynamicDetailFunction | null): boolean; +/** + * Packages the provided customLog to include standard meta data and appends it to the log queue. + * @param {Logging.CustomLog} customLog The behavior to be logged. + * @param {Logging.DynamicDetailFunction} detailFcn The function to extract additional log parameters from the event. + * @param {boolean} userAction Indicates user behavior (true) or system behavior (false) + * @return {boolean} Whether the event was logged. + */ +export declare function packageCustomLog(customLog: Logging.CustomLog, detailFcn: Logging.DynamicDetailFunction | Logging.StaticDetailFunction, userAction: boolean): boolean; +/** + * Extract the millisecond and microsecond portions of a timestamp. + * @param {Number} timeStamp The timestamp to split into millisecond and microsecond fields. + * @return {Object} An object containing the millisecond + * and microsecond portions of the timestamp. + */ +export declare function extractTimeFields(timeStamp: number): { + milli: number; + micro: number; +}; +/** + * Track intervals and gather details about it. + * @param {Object} e + * @return boolean + */ +export declare function packageIntervalLog(e: Event): boolean; +/** + * Extracts coordinate information from the event + * depending on a few browser quirks. + * @param {Event} e The event to extract coordinate information from. + * @return {Object} An object containing nullable x and y coordinates for the event. + */ +export declare function getLocation(e: Event): { + x: number; + y: number; +} | { + x: null; + y: null; +} | undefined; +/** + * Extracts innerWidth and innerHeight to provide estimates of screen resolution + * @return {Object} An object containing the innerWidth and InnerHeight + */ +export declare function getScreenRes(): { + width: number; + height: number; +}; +/** + * Builds a string CSS selector from the provided element + * @param {EventTarget} ele The element from which the selector is built. + * @return {string} The CSS selector for the element, or Unknown if it can't be determined. + */ +export declare function getSelector(ele: EventTarget): string; +/** + * Builds an array of elements from the provided event target, to the root element. + * @param {Event} e Event from which the path should be built. + * @return {HTMLElement[]} Array of elements, starting at the event target, ending at the root element. + */ +export declare function buildPath(e: Event): string[]; +/** + * Builds a CSS selector path from the provided list of elements. + * @param {EventTarget[]} path Array of HTML Elements from which the path should be built. + * @return {string[]} Array of string CSS selectors. + */ +export declare function selectorizePath(path: EventTarget[]): string[]; +/** + * Builds an object containing attributes of an element. + * Attempts to parse all attribute values as JSON text. + * @param {Event} e Event from which the target element's attributes should be extracted. + * @return {Record} Object with element attributes as key-value pairs. + */ +export declare function buildAttrs(e: Event): Record; +/** + * Builds an object containing all CSS properties of an element. + * @param {Event} e Event from which the target element's properties should be extracted. + * @return {Record} Object with all CSS properties as key-value pairs. + */ +export declare function buildCSS(e: Event): Record; +//# sourceMappingURL=packageLogs.d.ts.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/sendLogs.d.ts b/products/userale/packages/flagon-userale/build/sendLogs.d.ts new file mode 100644 index 0000000..7aef366 --- /dev/null +++ b/products/userale/packages/flagon-userale/build/sendLogs.d.ts @@ -0,0 +1,26 @@ +import { Configuration } from "@/configure"; +import { Logging } from "@/types"; +/** + * Initializes the log queue processors. + * @param {Array} logs Array of logs to append to. + * @param {Configuration} config Configuration object to use when logging. + */ +export declare function initSender(logs: Array, config: Configuration): void; +/** + * Checks the provided log array on an interval, flushing the logs + * if the queue has reached the threshold specified by the provided config. + * @param {Array} logs Array of logs to read from. + * @param {Configuration} config Configuration singleton to be read from. + * @return {Number} The newly created interval id. + */ +export declare function sendOnInterval(logs: Array, config: Configuration): NodeJS.Timeout; +export declare function sendOnClose(logs: Array, config: Configuration): void; +/** + * Sends the provided array of logs to the specified url, + * retrying the request up to the specified number of retries. + * @param {Array} logs Array of logs to send. + * @param {Configuration} config configuration singleton. + * @param {Number} retries Maximum number of attempts to send the logs. + */ +export declare function sendLogs(logs: Array, config: Configuration, retries: number): Promise; +//# sourceMappingURL=sendLogs.d.ts.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/utils/auth/index.d.ts b/products/userale/packages/flagon-userale/build/utils/auth/index.d.ts new file mode 100644 index 0000000..fee0184 --- /dev/null +++ b/products/userale/packages/flagon-userale/build/utils/auth/index.d.ts @@ -0,0 +1,31 @@ +import { Configuration } from "@/configure"; +import { Callbacks } from "@/types"; +export declare let authCallback: Callbacks.AuthCallback | null; +/** + * Fetches the most up-to-date auth header string from the auth callback + * and updates the config object with the new value. + * @param {Configuration} config Configuration object to be updated. + * @param {Function} authCallback Callback used to fetch the newest header. + * @returns {void} + */ +export declare function updateAuthHeader(config: Configuration): void; +/** + * Registers the provided callback to be used when updating the auth header. + * @param {Callbacks.AuthCallback} callback Callback used to fetch the newest header. Should return a string. + * @returns {boolean} Whether the operation succeeded. + */ +export declare function registerAuthCallback(callback: Callbacks.AuthCallback): boolean; +/** + * Verify that the provided callback is a function which returns a string + * @param {Function} callback Callback used to fetch the newest header. Should return a string. + * @throws {Error} If the callback is not a function or does not return a string. + * @returns {void} + */ +export declare function verifyCallback(callback: Callbacks.AuthCallback): void; +/** + * Resets the authCallback to null. Used for primarily for testing, but could be used + * to remove the callback in production. + * @returns {void} + */ +export declare function resetAuthCallback(): void; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/utils/headers/index.d.ts b/products/userale/packages/flagon-userale/build/utils/headers/index.d.ts new file mode 100644 index 0000000..a8c3190 --- /dev/null +++ b/products/userale/packages/flagon-userale/build/utils/headers/index.d.ts @@ -0,0 +1,31 @@ +import { Configuration } from "@/configure"; +import { Callbacks } from "@/types"; +export declare let headersCallback: Callbacks.HeadersCallback | null; +/** + * Fetches the most up-to-date custom headers object from the headers callback + * and updates the config object with the new value. + * @param {Configuration} config Configuration object to be updated. + * @param {Callbacks.HeadersCallback} headersCallback Callback used to fetch the newest headers. + * @returns {void} + */ +export declare function updateCustomHeaders(config: Configuration): void; +/** + * Registers the provided callback to be used when updating the auth header. + * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest headers. Should return an object. + * @returns {boolean} Whether the operation succeeded. + */ +export declare function registerHeadersCallback(callback: Callbacks.HeadersCallback): boolean; +/** + * Verify that the provided callback is a function which returns a string + * @param {Callbacks.HeadersCallback} callback Callback used to fetch the newest header. Should return an object. + * @throws {Error} If the callback is not a function or does not return a string. + * @returns {void} + */ +export declare function verifyCallback(callback: Callbacks.HeadersCallback): void; +/** + * Resets the authCallback to null. Used for primarily for testing, but could be used + * to remove the callback in production. + * @returns {void} + */ +export declare function resetHeadersCallback(): void; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/build/utils/index.d.ts b/products/userale/packages/flagon-userale/build/utils/index.d.ts new file mode 100644 index 0000000..99a4b5a --- /dev/null +++ b/products/userale/packages/flagon-userale/build/utils/index.d.ts @@ -0,0 +1,3 @@ +export { authCallback, updateAuthHeader, registerAuthCallback, resetAuthCallback, verifyCallback as verifyAuthCallback, } from "./auth"; +export { headersCallback, updateCustomHeaders, registerHeadersCallback, resetHeadersCallback, verifyCallback as verifyHeadersCallback, } from "./headers"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/eslint.config.ts b/products/userale/packages/flagon-userale/eslint.config.ts deleted file mode 100644 index 859a5ec..0000000 --- a/products/userale/packages/flagon-userale/eslint.config.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import globals from "globals"; -import pluginJs from "@eslint/js"; -import tseslint from "typescript-eslint"; - - -export default [ - {languageOptions: { globals: globals.browser }}, - pluginJs.configs.recommended, - ...tseslint.configs.recommended, -]; diff --git a/products/userale/packages/flagon-userale/example/react-app-example/src/App.js b/products/userale/packages/flagon-userale/example/react-app-example/src/App.js index fb8ef69..f5979e6 100644 --- a/products/userale/packages/flagon-userale/example/react-app-example/src/App.js +++ b/products/userale/packages/flagon-userale/example/react-app-example/src/App.js @@ -15,35 +15,46 @@ * limitations under the License. */ -import logo from './logo.svg'; -import './App.css'; -import * as userale from 'flagon-userale' +import logo from "./logo.svg"; +import "./App.css"; +import * as userale from "flagon-userale"; function App() { const handleOnClick = () => { - userale.start() - } + userale.start(); + }; userale.options({ autostart: false, - logCountThreshold: '1', - transmitInterval: '1000', - toolName: "Apache UserALE React Example" - }) + logCountThreshold: "1", + transmitInterval: "1000", + toolName: "Apache UserALE React Example", + }); userale.filter(function (log) { - var type_array = ['mouseup', 'mouseover', 'mousedown', 'keydown', 'dblclick', 'blur', 'focus', 'input', 'wheel', 'scroll']; - var logType_array = ['interval']; - return !type_array.includes(log.type) && !logType_array.includes(log.logType); - }) + var type_array = [ + "mouseup", + "mouseover", + "mousedown", + "keydown", + "dblclick", + "blur", + "focus", + "input", + "wheel", + "scroll", + ]; + var logType_array = ["interval"]; + return ( + !type_array.includes(log.type) && !logType_array.includes(log.logType) + ); + }); return (
logo -

- Click this text to start userale. -

+

Click this text to start userale.

, - document.getElementById('root') -); \ No newline at end of file + document.getElementById("root"), +); diff --git a/products/userale/packages/flagon-userale/example/react-app-example/src/setupTests.js b/products/userale/packages/flagon-userale/example/react-app-example/src/setupTests.js index ff2e7b5..08020be 100644 --- a/products/userale/packages/flagon-userale/example/react-app-example/src/setupTests.js +++ b/products/userale/packages/flagon-userale/example/react-app-example/src/setupTests.js @@ -19,4 +19,4 @@ // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; +import "@testing-library/jest-dom"; diff --git a/products/userale/packages/flagon-userale/example/test-client.js b/products/userale/packages/flagon-userale/example/test-client.js new file mode 100644 index 0000000..a807a79 --- /dev/null +++ b/products/userale/packages/flagon-userale/example/test-client.js @@ -0,0 +1,32 @@ +"use strict"; +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +const ws = new WebSocket("ws://localhost:8000"); +const encoder = new TextEncoder(); +ws.onopen = (event) => { + let logs = new Array(); + logs.push('{"target": "#document","path": [ "Window" ], "pageUrl": "https://github.com/apache/flagon/tree/master/docker", "pageTitle": "flagon/docker at master · apache/flagon · GitHub", "pageReferrer": "https://gov.teams.microsoft.us/", "browser": { "browser": "chrome", "version": "116.0.0" }, "clientTime": 1719530111079, "microTime": 0,"location": { "x": null, "y": null }, "scrnRes": { "width": 1349, "height":954 }, "type": "load", "logType": "raw", "userAction": true, "details": {"window": true }, "userId": "nobody", "toolVersion": null, "toolName":"test_app", "useraleVersion": "2.3.0", "sessionId":"session_1719530074303", "httpSessionId": "72798a8ad776417183b1aa14e03c3132", "browserSessionId": "06b0db1ab30e8e92819ba3d4091b83bc"}'); + logs.push('{"target": "#document","path": [ "Window" ], "pageUrl": "https://github.com/apache/flagon/tree/master/docker", "pageTitle": "flagon/docker at master · apache/flagon · GitHub", "pageReferrer": "https://gov.teams.microsoft.us/", "browser": { "browser": "chrome", "version": "116.0.0" }, "clientTime": 1719530111079, "microTime": 0,"location": { "x": null, "y": null }, "scrnRes": { "width": 1349, "height":954 }, "type": "load", "logType": "raw", "userAction": true, "details": {"window": true }, "userId": "nobody", "toolVersion": null, "toolName":"test_app", "useraleVersion": "2.3.0", "sessionId":"session_1719530074303", "httpSessionId": "72798a8ad776417183b1aa14e03c3132", "browserSessionId": "06b0db1ab30e8e92819ba3d4091b83bc"}'); + let data = JSON.stringify(logs); + //let arr = encoder.encode(message); + ws.send(data); +}; +ws.onmessage = (event) => { + console.log(event.data); +}; diff --git a/products/userale/packages/flagon-userale/package.json b/products/userale/packages/flagon-userale/package.json index 6d1fde2..edf1b8d 100644 --- a/products/userale/packages/flagon-userale/package.json +++ b/products/userale/packages/flagon-userale/package.json @@ -12,13 +12,9 @@ } }, "scripts": { - "format": "prettier --ignore-path .gitignore --write src/ test/", - "lint": "eslint ./src --fix --ext ts --ext js", - "check-types": "tsc --pretty --noEmit", - "build": "tsc && tsup", + "build": "tsup --onSuccess 'tsc --emitDeclarationOnly --declaration'", "clean": "rm -rf ./build", - "test": "jest -c ./test/jest.config.js", - "prepare": "husky", + "test": "jest -c ./test/jest.config.ts", "commit": "cz" }, "repository": { @@ -57,37 +53,29 @@ "npm": ">= 9.x" }, "devDependencies": { - "@eslint/js": "^9.2.0", + "@babel/preset-typescript": "^7.27.1", "@jest/globals": "^29.7.0", - "@playwright/test": "^1.52.0", "@types/jest": "^29.5.14", "@types/jsdom": "^21.1.6", "@types/node": "^20.14.2", "@types/ws": "^8.5.12", - "@typescript-eslint/eslint-plugin": "^7.8.0", - "@typescript-eslint/parser": "^7.8.0", "@typescript/lib-dom": "npm:@types/web@^0.0.144", "body-parser": "^1.20.2", "commander": "^12.1.0", "cypress": "^13.6.0", "cz-conventional-changelog": "^3.3.0", "dom-storage": "^2.1.0", - "esbuild": "^0.21.2", - "eslint": "^8.57.0", "express": "^4.18.2", "global-jsdom": "^24.0.0", "globals": "^15.2.0", - "husky": "^9.0.11", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "jsdom": "^24.0.0", "jsonschema": "^1.4.1", - "prettier": "^3.2.5", "ts-jest": "^29.4.0", "ts-node": "^10.9.2", "tsup": "^5.10.0", "typescript": "^5.8.3", - "typescript-eslint": "^7.8.0", "whatwg-fetch": "^3.6.20", "ws": "^8.18.0" }, diff --git a/products/userale/packages/flagon-userale/src/getInitialSettings.ts b/products/userale/packages/flagon-userale/src/getInitialSettings.ts index ed8b758..34fe95e 100644 --- a/products/userale/packages/flagon-userale/src/getInitialSettings.ts +++ b/products/userale/packages/flagon-userale/src/getInitialSettings.ts @@ -26,46 +26,46 @@ let httpSessionId: string | null = null; * @return {Object} The extracted configuration object */ export function getInitialSettings(): Settings.Config { + if ( + typeof WorkerGlobalScope !== "undefined" && + self instanceof WorkerGlobalScope + ) { + const settings: Settings.Config = { + authHeader: null, + autostart: true, + browserSessionId: null, + custIndex: null, + headers: null, + httpSessionId: null, + logCountThreshold: +5, + logDetails: false, + resolution: +500, + sessionId: sessionId, + time: (ts?: number) => (ts !== undefined ? ts : Date.now()), + toolName: null, + toolVersion: null, + transmitInterval: +5000, + url: "http://localhost:8000", + useraleVersion: null, + userFromParams: null, + userId: null, + }; + return settings; + } - if (typeof WorkerGlobalScope !== "undefined" && - self instanceof WorkerGlobalScope) { - const settings: Settings.Config = { - authHeader: null, - autostart: true, - browserSessionId: null, - custIndex: null, - headers: null, - httpSessionId: null, - logCountThreshold: +(5), - logDetails: false, - resolution: +(500), - sessionId: sessionId, - time: (ts?: number) => (ts !== undefined ? ts : Date.now()), - toolName: null, - toolVersion: null, - transmitInterval: +(5000), - url: "http://localhost:8000", - useraleVersion: null, - userFromParams: null, - userId: null, - }; - return settings; - } - - if (sessionId === null) { - sessionId = getsessionId( - "userAlesessionId", - "session_" + String(Date.now()), - ); - } + if (sessionId === null) { + sessionId = getsessionId( + "userAlesessionId", + "session_" + String(Date.now()), + ); + } - if (httpSessionId === null) { - httpSessionId = getsessionId( - "userAleHttpSessionId", - generatehttpSessionId(), - ); - } - + if (httpSessionId === null) { + httpSessionId = getsessionId( + "userAleHttpSessionId", + generatehttpSessionId(), + ); + } const script = document.currentScript || diff --git a/products/userale/packages/flagon-userale/src/main.ts b/products/userale/packages/flagon-userale/src/main.ts index ab6c6bf..3a209e2 100644 --- a/products/userale/packages/flagon-userale/src/main.ts +++ b/products/userale/packages/flagon-userale/src/main.ts @@ -15,10 +15,20 @@ * limitations under the License. */ +import { defineCustomDetails } from "@/attachHandlers"; +import { registerAuthCallback } from "@/utils"; +import { + addCallbacks, + removeCallbacks, + packageLog, + packageCustomLog, + getSelector, + buildPath, + initPackager, +} from "@/packageLogs"; import { version as userAleVersion } from "../package.json"; import { Configuration } from "@/configure"; import { attachHandlers } from "@/attachHandlers"; -import { initPackager, packageCustomLog } from "@/packageLogs"; import { initSender } from "@/sendLogs"; import type { Settings, Logging } from "@/types"; @@ -28,7 +38,7 @@ const logs: Array = []; const startLoadTimestamp = Date.now(); let endLoadTimestamp: number; -self.onload = function() { +self.onload = function () { endLoadTimestamp = Date.now(); }; @@ -76,7 +86,7 @@ function setup(config: Configuration) { attachHandlers(config); initSender(logs, config); started = config.on = true; - if(typeof window !== "undefined" && typeof document !== "undefined") { + if (typeof window !== "undefined" && typeof document !== "undefined") { packageCustomLog( { type: "load", @@ -145,7 +155,6 @@ export function log(customLog: Logging.CustomLog | undefined) { } } - // Only attach to window in IIFE builds if (typeof window !== "undefined") { (window as any).userale = { @@ -154,13 +163,13 @@ if (typeof window !== "undefined") { options, log, version: userAleVersion, - details: require("@/attachHandlers").defineCustomDetails, - registerAuthCallback: require("@/utils").registerAuthCallback, - addCallbacks: require("@/packageLogs").addCallbacks, - removeCallbacks: require("@/packageLogs").removeCallbacks, - packageLog: require("@/packageLogs").packageLog, - packageCustomLog: require("@/packageLogs").packageCustomLog, - getSelector: require("@/packageLogs").getSelector, - buildPath: require("@/packageLogs").buildPath, + details: defineCustomDetails, + registerAuthCallback, + addCallbacks, + removeCallbacks, + packageLog, + packageCustomLog, + getSelector, + buildPath, }; -} \ No newline at end of file +} diff --git a/products/userale/packages/flagon-userale/src/sendLogs.ts b/products/userale/packages/flagon-userale/src/sendLogs.ts index 715f460..c4bc647 100644 --- a/products/userale/packages/flagon-userale/src/sendLogs.ts +++ b/products/userale/packages/flagon-userale/src/sendLogs.ts @@ -73,14 +73,14 @@ export function sendOnClose( logs: Array, config: Configuration, ): void { - self.addEventListener("pagehide", function() { + self.addEventListener("pagehide", function () { if (!config.on) { return; } if (logs.length > 0) { const url = new URL(config.url); - + if (url.protocol === "ws:" || url.protocol === "wss:") { const data = JSON.stringify(logs); wsock.send(data); diff --git a/products/userale/packages/flagon-userale/test/globals.d.ts b/products/userale/packages/flagon-userale/test/globals.d.ts new file mode 100644 index 0000000..9debc78 --- /dev/null +++ b/products/userale/packages/flagon-userale/test/globals.d.ts @@ -0,0 +1,2 @@ +// Ensures jest globals are recognized in test files +import "@types/jest"; diff --git a/products/userale/packages/flagon-userale/test/jest.config.js b/products/userale/packages/flagon-userale/test/jest.config.ts similarity index 91% rename from products/userale/packages/flagon-userale/test/jest.config.js rename to products/userale/packages/flagon-userale/test/jest.config.ts index e38b6cb..6202fc3 100644 --- a/products/userale/packages/flagon-userale/test/jest.config.js +++ b/products/userale/packages/flagon-userale/test/jest.config.ts @@ -31,6 +31,14 @@ const config = { }, setupFiles: ["/test/jest.setup.js"], testMatch: ["/test/spec/(*.)+(spec|test).[tj]s?(x)"], + transform: { + "^.+\\.tsx?$": [ + "ts-jest", + { + tsconfig: "./tsconfig.test.json", + }, + ], + }, // Optionally specify this if you want default jsdom behavior: // testEnvironment: "jsdom", }; diff --git a/products/userale/packages/flagon-userale/test/spec/attachHandlers.spec.ts b/products/userale/packages/flagon-userale/test/spec/attachHandlers.spec.ts index 8c0b0ec..3a6a6f7 100644 --- a/products/userale/packages/flagon-userale/test/spec/attachHandlers.spec.ts +++ b/products/userale/packages/flagon-userale/test/spec/attachHandlers.spec.ts @@ -106,7 +106,7 @@ describe("attachHandlers", () => { const rate = 500; jest .spyOn(global.document, "addEventListener") - .mockImplementation(() => { }); + .mockImplementation(() => {}); // Tries to call an event 3 times. Twice in quick succession, then once after the set delay. // Number of actual calls to packageLog are recorded in callCount. Should amount to exactly 2 calls. const listenerHook = (ev: string, fn: CallableFunction) => { @@ -135,6 +135,6 @@ describe("attachHandlers", () => { describe("defineDetails", () => { // TODO: clarify what constitutes "high detail events" and what is "correct" - it.skip("configures high detail events correctly", () => { }); + it.skip("configures high detail events correctly", () => {}); }); }); diff --git a/products/userale/packages/flagon-userale/test/spec/sendLogs.spec.ts b/products/userale/packages/flagon-userale/test/spec/sendLogs.spec.ts index a2c944f..f7fc602 100644 --- a/products/userale/packages/flagon-userale/test/spec/sendLogs.spec.ts +++ b/products/userale/packages/flagon-userale/test/spec/sendLogs.spec.ts @@ -106,7 +106,7 @@ describe("sendLogs", () => { it("sends logs on page exit with fetch", () => { const fetchSpy = jest.spyOn(global, "fetch"); - + config.update({ on: true, url: "http://test.com" }); sendOnClose([], config); config.update({ on: true, url: "http://test.com" }); @@ -118,10 +118,9 @@ describe("sendLogs", () => { fetchSpy.mockRestore(); }); - it("does not send logs on page exit when config is off", () => { const fetchSpy = jest.spyOn(global, "fetch"); - + config.update({ on: false, url: "test" }); sendOnClose([{ foo: "bar" }], config); global.window.dispatchEvent(new window.CustomEvent("pagehide")); @@ -140,30 +139,29 @@ describe("sendLogs", () => { logCountThreshold: 1, }); jest.useFakeTimers(); - + const authCallback = jest.fn().mockReturnValue("fakeAuthToken"); registerAuthCallback(authCallback); - + initSender(logs, config); logs.push({ foo: "bar" }); - + jest.advanceTimersByTime(config.transmitInterval); - + expect(xhrMock.send).toHaveBeenCalledTimes(1); - + // Filter only calls to setRequestHeader with 'Authorization' const calls = (xhrMock.setRequestHeader as jest.Mock).mock.calls; const authHeaderCall = calls.find( - ([header]) => header.toLowerCase() === "authorization" + ([header]) => header.toLowerCase() === "authorization", ); - + expect(authHeaderCall?.[0].toLowerCase()).toBe("authorization"); expect(authHeaderCall?.[1]).toBe("fakeAuthToken"); - + jest.useRealTimers(); done(); }); - it("sends logs with proper custom headers when using registerHeadersCallback", (done) => { const logs: Array = []; diff --git a/products/userale/packages/flagon-userale/tsconfig.json b/products/userale/packages/flagon-userale/tsconfig.json index 12d6a32..e60896e 100644 --- a/products/userale/packages/flagon-userale/tsconfig.json +++ b/products/userale/packages/flagon-userale/tsconfig.json @@ -1,54 +1,23 @@ { + "extends": "../../tsconfig.base.json", "compilerOptions": { - "allowJs": false, - "allowSyntheticDefaultImports": true, - "allowUnreachableCode": false, - "allowUnusedLabels": false, - "baseUrl": ".", - "checkJs": false, - "declaration": true, - "declarationDir": "./build", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": false, - "isolatedModules": true, - "jsx": "preserve", - "lib": [ - "ES2021", - "WebWorker", - "dom", - "dom.iterable", - "esnext" - ], - "module": "esnext", - "moduleResolution": "bundler", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": false, - "noUnusedLocals": true, - "noUnusedParameters": false, - "paths": { - "@/*": [ - "./src/*" - ] - }, - "pretty": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "target": "ES2021", - "typeRoots": [ - "node_modules/@types/" - ], + "composite": true, + "declaration": true, + "declarationMap": true, + "declarationDir": "./build", + "module": "ESNext", + "moduleResolution": "node", + "noEmit": true, + "rootDir": "./src", + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } }, "include": [ - "src", - "test", - "src/types.d.ts" + "src/**/*.ts", + "src/types.d.ts" ], - "exclude": [ - "node_modules", - "build", - "logs" - ], -} + "exclude": ["node_modules", "build"] + } + \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/tsconfig.test.json b/products/userale/packages/flagon-userale/tsconfig.test.json new file mode 100644 index 0000000..90efa52 --- /dev/null +++ b/products/userale/packages/flagon-userale/tsconfig.test.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": true, + "types": ["jest"], + "allowJs": true + }, + "include": ["src", "test", "**/*.test.ts", "**/*.spec.ts", "**/__tests__/**/*.ts"] +} \ No newline at end of file diff --git a/products/userale/packages/flagon-userale/tsup.config.js b/products/userale/packages/flagon-userale/tsup.config.js index a198654..7989b3b 100644 --- a/products/userale/packages/flagon-userale/tsup.config.js +++ b/products/userale/packages/flagon-userale/tsup.config.js @@ -8,7 +8,7 @@ export default defineConfig([ format: ['esm', 'iife'], name: 'userale', target: 'es2021', - dts: true, + dts: false, sourcemap: true, clean: true, minify: false, diff --git a/products/userale/test/spec/fixtures/extension.fixture.ts b/products/userale/test/spec/fixtures/extension.fixture.ts index 97030b9..e18d2ad 100644 --- a/products/userale/test/spec/fixtures/extension.fixture.ts +++ b/products/userale/test/spec/fixtures/extension.fixture.ts @@ -16,6 +16,7 @@ export const test = base.extend<{ ); const context = await chromium.launchPersistentContext(os.tmpdir(), { channel: 'chromium', + headless: false, args: [ `--disable-extensions-except=${pathToExtension}`, `--load-extension=${pathToExtension}`, @@ -40,7 +41,6 @@ export const test = base.extend<{ const listener = async (req: Request) => { const url = req.url(); const method = req.method(); - // console.log(req); if (!url.startsWith('http://localhost:8000') || method !== 'POST') return; diff --git a/products/userale/tsconfig.base.json b/products/userale/tsconfig.base.json new file mode 100644 index 0000000..851d2f9 --- /dev/null +++ b/products/userale/tsconfig.base.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "ES2021", + "module": "ESNext", + "lib": ["DOM", "DOM.Iterable", "ESNext", "WebWorker"], + "strict": true, + "esModuleInterop": true, + "moduleResolution": "node", + "skipLibCheck": true, + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "sourceMap": true, + "pretty": true, + "typeRoots": ["node_modules/@types"] + } + } + \ No newline at end of file diff --git a/products/userale/tsconfig.json b/products/userale/tsconfig.json index 71bad78..94dcdcc 100644 --- a/products/userale/tsconfig.json +++ b/products/userale/tsconfig.json @@ -1,14 +1,18 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "CommonJS", - "lib": ["DOM", "ESNext"], - "strict": true, - "esModuleInterop": true, - "moduleResolution": "Node", - "types": ["node", "playwright"], - "skipLibCheck": true - }, - "include": ["**/*.ts", "packages/flagon-userale/test/jest.config.js"] - } - \ No newline at end of file + "references": [ + { "path": "packages/flagon-userale" }, + { "path": "packages/flagon-userale-ext" } + ], + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "node", + "lib": ["DOM", "ESNext"], + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "types": ["node"], + "composite": false + }, + "exclude": ["node_modules"] +} From d52b89b81e265217a4e3ba6c7cb6009410dc621a Mon Sep 17 00:00:00 2001 From: Jason Young Date: Wed, 25 Jun 2025 14:06:46 -0700 Subject: [PATCH 19/20] Fix userale_ci github action --- .github/workflows/userale_ci.yml | 22 ++++++++++++++----- .../userale/packages/flagon-userale/README.md | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/userale_ci.yml b/.github/workflows/userale_ci.yml index a6c260b..4e6ff62 100644 --- a/.github/workflows/userale_ci.yml +++ b/.github/workflows/userale_ci.yml @@ -51,14 +51,19 @@ jobs: with: node-version: ${{ matrix.node-version }} + - name: Setup pnpm v10 + uses: pnpm/action-setup@v4 + with: + version: 10 + - name: Install dependencies - run: npm ci + run: pnpm i - name: Format - run: npm run format + run: pnpm format - name: Lint - run: npm run lint + run: pnpm lint test: runs-on: ubuntu-latest @@ -75,8 +80,13 @@ jobs: with: node-version: ${{ matrix.node-version }} + - name: Setup pnpm v10 + uses: pnpm/action-setup@v4 + with: + version: 10 + - name: Install dependencies - run: npm ci + run: pnpm i - name: Install Playwright Browsers run: | @@ -87,13 +97,13 @@ jobs: - name: Build run: | export PATH=${PATH}:`go env GOPATH`/bin - npm run build + pnpm build - name: Test run: | export DISPLAY=:99 Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - npm test + pnpm test # TODO: add automatic release notes # TODO: add cronjobs for automatically triggering new release candidates diff --git a/products/userale/packages/flagon-userale/README.md b/products/userale/packages/flagon-userale/README.md index ae4d4a2..3641fe6 100644 --- a/products/userale/packages/flagon-userale/README.md +++ b/products/userale/packages/flagon-userale/README.md @@ -21,7 +21,7 @@ ![Node.js CI](https://github.com/apache/flagon-useralejs/workflows/Node.js%20CI/badge.svg) [![Known Vulnerabilities](https://snyk.io/test/npm/flagon-userale/badge.svg)](https://snyk.io/test/npm/flagon-userale) -![Maintenance](https://img.shields.io/maintenance/yes/2024) +![Maintenance](https://img.shields.io/maintenance/yes/2025) ![npm](https://img.shields.io/npm/v/flagon-userale) [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) ![Node.js](https://img.shields.io/badge/Node.js%20Support-16.x%2C%2018.x-orange) From 92673de711f5653ce759dd0a6ba652e961ff7f17 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 27 Jun 2025 10:25:03 -0700 Subject: [PATCH 20/20] Convert eslint.config.js to commonjs --- products/userale/eslint.config.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/products/userale/eslint.config.js b/products/userale/eslint.config.js index c9ae0c6..39b4fa0 100644 --- a/products/userale/eslint.config.js +++ b/products/userale/eslint.config.js @@ -1,8 +1,8 @@ -import js from '@eslint/js'; -import tseslint from 'typescript-eslint'; -import pluginJest from 'eslint-plugin-jest'; +const js = require('@eslint/js'); +const tseslint = require('typescript-eslint'); +const pluginJest = require('eslint-plugin-jest'); -export default [ +module.exports = [ js.configs.recommended, ...tseslint.configs.recommended, { @@ -44,7 +44,6 @@ export default [ }, }, rules: { - // Optional Jest-specific rules }, }, ];