From 4e99528c8604ae19c9d8d527c576bed1b0ee03f1 Mon Sep 17 00:00:00 2001 From: Maxim Van de Wynckel Date: Mon, 27 Nov 2023 14:10:03 +0100 Subject: [PATCH] fix: object processing fix --- package-lock.json | 795 ++++++++++-------- package.json | 36 +- .../AbsoluteOrientationProcessingNode.ts | 1 - .../processing/AccelerationProcessingNode.ts | 3 +- src/nodes/processing/GravityProcessingNode.ts | 27 +- .../processing/PedometerProcessingNode.ts | 12 +- .../RelativeOrientationProcessingNode.ts | 1 - .../processing/VelocityCalculationNode.ts | 1 - .../processing/VelocityProcessingNode.ts | 1 - src/services/IMUCalibrationService.ts | 226 ++--- .../MagnetometerCalibrationService.ts | 6 +- .../datasets/dataset.openhps-2021-03.spec.ts | 5 +- .../node.processing.acceleration.spec.ts | 20 + test/specs/node.processing.gravity.spec.ts | 6 +- 14 files changed, 622 insertions(+), 518 deletions(-) diff --git a/package-lock.json b/package-lock.json index 12aeb90..67b69b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,45 +9,45 @@ "version": "0.2.1", "license": "Apache-2.0", "devDependencies": { - "@commitlint/cli": "^17.7.1", - "@commitlint/config-conventional": "^17.7.0", - "@openhps/core": ">=0.5.5", + "@commitlint/cli": "^18.4.3", + "@commitlint/config-conventional": "^18.4.3", + "@openhps/core": ">=0.6.4", "@openhps/csv": "^0.1.11", "@openhps/web-sensors": "^0.1.9", - "@types/chai": "^4.3.6", - "@types/mocha": "^10.0.1", - "@types/node": "^20.6.1", - "@typescript-eslint/eslint-plugin": ">=6.7.0", - "@typescript-eslint/parser": ">=6.7.0", - "chai": "^4.3.8", - "eslint": "^8.49.0", + "@types/chai": "^4.3.11", + "@types/mocha": "^10.0.6", + "@types/node": "^20.10.0", + "@typescript-eslint/eslint-plugin": ">=6.12.0", + "@typescript-eslint/parser": ">=6.12.0", + "chai": "^4.3.10", + "eslint": "^8.54.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-deprecation": "^2.0.0", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jsdoc": "^46.8.0", - "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-jsdoc": "^46.9.0", + "eslint-plugin-prettier": "^5.0.1", "husky": "^8.0.3", "mocha": "^10.2.0", "mocha-junit-reporter": "^2.2.1", "npm-run-all": "^4.1.5", "nyc": "^15.1.0", - "prettier": "^3.0.3", + "prettier": "^3.1.0", "reflect-metadata": ">=0.1.13", "serve": "^14.2.1", "shx": "^0.3.4", "standard-version": "^9.5.0", "terser-webpack-plugin": "^5.3.9", "ts-node": ">=10.9.1", - "typedoc": ">=0.25.1", - "typescript": ">=5.2.2", - "webpack": "^5.88.2", + "typedoc": ">=0.25.4", + "typescript": ">=5.3.2", + "webpack": "^5.89.0", "webpack-cli": "^5.1.4" }, "engines": { "node": ">=12.0.0" }, "peerDependencies": { - "@openhps/core": ">=0.5.5", + "@openhps/core": ">=0.6.4", "reflect-metadata": ">=0.1.13" } }, @@ -701,16 +701,16 @@ "dev": true }, "node_modules/@commitlint/cli": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.7.1.tgz", - "integrity": "sha512-BCm/AT06SNCQtvFv921iNhudOHuY16LswT0R3OeolVGLk8oP+Rk9TfQfgjH7QPMjhvp76bNqGFEcpKojxUNW1g==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-18.4.3.tgz", + "integrity": "sha512-zop98yfB3A6NveYAZ3P1Mb6bIXuCeWgnUfVNkH4yhIMQpQfzFwseadazOuSn0OOfTt0lWuFauehpm9GcqM5lww==", "dev": true, "dependencies": { - "@commitlint/format": "^17.4.4", - "@commitlint/lint": "^17.7.0", - "@commitlint/load": "^17.7.1", - "@commitlint/read": "^17.5.1", - "@commitlint/types": "^17.4.4", + "@commitlint/format": "^18.4.3", + "@commitlint/lint": "^18.4.3", + "@commitlint/load": "^18.4.3", + "@commitlint/read": "^18.4.3", + "@commitlint/types": "^18.4.3", "execa": "^5.0.0", "lodash.isfunction": "^3.0.9", "resolve-from": "5.0.0", @@ -721,32 +721,32 @@ "commitlint": "cli.js" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/config-conventional": { - "version": "17.7.0", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.7.0.tgz", - "integrity": "sha512-iicqh2o6et+9kWaqsQiEYZzfLbtoWv9uZl8kbI8EGfnc0HeGafQBF7AJ0ylN9D/2kj6txltsdyQs8+2fTMwWEw==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-18.4.3.tgz", + "integrity": "sha512-729eRRaNta7JZF07qf6SAGSghoDEp9mH7yHU0m7ff0q89W97wDrWCyZ3yoV3mcQJwbhlmVmZPTkPcm7qiAu8WA==", "dev": true, "dependencies": { - "conventional-changelog-conventionalcommits": "^6.1.0" + "conventional-changelog-conventionalcommits": "^7.0.2" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/config-validator": { - "version": "17.6.7", - "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.6.7.tgz", - "integrity": "sha512-vJSncmnzwMvpr3lIcm0I8YVVDJTzyjy7NZAeXbTXy+MPUdAr9pKyyg7Tx/ebOQ9kqzE6O9WT6jg2164br5UdsQ==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-18.4.3.tgz", + "integrity": "sha512-FPZZmTJBARPCyef9ohRC9EANiQEKSWIdatx5OlgeHKu878dWwpyeFauVkhzuBRJFcCA4Uvz/FDtlDKs008IHcA==", "dev": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^18.4.3", "ajv": "^8.11.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/config-validator/node_modules/ajv": { @@ -772,12 +772,12 @@ "dev": true }, "node_modules/@commitlint/ensure": { - "version": "17.6.7", - "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-17.6.7.tgz", - "integrity": "sha512-mfDJOd1/O/eIb/h4qwXzUxkmskXDL9vNPnZ4AKYKiZALz4vHzwMxBSYtyL2mUIDeU9DRSpEUins8SeKtFkYHSw==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-18.4.3.tgz", + "integrity": "sha512-MI4fwD9TWDVn4plF5+7JUyLLbkOdzIRBmVeNlk4dcGlkrVA+/l5GLcpN66q9LkFsFv6G2X31y89ApA3hqnqIFg==", "dev": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^18.4.3", "lodash.camelcase": "^4.3.0", "lodash.kebabcase": "^4.1.1", "lodash.snakecase": "^4.1.1", @@ -785,211 +785,257 @@ "lodash.upperfirst": "^4.3.1" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/execute-rule": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.4.0.tgz", - "integrity": "sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-18.4.3.tgz", + "integrity": "sha512-t7FM4c+BdX9WWZCPrrbV5+0SWLgT3kCq7e7/GhHCreYifg3V8qyvO127HF796vyFql75n4TFF+5v1asOOWkV1Q==", "dev": true, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/format": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-17.4.4.tgz", - "integrity": "sha512-+IS7vpC4Gd/x+uyQPTAt3hXs5NxnkqAZ3aqrHd5Bx/R9skyCAWusNlNbw3InDbAK6j166D9asQM8fnmYIa+CXQ==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-18.4.3.tgz", + "integrity": "sha512-8b+ItXYHxAhRAXFfYki5PpbuMMOmXYuzLxib65z2XTqki59YDQJGpJ/wB1kEE5MQDgSTQWtKUrA8n9zS/1uIDQ==", "dev": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^18.4.3", "chalk": "^4.1.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/is-ignored": { - "version": "17.7.0", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.7.0.tgz", - "integrity": "sha512-043rA7m45tyEfW7Zv2vZHF++176MLHH9h70fnPoYlB1slKBeKl8BwNIlnPg4xBdRBVNPaCqvXxWswx2GR4c9Hw==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-18.4.3.tgz", + "integrity": "sha512-ZseOY9UfuAI32h9w342Km4AIaTieeFskm2ZKdrG7r31+c6zGBzuny9KQhwI9puc0J3GkUquEgKJblCl7pMnjwg==", "dev": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^18.4.3", "semver": "7.5.4" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/lint": { - "version": "17.7.0", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-17.7.0.tgz", - "integrity": "sha512-TCQihm7/uszA5z1Ux1vw+Nf3yHTgicus/+9HiUQk+kRSQawByxZNESeQoX9ujfVd3r4Sa+3fn0JQAguG4xvvbA==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-18.4.3.tgz", + "integrity": "sha512-18u3MRgEXNbnYkMOWoncvq6QB8/90m9TbERKgdPqVvS+zQ/MsuRhdvHYCIXGXZxUb0YI4DV2PC4bPneBV/fYuA==", "dev": true, "dependencies": { - "@commitlint/is-ignored": "^17.7.0", - "@commitlint/parse": "^17.7.0", - "@commitlint/rules": "^17.7.0", - "@commitlint/types": "^17.4.4" + "@commitlint/is-ignored": "^18.4.3", + "@commitlint/parse": "^18.4.3", + "@commitlint/rules": "^18.4.3", + "@commitlint/types": "^18.4.3" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/load": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-17.7.1.tgz", - "integrity": "sha512-S/QSOjE1ztdogYj61p6n3UbkUvweR17FQ0zDbNtoTLc+Hz7vvfS7ehoTMQ27hPSjVBpp7SzEcOQu081RLjKHJQ==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-18.4.3.tgz", + "integrity": "sha512-v6j2WhvRQJrcJaj5D+EyES2WKTxPpxENmNpNG3Ww8MZGik3jWRXtph0QTzia5ZJyPh2ib5aC/6BIDymkUUM58Q==", "dev": true, "dependencies": { - "@commitlint/config-validator": "^17.6.7", - "@commitlint/execute-rule": "^17.4.0", - "@commitlint/resolve-extends": "^17.6.7", - "@commitlint/types": "^17.4.4", - "@types/node": "20.4.7", + "@commitlint/config-validator": "^18.4.3", + "@commitlint/execute-rule": "^18.4.3", + "@commitlint/resolve-extends": "^18.4.3", + "@commitlint/types": "^18.4.3", + "@types/node": "^18.11.9", "chalk": "^4.1.0", - "cosmiconfig": "^8.0.0", - "cosmiconfig-typescript-loader": "^4.0.0", + "cosmiconfig": "^8.3.6", + "cosmiconfig-typescript-loader": "^5.0.0", "lodash.isplainobject": "^4.0.6", "lodash.merge": "^4.6.2", "lodash.uniq": "^4.5.0", - "resolve-from": "^5.0.0", - "ts-node": "^10.8.1", - "typescript": "^4.6.4 || ^5.0.0" + "resolve-from": "^5.0.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/load/node_modules/@types/node": { - "version": "20.4.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.7.tgz", - "integrity": "sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==", - "dev": true + "version": "18.18.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.13.tgz", + "integrity": "sha512-vXYZGRrSCreZmq1rEjMRLXJhiy8MrIeVasx+PCVlP414N7CJLHnMf+juVvjdprHyH+XRy3zKZLHeNueOpJCn0g==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@commitlint/message": { - "version": "17.4.2", - "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.4.2.tgz", - "integrity": "sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-18.4.3.tgz", + "integrity": "sha512-ddJ7AztWUIoEMAXoewx45lKEYEOeOlBVWjk8hDMUGpprkuvWULpaXczqdjwVtjrKT3JhhN+gMs8pm5G3vB2how==", "dev": true, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/parse": { - "version": "17.7.0", - "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-17.7.0.tgz", - "integrity": "sha512-dIvFNUMCUHqq5Abv80mIEjLVfw8QNuA4DS7OWip4pcK/3h5wggmjVnlwGCDvDChkw2TjK1K6O+tAEV78oxjxag==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-18.4.3.tgz", + "integrity": "sha512-eoH7CXM9L+/Me96KVcfJ27EIIbA5P9sqw3DqjJhRYuhaULIsPHFs5S5GBDCqT0vKZQDx0DgxhMpW6AQbnKrFtA==", "dev": true, "dependencies": { - "@commitlint/types": "^17.4.4", - "conventional-changelog-angular": "^6.0.0", - "conventional-commits-parser": "^4.0.0" + "@commitlint/types": "^18.4.3", + "conventional-changelog-angular": "^7.0.0", + "conventional-commits-parser": "^5.0.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/parse/node_modules/conventional-changelog-angular": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-6.0.0.tgz", - "integrity": "sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", + "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", "dev": true, "dependencies": { "compare-func": "^2.0.0" }, "engines": { - "node": ">=14" + "node": ">=16" } }, "node_modules/@commitlint/parse/node_modules/conventional-commits-parser": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz", - "integrity": "sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", + "integrity": "sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==", "dev": true, "dependencies": { - "is-text-path": "^1.0.1", + "is-text-path": "^2.0.0", "JSONStream": "^1.3.5", - "meow": "^8.1.2", - "split2": "^3.2.2" + "meow": "^12.0.1", + "split2": "^4.0.0" }, "bin": { - "conventional-commits-parser": "cli.js" + "conventional-commits-parser": "cli.mjs" }, "engines": { - "node": ">=14" + "node": ">=16" + } + }, + "node_modules/@commitlint/parse/node_modules/is-text-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", + "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", + "dev": true, + "dependencies": { + "text-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@commitlint/parse/node_modules/meow": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", + "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", + "dev": true, + "engines": { + "node": ">=16.10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@commitlint/parse/node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/@commitlint/parse/node_modules/text-extensions": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", + "integrity": "sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@commitlint/read": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-17.5.1.tgz", - "integrity": "sha512-7IhfvEvB//p9aYW09YVclHbdf1u7g7QhxeYW9ZHSO8Huzp8Rz7m05aCO1mFG7G8M+7yfFnXB5xOmG18brqQIBg==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-18.4.3.tgz", + "integrity": "sha512-H4HGxaYA6OBCimZAtghL+B+SWu8ep4X7BwgmedmqWZRHxRLcX2q0bWBtUm5FsMbluxbOfrJwOs/Z0ah4roP/GQ==", "dev": true, "dependencies": { - "@commitlint/top-level": "^17.4.0", - "@commitlint/types": "^17.4.4", + "@commitlint/top-level": "^18.4.3", + "@commitlint/types": "^18.4.3", "fs-extra": "^11.0.0", "git-raw-commits": "^2.0.11", "minimist": "^1.2.6" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/resolve-extends": { - "version": "17.6.7", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.6.7.tgz", - "integrity": "sha512-PfeoAwLHtbOaC9bGn/FADN156CqkFz6ZKiVDMjuC2N5N0740Ke56rKU7Wxdwya8R8xzLK9vZzHgNbuGhaOVKIg==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-18.4.3.tgz", + "integrity": "sha512-30sk04LZWf8+SDgJrbJCjM90gTg2LxsD9cykCFeFu+JFHvBFq5ugzp2eO/DJGylAdVaqxej3c7eTSE64hR/lnw==", "dev": true, "dependencies": { - "@commitlint/config-validator": "^17.6.7", - "@commitlint/types": "^17.4.4", + "@commitlint/config-validator": "^18.4.3", + "@commitlint/types": "^18.4.3", "import-fresh": "^3.0.0", "lodash.mergewith": "^4.6.2", "resolve-from": "^5.0.0", "resolve-global": "^1.0.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/rules": { - "version": "17.7.0", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-17.7.0.tgz", - "integrity": "sha512-J3qTh0+ilUE5folSaoK91ByOb8XeQjiGcdIdiB/8UT1/Rd1itKo0ju/eQVGyFzgTMYt8HrDJnGTmNWwcMR1rmA==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-18.4.3.tgz", + "integrity": "sha512-8KIeukDf45BiY+Lul1T0imSNXF0sMrlLG6JpLLKolkmYVQ6PxxoNOriwyZ3UTFFpaVbPy0rcITaV7U9JCAfDTA==", "dev": true, "dependencies": { - "@commitlint/ensure": "^17.6.7", - "@commitlint/message": "^17.4.2", - "@commitlint/to-lines": "^17.4.0", - "@commitlint/types": "^17.4.4", + "@commitlint/ensure": "^18.4.3", + "@commitlint/message": "^18.4.3", + "@commitlint/to-lines": "^18.4.3", + "@commitlint/types": "^18.4.3", "execa": "^5.0.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/to-lines": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-17.4.0.tgz", - "integrity": "sha512-LcIy/6ZZolsfwDUWfN1mJ+co09soSuNASfKEU5sCmgFCvX5iHwRYLiIuoqXzOVDYOy7E7IcHilr/KS0e5T+0Hg==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-18.4.3.tgz", + "integrity": "sha512-fy1TAleik4Zfru1RJ8ZU6cOSvgSVhUellxd3WZV1D5RwHZETt1sZdcA4mQN2y3VcIZsUNKkW0Mq8CM9/L9harQ==", "dev": true, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/top-level": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-17.4.0.tgz", - "integrity": "sha512-/1loE/g+dTTQgHnjoCy0AexKAEFyHsR2zRB4NWrZ6lZSMIxAhBJnmCqwao7b4H8888PsfoTBCLBYIw8vGnej8g==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-18.4.3.tgz", + "integrity": "sha512-E6fJPBLPFL5R8+XUNSYkj4HekIOuGMyJo3mIx2PkYc3clel+pcWQ7TConqXxNWW4x1ugigiIY2RGot55qUq1hw==", "dev": true, "dependencies": { "find-up": "^5.0.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/top-level/node_modules/find-up": { @@ -1054,15 +1100,15 @@ } }, "node_modules/@commitlint/types": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.4.4.tgz", - "integrity": "sha512-amRN8tRLYOsxRr6mTnGGGvB5EmW/4DDjLMgiwK3CCVEmN6Sr/6xePGEpWaspKkckILuUORCwe6VfDBw6uj4axQ==", + "version": "18.4.3", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-18.4.3.tgz", + "integrity": "sha512-cvzx+vtY/I2hVBZHCLrpoh+sA0hfuzHwDc+BAFPimYLjJkpHnghQM+z8W/KyLGkygJh3BtI3xXXq+dKjnSWEmA==", "dev": true, "dependencies": { "chalk": "^4.1.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@cspotcode/source-map-support": { @@ -1087,12 +1133,12 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.40.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.40.1.tgz", - "integrity": "sha512-YORCdZSusAlBrFpZ77pJjc5r1bQs5caPWtAu+WWmiSo+8XaUzseapVrfAtiRFbQWnrBxxLLEwF6f6ZG/UgCQCg==", + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", + "integrity": "sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==", "dev": true, "dependencies": { - "comment-parser": "1.4.0", + "comment-parser": "1.4.1", "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" }, @@ -1125,9 +1171,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1166,21 +1212,21 @@ } }, "node_modules/@eslint/js": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.49.0.tgz", - "integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" }, @@ -1202,9 +1248,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@hutson/parse-repository-url": { @@ -1387,9 +1433,9 @@ } }, "node_modules/@openhps/core": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@openhps/core/-/core-0.5.5.tgz", - "integrity": "sha512-mvSprFaIoSF6+JyXXXx0gKOVdDtewQTswoZEB4QFIML3aRIIotwVOwwczo+2ZpFq8R8FZ6sUR+yGgTYWBIzxyg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@openhps/core/-/core-0.6.4.tgz", + "integrity": "sha512-7quZy+uhKbmZiCkl5LxvBuyqZnr8LWyCDqGJkXoHdd3vLoWGT78FDYBO2ANxiYiBbrHIQoIcXCCj197ogzOcSw==", "dev": true, "dependencies": { "lodash.clonedeep": "^4.5.0", @@ -1479,9 +1525,9 @@ "dev": true }, "node_modules/@types/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", + "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", "dev": true }, "node_modules/@types/eslint": { @@ -1529,16 +1575,19 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", "dev": true }, "node_modules/@types/node": { - "version": "20.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", - "integrity": "sha512-4LcJvuXQlv4lTHnxwyHQZ3uR9Zw2j7m1C9DfuwoTFQQP4Pmu04O6IfLYgMmHoOCt0nosItLLZAH+sOrRE0Bo8g==", - "dev": true + "version": "20.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz", + "integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -1553,16 +1602,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.0.tgz", - "integrity": "sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.12.0.tgz", + "integrity": "sha512-XOpZ3IyJUIV1b15M7HVOpgQxPPF7lGXgsfcEIu3yDxFPaf/xZKt7s9QO/pbk7vpWQyVulpJbu4E5LwpZiQo4kA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.7.0", - "@typescript-eslint/type-utils": "6.7.0", - "@typescript-eslint/utils": "6.7.0", - "@typescript-eslint/visitor-keys": "6.7.0", + "@typescript-eslint/scope-manager": "6.12.0", + "@typescript-eslint/type-utils": "6.12.0", + "@typescript-eslint/utils": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -1588,15 +1637,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.0.tgz", - "integrity": "sha512-jZKYwqNpNm5kzPVP5z1JXAuxjtl2uG+5NpaMocFPTNC2EdYIgbXIPImObOkhbONxtFTTdoZstLZefbaK+wXZng==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz", + "integrity": "sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.7.0", - "@typescript-eslint/types": "6.7.0", - "@typescript-eslint/typescript-estree": "6.7.0", - "@typescript-eslint/visitor-keys": "6.7.0", + "@typescript-eslint/scope-manager": "6.12.0", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/typescript-estree": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0", "debug": "^4.3.4" }, "engines": { @@ -1616,13 +1665,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.0.tgz", - "integrity": "sha512-lAT1Uau20lQyjoLUQ5FUMSX/dS07qux9rYd5FGzKz/Kf8W8ccuvMyldb8hadHdK/qOI7aikvQWqulnEq2nCEYA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.12.0.tgz", + "integrity": "sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.0", - "@typescript-eslint/visitor-keys": "6.7.0" + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1633,13 +1682,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.0.tgz", - "integrity": "sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.12.0.tgz", + "integrity": "sha512-WWmRXxhm1X8Wlquj+MhsAG4dU/Blvf1xDgGaYCzfvStP2NwPQh6KBvCDbiOEvaE0filhranjIlK/2fSTVwtBng==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.7.0", - "@typescript-eslint/utils": "6.7.0", + "@typescript-eslint/typescript-estree": "6.12.0", + "@typescript-eslint/utils": "6.12.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -1660,9 +1709,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.0.tgz", - "integrity": "sha512-ihPfvOp7pOcN/ysoj0RpBPOx3HQTJTrIN8UZK+WFd3/iDeFHHqeyYxa4hQk4rMhsz9H9mXpR61IzwlBVGXtl9Q==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.12.0.tgz", + "integrity": "sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1673,13 +1722,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.0.tgz", - "integrity": "sha512-dPvkXj3n6e9yd/0LfojNU8VMUGHWiLuBZvbM6V6QYD+2qxqInE7J+J/ieY2iGwR9ivf/R/haWGkIj04WVUeiSQ==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.12.0.tgz", + "integrity": "sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.0", - "@typescript-eslint/visitor-keys": "6.7.0", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1700,17 +1749,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.0.tgz", - "integrity": "sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.12.0.tgz", + "integrity": "sha512-LywPm8h3tGEbgfyjYnu3dauZ0U7R60m+miXgKcZS8c7QALO9uWJdvNoP+duKTk2XMWc7/Q3d/QiCuLN9X6SWyQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.7.0", - "@typescript-eslint/types": "6.7.0", - "@typescript-eslint/typescript-estree": "6.7.0", + "@typescript-eslint/scope-manager": "6.12.0", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/typescript-estree": "6.12.0", "semver": "^7.5.4" }, "engines": { @@ -1725,12 +1774,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.0.tgz", - "integrity": "sha512-/C1RVgKFDmGMcVGeD8HjKv2bd72oI1KxQDeY8uc66gw9R0OK0eMq48cA+jv9/2Ag6cdrsUGySm1yzYmfz0hxwQ==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.12.0.tgz", + "integrity": "sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/types": "6.12.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -1741,6 +1790,12 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", @@ -2176,15 +2231,15 @@ "dev": true }, "node_modules/array-includes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", - "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", "is-string": "^1.0.7" }, "engines": { @@ -2223,14 +2278,14 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -2241,14 +2296,14 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -2630,18 +2685,18 @@ "dev": true }, "node_modules/chai": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", - "integrity": "sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==", + "version": "4.3.10", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", + "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.0.8" }, "engines": { "node": ">=4" @@ -2688,10 +2743,13 @@ } }, "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, "engines": { "node": "*" } @@ -2826,9 +2884,9 @@ "dev": true }, "node_modules/comment-parser": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.0.tgz", - "integrity": "sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", "dev": true, "engines": { "node": ">= 12.0.0" @@ -2997,15 +3055,15 @@ "dev": true }, "node_modules/conventional-changelog-conventionalcommits": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-6.1.0.tgz", - "integrity": "sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz", + "integrity": "sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==", "dev": true, "dependencies": { "compare-func": "^2.0.0" }, "engines": { - "node": ">=14" + "node": ">=16" } }, "node_modules/conventional-changelog-core": { @@ -3347,9 +3405,9 @@ "dev": true }, "node_modules/cosmiconfig": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.4.tgz", - "integrity": "sha512-SF+2P8+o/PTV05rgsAjDzL4OFdVXAulSfC/L19VaeVT7+tpOOSscCt2QLxDZ+CLxF2WOiq6y1K5asvs8qUJT/Q==", + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dev": true, "dependencies": { "import-fresh": "^3.3.0", @@ -3373,17 +3431,19 @@ } }, "node_modules/cosmiconfig-typescript-loader": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.4.0.tgz", - "integrity": "sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz", + "integrity": "sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==", "dev": true, + "dependencies": { + "jiti": "^1.19.1" + }, "engines": { - "node": ">=v14.21.3" + "node": ">=v16" }, "peerDependencies": { "@types/node": "*", - "cosmiconfig": ">=7", - "ts-node": ">=10", + "cosmiconfig": ">=8.2", "typescript": ">=4" } }, @@ -4036,18 +4096,19 @@ } }, "node_modules/eslint": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz", - "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.49.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.54.0", + "@humanwhocodes/config-array": "^0.11.13", "@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", @@ -4102,14 +4163,14 @@ } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", - "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, "dependencies": { "debug": "^3.2.7", - "is-core-module": "^2.11.0", - "resolve": "^1.22.1" + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { @@ -4121,29 +4182,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-import-resolver-node/node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/eslint-import-resolver-node/node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.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/eslint-module-utils": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", @@ -4186,26 +4224,26 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.28.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", - "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", + "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", "dev": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.findlastindex": "^1.2.2", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-module-utils": "^2.8.0", - "has": "^1.0.3", - "is-core-module": "^2.13.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.6", - "object.groupby": "^1.0.0", - "object.values": "^1.1.6", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", "semver": "^6.3.1", "tsconfig-paths": "^3.14.2" }, @@ -4247,14 +4285,14 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "46.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.8.0.tgz", - "integrity": "sha512-qsYP7LN/ji5htZAdfAr8qX0bRZcbTU0hpuECR50UpaqkPyXsWgp2y77RPQ4t7fR5bHpgnGcD5L43PxjyOvIfQA==", + "version": "46.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.9.0.tgz", + "integrity": "sha512-UQuEtbqLNkPf5Nr/6PPRCtr9xypXY+g8y/Q7gPa0YK7eDhh0y2lWprXRnaYbW7ACgIUvpDKy9X2bZqxtGzBG9Q==", "dev": true, "dependencies": { - "@es-joy/jsdoccomment": "~0.40.1", + "@es-joy/jsdoccomment": "~0.41.0", "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.0", + "comment-parser": "1.4.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", @@ -4282,9 +4320,9 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz", - "integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", + "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0", @@ -4812,10 +4850,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.5", @@ -4863,9 +4904,9 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "engines": { "node": "*" @@ -5134,9 +5175,9 @@ } }, "node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -5339,6 +5380,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -5600,12 +5653,12 @@ } }, "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6078,6 +6131,15 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -7735,14 +7797,14 @@ } }, "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -7937,9 +7999,9 @@ } }, "node_modules/path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "node_modules/path-to-regexp": { @@ -8030,9 +8092,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -8374,13 +8436,17 @@ "dev": true }, "node_modules/resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" + "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" @@ -9665,9 +9731,9 @@ } }, "node_modules/typedoc": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.1.tgz", - "integrity": "sha512-c2ye3YUtGIadxN2O6YwPEXgrZcvhlZ6HlhWZ8jQRNzwLPn2ylhdGqdR8HbyDRyALP8J6lmSANILCkkIdNPFxqA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.4.tgz", + "integrity": "sha512-Du9ImmpBCw54bX275yJrxPVnjdIyJO/84co0/L9mwe0R3G4FSR6rQ09AlXVRvZEGMUg09+z/usc8mgygQ1aidA==", "dev": true, "dependencies": { "lunr": "^2.3.9", @@ -9682,7 +9748,7 @@ "node": ">= 16" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x" } }, "node_modules/typedoc/node_modules/brace-expansion": { @@ -9710,9 +9776,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -9750,10 +9816,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "engines": { "node": ">= 10.0.0" @@ -9857,9 +9929,9 @@ } }, "node_modules/webpack": { - "version": "5.88.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", - "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", + "version": "5.89.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", + "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", @@ -9972,12 +10044,6 @@ "node": ">=10.13.0" } }, - "node_modules/webpack-cli/node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "node_modules/webpack-cli/node_modules/rechoir": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", @@ -9990,23 +10056,6 @@ "node": ">= 10.13.0" } }, - "node_modules/webpack-cli/node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.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/webpack-merge": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", diff --git a/package.json b/package.json index 37471be..c216b6e 100644 --- a/package.json +++ b/package.json @@ -66,42 +66,42 @@ "imu" ], "peerDependencies": { - "@openhps/core": ">=0.5.5", + "@openhps/core": ">=0.6.4", "reflect-metadata": ">=0.1.13" }, "devDependencies": { - "@commitlint/cli": "^17.7.1", - "@commitlint/config-conventional": "^17.7.0", - "@openhps/core": ">=0.5.5", + "@commitlint/cli": "^18.4.3", + "@commitlint/config-conventional": "^18.4.3", + "@openhps/core": ">=0.6.4", "@openhps/csv": "^0.1.11", "@openhps/web-sensors": "^0.1.9", - "@types/chai": "^4.3.6", - "@types/mocha": "^10.0.1", - "@types/node": "^20.6.1", - "@typescript-eslint/eslint-plugin": ">=6.7.0", - "@typescript-eslint/parser": ">=6.7.0", - "chai": "^4.3.8", - "eslint": "^8.49.0", + "@types/chai": "^4.3.11", + "@types/mocha": "^10.0.6", + "@types/node": "^20.10.0", + "@typescript-eslint/eslint-plugin": ">=6.12.0", + "@typescript-eslint/parser": ">=6.12.0", + "chai": "^4.3.10", + "eslint": "^8.54.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-deprecation": "^2.0.0", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jsdoc": "^46.8.0", - "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-jsdoc": "^46.9.0", + "eslint-plugin-prettier": "^5.0.1", "husky": "^8.0.3", "mocha": "^10.2.0", "mocha-junit-reporter": "^2.2.1", "npm-run-all": "^4.1.5", "nyc": "^15.1.0", - "prettier": "^3.0.3", + "prettier": "^3.1.0", "reflect-metadata": ">=0.1.13", "serve": "^14.2.1", "shx": "^0.3.4", "standard-version": "^9.5.0", "terser-webpack-plugin": "^5.3.9", "ts-node": ">=10.9.1", - "typedoc": ">=0.25.1", - "typescript": ">=5.2.2", - "webpack": "^5.88.2", + "typedoc": ">=0.25.4", + "typescript": ">=5.3.2", + "webpack": "^5.89.0", "webpack-cli": "^5.1.4" }, "nyc": { diff --git a/src/nodes/processing/AbsoluteOrientationProcessingNode.ts b/src/nodes/processing/AbsoluteOrientationProcessingNode.ts index f4e8bd4..09c4aba 100644 --- a/src/nodes/processing/AbsoluteOrientationProcessingNode.ts +++ b/src/nodes/processing/AbsoluteOrientationProcessingNode.ts @@ -10,7 +10,6 @@ import { /** * Geomagnetic orientation processing node - * * @see {@link https://github.com/visakhanc/eCompass/blob/master/source/main.c} * @category Processing node */ diff --git a/src/nodes/processing/AccelerationProcessingNode.ts b/src/nodes/processing/AccelerationProcessingNode.ts index 564d371..a6b8f6d 100644 --- a/src/nodes/processing/AccelerationProcessingNode.ts +++ b/src/nodes/processing/AccelerationProcessingNode.ts @@ -10,7 +10,6 @@ import { /** * Acceleration processing to linear velocity - * * @category Processing node */ export class AccelerationProcessingNode extends FilterProcessingNode { @@ -31,7 +30,7 @@ export class AccelerationProcessingNode extends FilterProcessingNode public filter(object: DataObject, frame: DataFrame): Promise { return new Promise((resolve) => { const accl = frame.getSensor(LinearAccelerationSensor) || frame.getSensor(Accelerometer); - const dt = 1000. / accl.frequency; + const dt = 1000 / accl.frequency; const linearVelocity = frame.getSensor(LinearVelocitySensor, this.uid); linearVelocity.value = LinearVelocity.fromArray(accl.value.clone().multiplyScalar(dt).toArray()); linearVelocity.frequency = accl.frequency; diff --git a/src/nodes/processing/GravityProcessingNode.ts b/src/nodes/processing/GravityProcessingNode.ts index 682adb6..e15006d 100644 --- a/src/nodes/processing/GravityProcessingNode.ts +++ b/src/nodes/processing/GravityProcessingNode.ts @@ -20,7 +20,6 @@ export class GravityProcessingNode extends FilterProcessingNode { constructor(options?: GravityProcessingOptions) { super(options); - this.options.method = this.options.method || GravityProcessingMethod.LOW_PASS; } public initFilter(object: DataObject, frame: DataFrame, options?: FilterProcessingOptions): Promise { @@ -34,30 +33,34 @@ export class GravityProcessingNode extends FilterProcessingNode { public filter(object: DataObject, frame: DataFrame): Promise { return new Promise((resolve) => { - let method: GravityProcessingMethod; + let method: GravityProcessingMethod = this.options.method; - if (frame.getSensor(LinearAccelerationSensor)) { - method = GravityProcessingMethod.LINEAR_ACCELERATION; - } else if (frame.getSensor(RelativeOrientationSensor)) { - method = GravityProcessingMethod.RELATIVE_ORIENTATION; - } else if (frame.getSensor(AbsoluteOrientationSensor)) { - method = GravityProcessingMethod.ABSOLUTE_ORIENTATION; + if (method === undefined) { + if (frame.getSensor(LinearAccelerationSensor)) { + method = GravityProcessingMethod.LINEAR_ACCELERATION; + } else if (frame.getSensor(RelativeOrientationSensor)) { + method = GravityProcessingMethod.RELATIVE_ORIENTATION; + } else if (frame.getSensor(AbsoluteOrientationSensor)) { + method = GravityProcessingMethod.ABSOLUTE_ORIENTATION; + } else { + method = GravityProcessingMethod.LOW_PASS; + } } switch (method) { case GravityProcessingMethod.LINEAR_ACCELERATION: this._fromLinearAcceleration(frame); break; - case GravityProcessingMethod.LOW_PASS: - this._usingLPFilter(frame); // Unused - break; case GravityProcessingMethod.ABSOLUTE_ORIENTATION: this._fromAbsoluteOrientation(frame); break; - default: case GravityProcessingMethod.RELATIVE_ORIENTATION: this._fromRelativeOrientation(frame); break; + case GravityProcessingMethod.LOW_PASS: + default: + this._usingLPFilter(frame); // Unused + break; } resolve(object); }); diff --git a/src/nodes/processing/PedometerProcessingNode.ts b/src/nodes/processing/PedometerProcessingNode.ts index b477c5d..e2d913e 100644 --- a/src/nodes/processing/PedometerProcessingNode.ts +++ b/src/nodes/processing/PedometerProcessingNode.ts @@ -19,7 +19,6 @@ import { * Pedometer processing node * * Based on: - * * @see {@link https://github.com/MaximilianBuegler/node-pedometer/blob/master/src/pedometer.js} * @see {@link https://github.com/MaximilianBuegler/node-kinetics/blob/master/src/kinetics.js} * @author Maximilian Bügler @@ -213,9 +212,14 @@ export class PedometerData { lastStepIndex = -Infinity; public add(frame: DataFrame): this { - this.accelerometerData.push(frame.getSensor(LinearAccelerationSensor).value); - this.attitudeData.push(frame.getSensor(AbsoluteOrientationSensor).value.toEuler('ZYX')); - this.frequency = frame.getSensor(LinearAccelerationSensor).frequency; + const linearAccelerometer = frame.getSensor(LinearAccelerationSensor); + const absoluteOrientation = frame.getSensor(AbsoluteOrientationSensor); + if (!linearAccelerometer || !absoluteOrientation) { + throw new Error(`No linear accelerometer sensor or absolute orientation sensors in data frame!`); + } + this.accelerometerData.push(linearAccelerometer.value); + this.attitudeData.push(absoluteOrientation.value.toEuler('ZYX')); + this.frequency = linearAccelerometer.frequency; return this; } diff --git a/src/nodes/processing/RelativeOrientationProcessingNode.ts b/src/nodes/processing/RelativeOrientationProcessingNode.ts index 9d05ab0..f335c42 100644 --- a/src/nodes/processing/RelativeOrientationProcessingNode.ts +++ b/src/nodes/processing/RelativeOrientationProcessingNode.ts @@ -10,7 +10,6 @@ import { /** * Relative orientation processing node - * * @see {@link https://www.w3.org/TR/motion-sensors/#relative-orientation-sensor} * @category Processing node */ diff --git a/src/nodes/processing/VelocityCalculationNode.ts b/src/nodes/processing/VelocityCalculationNode.ts index e6a243c..e386c6c 100644 --- a/src/nodes/processing/VelocityCalculationNode.ts +++ b/src/nodes/processing/VelocityCalculationNode.ts @@ -11,7 +11,6 @@ import { /** * Calculate linear and angular velocity - * * @category Processing node */ export class VelocityCalculationNode extends ObjectProcessingNode { diff --git a/src/nodes/processing/VelocityProcessingNode.ts b/src/nodes/processing/VelocityProcessingNode.ts index ea31154..14ad9c5 100644 --- a/src/nodes/processing/VelocityProcessingNode.ts +++ b/src/nodes/processing/VelocityProcessingNode.ts @@ -15,7 +15,6 @@ import { /** * Linear and angular velocity processing - * * @category Processing node */ export class VelocityProcessingNode extends ObjectProcessingNode { diff --git a/src/services/IMUCalibrationService.ts b/src/services/IMUCalibrationService.ts index 98877ed..1b92eb1 100644 --- a/src/services/IMUCalibrationService.ts +++ b/src/services/IMUCalibrationService.ts @@ -1,18 +1,18 @@ -import { - Acceleration, - AccelerationUnit, - Accelerometer, - AngularVelocity, - CalibrationService, - DataFrame, - Gyroscope, +import { + Acceleration, + AccelerationUnit, + Accelerometer, + AngularVelocity, + CalibrationService, + DataFrame, + Gyroscope, SensorCalibrationData, -} from "@openhps/core"; -import { Vector3Tuple } from "@openhps/core/dist/types/three/Three"; +} from '@openhps/core'; +import { Vector3Tuple } from '@openhps/core/dist/types/three/Three'; /** * IMU calibration service using user interaction - * + * * ## Usage * ```typscript * ModelBuilder.create() @@ -27,18 +27,17 @@ export class IMUCalibrationService extends CalibrationService { /** * Calibrate the IMU sensor using user interaction. Users should be instructed to keep * the phone still in the `IMUCalibrationStep` orientation. - * * @param {number} time Time to fetch data per step * @param {Function} userAction User action callback - * @returns + * @returns */ calibrate(time: number, userAction: (step: IMUCalibrationStep, error?: Error) => Promise): Promise { return new Promise((resolve, reject) => { // Calibration data let accelerometer: Accelerometer; let gyroscope: Gyroscope; - let accelerationData: Map = new Map(); - let gyroscopeData: AngularVelocity[] = []; + const accelerationData: Map = new Map(); + const gyroscopeData: AngularVelocity[] = []; /** * Handle user action and store data @@ -47,40 +46,54 @@ export class IMUCalibrationService extends CalibrationService { */ function handleAction(step: IMUCalibrationStep): Promise { return new Promise((resolve, reject) => { - userAction(step).then(() => { - return this.calibrationRun(time); - }).then((output) => { - // Save gyroscope data - gyroscope = output.gyroscope; - gyroscopeData.push(...output.gyroscopeData); - // Save accelerometer data - accelerometer = output.accelerometer; - accelerationData.set(step, output.accelerometerData); - // Check if there was too much movement - - resolve(); - }).catch(reject); + userAction(step) + .then(() => { + return this.calibrationRun(time); + }) + .then((output) => { + // Save gyroscope data + gyroscope = output.gyroscope; + gyroscopeData.push(...output.gyroscopeData); + // Save accelerometer data + accelerometer = output.accelerometer; + accelerationData.set(step, output.accelerometerData); + // Check if there was too much movement + + resolve(); + }) + .catch(reject); }); } - - handleAction.bind(this)(IMUCalibrationStep.UPWARD).then(() => { - return handleAction.bind(this)(IMUCalibrationStep.DOWNWARD); - }).then(() => { - return handleAction.bind(this)(IMUCalibrationStep.PERPINDICULAR); - }).then(() => { - return Promise.all([ - gyroscope ? this.calibrateGyroscope(gyroscope, gyroscopeData) : Promise.resolve(), - accelerometer ? this.calibrateAccelerometer(accelerometer, accelerationData) : Promise.resolve() - ]); - }).then(() => { - // Persist data - return Promise.all([ - gyroscope ? this.model.findDataService(Gyroscope).insertObject(gyroscope) : Promise.resolve(), - accelerometer ? this.model.findDataService(Accelerometer).insertObject(accelerometer) : Promise.resolve(), - ]); - }).then(() => { - resolve(); - }).catch(reject); + + handleAction + .bind(this)(IMUCalibrationStep.UPWARD) + .then(() => { + return handleAction.bind(this)(IMUCalibrationStep.DOWNWARD); + }) + .then(() => { + return handleAction.bind(this)(IMUCalibrationStep.PERPINDICULAR); + }) + .then(() => { + return Promise.all([ + gyroscope ? this.calibrateGyroscope(gyroscope, gyroscopeData) : Promise.resolve(), + accelerometer + ? this.calibrateAccelerometer(accelerometer, accelerationData) + : Promise.resolve(), + ]); + }) + .then(() => { + // Persist data + return Promise.all([ + gyroscope ? this.model.findDataService(Gyroscope).insertObject(gyroscope) : Promise.resolve(), + accelerometer + ? this.model.findDataService(Accelerometer).insertObject(accelerometer) + : Promise.resolve(), + ]); + }) + .then(() => { + resolve(); + }) + .catch(reject); }); } @@ -89,7 +102,7 @@ export class IMUCalibrationService extends CalibrationService { // Calibration data const calibrationData: CalibrationOutput = { accelerometerData: [], - gyroscopeData: [] + gyroscopeData: [], }; this.start(undefined, (frame: DataFrame) => { @@ -119,75 +132,92 @@ export class IMUCalibrationService extends CalibrationService { return new Promise((resolve) => { gyroscope.calibrationData = new SensorCalibrationData(); gyroscope.calibrationData.offset = data - .reduce((a: AngularVelocity, b: AngularVelocity) => - a.add(b), new AngularVelocity(0, 0, 0)) - .divideScalar(data.length); + .reduce((a: AngularVelocity, b: AngularVelocity) => a.add(b), new AngularVelocity(0, 0, 0)) + .divideScalar(data.length); resolve(); }); } - protected calibrateAccelerometer(accelerometer: Accelerometer, data: Map): Promise { + protected calibrateAccelerometer( + accelerometer: Accelerometer, + data: Map, + ): Promise { return new Promise((resolve) => { - const data_upward = data.get(IMUCalibrationStep.UPWARD) - .map(d => d.toTuple(AccelerationUnit.GRAVITATIONAL_FORCE)); - const data_downward = data.get(IMUCalibrationStep.DOWNWARD) - .map(d => d.toTuple(AccelerationUnit.GRAVITATIONAL_FORCE)); - const data_perpindicular = data.get(IMUCalibrationStep.PERPINDICULAR) - .map(d => d.toTuple(AccelerationUnit.GRAVITATIONAL_FORCE)); - const xdata = [ - ...data_upward, - ...data_downward, - ...data_perpindicular - ]; + const data_upward = data + .get(IMUCalibrationStep.UPWARD) + .map((d) => d.toTuple(AccelerationUnit.GRAVITATIONAL_FORCE)); + const data_downward = data + .get(IMUCalibrationStep.DOWNWARD) + .map((d) => d.toTuple(AccelerationUnit.GRAVITATIONAL_FORCE)); + const data_perpindicular = data + .get(IMUCalibrationStep.PERPINDICULAR) + .map((d) => d.toTuple(AccelerationUnit.GRAVITATIONAL_FORCE)); + const xdata = [...data_upward, ...data_downward, ...data_perpindicular]; const ydata = [ - ...data_upward.map(_ => [1, 1, 1] as Vector3Tuple), // 1g - ...data_downward.map(_ => [-1, -1, -1] as Vector3Tuple), // -1g - ...data_perpindicular.map(_ => [0, 0, 0] as Vector3Tuple), // 0g + ...data_upward.map(() => [1, 1, 1] as Vector3Tuple), // 1g + ...data_downward.map(() => [-1, -1, -1] as Vector3Tuple), // -1g + ...data_perpindicular.map(() => [0, 0, 0] as Vector3Tuple), // 0g ]; const result = this.nlls(xdata, ydata, [1, 1, 1], 10000); accelerometer.calibrationData = new SensorCalibrationData(); - accelerometer.calibrationData.offset = new Acceleration(result[0], result[1], result[2], AccelerationUnit.GRAVITATIONAL_FORCE); + accelerometer.calibrationData.offset = new Acceleration( + result[0], + result[1], + result[2], + AccelerationUnit.GRAVITATIONAL_FORCE, + ); resolve(); }); } - private nlls(sourceData: Vector3Tuple[], targetData: Vector3Tuple[], initialParams: number[] = [1, 1, 1], maxIterations: number = 1000, learningRate: number = 0.001): number[] { + private nlls( + sourceData: Vector3Tuple[], + targetData: Vector3Tuple[], + initialParams: number[] = [1, 1, 1], + maxIterations: number = 1000, + learningRate: number = 0.001, + ): number[] { // Define the model function that maps source data to the target data. + /** + * + * @param params + * @param source + */ function model(params: number[], source: Vector3Tuple): Vector3Tuple { const [a, b, c] = params; return [source[0] * a, source[1] * b, source[2] * c]; } - + // Initialize the parameters. - let params = [...initialParams]; - + const params = [...initialParams]; + for (let iteration = 0; iteration < maxIterations; iteration++) { - // Calculate the gradients for each parameter. - let gradA = 0; - let gradB = 0; - let gradC = 0; - - for (let i = 0; i < sourceData.length; i++) { - const sourcePoint = sourceData[i]; - const targetPoint = targetData[i]; - - const predicted = model(params, sourcePoint); - - // Compute the residuals (difference between predicted and target). - const residualX = predicted[0] - targetPoint[0]; - const residualY = predicted[1] - targetPoint[1]; - const residualZ = predicted[2] - targetPoint[2]; - - // Update gradients using the residuals and source data. - gradA += 2 * residualX * sourcePoint[0]; - gradB += 2 * residualY * sourcePoint[1]; - gradC += 2 * residualZ * sourcePoint[2]; - } - - // Update the parameters using the gradients and learning rate. - params[0] -= learningRate * gradA; - params[1] -= learningRate * gradB; - params[2] -= learningRate * gradC; + // Calculate the gradients for each parameter. + let gradA = 0; + let gradB = 0; + let gradC = 0; + + for (let i = 0; i < sourceData.length; i++) { + const sourcePoint = sourceData[i]; + const targetPoint = targetData[i]; + + const predicted = model(params, sourcePoint); + + // Compute the residuals (difference between predicted and target). + const residualX = predicted[0] - targetPoint[0]; + const residualY = predicted[1] - targetPoint[1]; + const residualZ = predicted[2] - targetPoint[2]; + + // Update gradients using the residuals and source data. + gradA += 2 * residualX * sourcePoint[0]; + gradB += 2 * residualY * sourcePoint[1]; + gradC += 2 * residualZ * sourcePoint[2]; + } + + // Update the parameters using the gradients and learning rate. + params[0] -= learningRate * gradA; + params[1] -= learningRate * gradB; + params[2] -= learningRate * gradC; } return params; } @@ -208,7 +238,7 @@ export enum IMUCalibrationStep { * Position the IMU sensor perpendicular * Example: Screen on its side (against a wall) */ - PERPINDICULAR + PERPINDICULAR, } interface CalibrationOutput { diff --git a/src/services/MagnetometerCalibrationService.ts b/src/services/MagnetometerCalibrationService.ts index 0bc6aa6..a80d0d8 100644 --- a/src/services/MagnetometerCalibrationService.ts +++ b/src/services/MagnetometerCalibrationService.ts @@ -1,5 +1,3 @@ -import { Service } from "@openhps/core"; +import { Service } from '@openhps/core'; -export class MagnetometerCalibrationService extends Service { - -} +export class MagnetometerCalibrationService extends Service {} diff --git a/test/specs/datasets/dataset.openhps-2021-03.spec.ts b/test/specs/datasets/dataset.openhps-2021-03.spec.ts index 7ccc142..56d4453 100644 --- a/test/specs/datasets/dataset.openhps-2021-03.spec.ts +++ b/test/specs/datasets/dataset.openhps-2021-03.spec.ts @@ -16,6 +16,7 @@ import { import { CSVDataSource } from "@openhps/csv"; import { expect } from "chai"; import { + GravityProcessingMethod, GravityProcessingNode, PedometerProcessingNode } from '../../../src'; @@ -63,7 +64,9 @@ describe('dataset openhps-2021-03', () => { taps: 20, objectFilter: (object) => object instanceof Accelerometer })) - .via(new GravityProcessingNode()) + .via(new GravityProcessingNode({ + method: GravityProcessingMethod.ABSOLUTE_ORIENTATION + })) .via(new PedometerProcessingNode({ minConsecutiveSteps: 1 })) diff --git a/test/specs/node.processing.acceleration.spec.ts b/test/specs/node.processing.acceleration.spec.ts index 0c696f6..2002bb9 100644 --- a/test/specs/node.processing.acceleration.spec.ts +++ b/test/specs/node.processing.acceleration.spec.ts @@ -11,6 +11,7 @@ import { DataObject, DataFrame, Accelerometer, + KalmanFilterNode, } from '@openhps/core'; import { AccelerationProcessingNode, @@ -29,6 +30,25 @@ describe('node', () => { ModelBuilder.create() .addService(timeService) .from(new CallbackSourceNode()) + .via(new KalmanFilterNode( + (object: Accelerometer) => { // Select the property that you want to filter + return [{ + key: "accelerometer-value-blahblah", // Key ensures the name of the value for storage + value: object.value // Value that we want to filter + }]; + }, + (key: string, value: Acceleration, object: Accelerometer) => { // Modify the property + object.value = value; // Value is the filtered value, so we update it + }, + { // @see {@link https://cheever.domains.swarthmore.edu/Ref/Kalman/MatrixKalman.html} + R: 1, // measurement noise covariance + A: 1, // state gain + B: 1, // input gain + C: 1, // measurement vector + Q: 1, // process noice covariance + objectFilter: (object: DataObject) => object instanceof Accelerometer, // Only filter accelerometers + }, + )) .via(new AccelerationProcessingNode()) .to(callbackSink) .build() diff --git a/test/specs/node.processing.gravity.spec.ts b/test/specs/node.processing.gravity.spec.ts index 5c7bbd0..3efa2a1 100644 --- a/test/specs/node.processing.gravity.spec.ts +++ b/test/specs/node.processing.gravity.spec.ts @@ -70,7 +70,7 @@ describe('node processing gravity', () => { return frame; }, { uid: "source", - separator: ";" + separator: ";", })) .via(new GravityProcessingNode()) .to(sink) @@ -83,10 +83,12 @@ describe('node processing gravity', () => { it('should filter out gravity using orientation', (done) => { const errors = []; sink.callback = (frame: EvaluationIMUFrame) => { - const error = frame.getSensor(LinearAccelerationSensor).value.distanceTo(frame.evaluationFrame.getSensor(LinearAccelerationSensor).value); + const error = frame.getSensor(LinearAccelerationSensor).value + .distanceTo(frame.evaluationFrame.getSensor(Accelerometer).value); errors.push(error); }; + model.once('error', done); model.pull({ count: (model.findNodeByUID("source") as CSVDataSource).size }).then(() => {